From 7a2fbfe67dffb75b080a11ca1d033d663952b636 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Fri, 21 Oct 2016 13:44:31 -0700 Subject: [PATCH] build_jobs: import current jenkins build scripts --- build_jobs/01_manifest.sh | 114 ++++++++++++++++++++++++++++++++++ build_jobs/02_sdk.sh | 71 +++++++++++++++++++++ build_jobs/02_toolchains.sh | 71 +++++++++++++++++++++ build_jobs/03_packages.sh | 81 ++++++++++++++++++++++++ build_jobs/04_images.sh | 109 +++++++++++++++++++++++++++++++++ build_jobs/05_vm.sh | 119 ++++++++++++++++++++++++++++++++++++ 6 files changed, 565 insertions(+) create mode 100644 build_jobs/01_manifest.sh create mode 100644 build_jobs/02_sdk.sh create mode 100644 build_jobs/02_toolchains.sh create mode 100644 build_jobs/03_packages.sh create mode 100644 build_jobs/04_images.sh create mode 100644 build_jobs/05_vm.sh diff --git a/build_jobs/01_manifest.sh b/build_jobs/01_manifest.sh new file mode 100644 index 0000000000..4ad75e4d1c --- /dev/null +++ b/build_jobs/01_manifest.sh @@ -0,0 +1,114 @@ +#!/bin/bash +# +# Jenkins job for creating build manifests. +# +# Input Parameters: +# +# MANIFEST_REF=master +# Git branch or tag in github.com/coreos/manifest to build +# +# LOCAL_MANIFEST= +# Repo local manifest to amend the branch's default manifest with. +# https://wiki.cyanogenmod.org/w/Doc:_Using_manifests#The_local_manifest +# +# Input Artifacts: +# +# $WORKSPACE/bin/cork from a recent mantle build. +# +# Git: +# +# github.com/coreos/manifest checked out to $WORKSPACE/manifest +# SSH push access to github.com/coreos/manifest-builds +# +# Output: +# +# Pushes build tag to manifest-builds. +# Writes manifest.properties w/ parameters for sdk and toolchain jobs. + +set -ex + +export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no" + +finish() { + local tag="$1" + git -C "${WORKSPACE}/manifest" push \ + "ssh://git@github.com/coreos/manifest-builds.git" \ + "refs/tags/${tag}:refs/tags/${tag}" + tee "${WORKSPACE}/manifest.properties" <.repo/local_manifests/local.xml <<<"${LOCAL_MANIFEST}" +fi + +./bin/cork update --create --downgrade-replace --verbose \ + --manifest-url "${GIT_URL}" \ + --manifest-branch "${GIT_COMMIT}" \ + --manifest-name "${MANIFEST_NAME}" \ + --new-version "${COREOS_VERSION}" \ + --sdk-version "${COREOS_SDK_VERSION}" + +./bin/cork enter --experimental -- sh -c \ + "pwd; repo manifest -r > '/mnt/host/source/manifest/${COREOS_BUILD_ID}.xml'" + +cd manifest +git add "${COREOS_BUILD_ID}.xml" + +ln -sf "${COREOS_BUILD_ID}.xml" default.xml +ln -sf "${COREOS_BUILD_ID}.xml" release.xml +git add default.xml release.xml + +tee version.txt <