Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ if (BRANCH_NAME == "stable") {
}

def new_version = '0.0.0';
def new_tag = null;

def release_file_list = [];

Expand Down Expand Up @@ -107,6 +108,8 @@ pipeline {
if (new_version == '0.0.0') {
error "Failed to calculate new version"
}

new_tag = "${BRANCH_NAME}_release-" + new_version.replaceAll("\\.", "-")

echo "Calculated new version to be ${new_version}"
}
Expand All @@ -123,10 +126,14 @@ pipeline {
ws("${WORKSPACE}/${OS}") {
stage("${OS} Clone") {
checkout scm;

if (new_tag) {
sh "git tag ${new_tag}"
}
}

stage("${OS} Bootstrap") {
sh "./deploy/build.sh --os=bootstrap --branch=${BRANCH_NAME} --version=${new_version}"
sh "./deploy/build.sh --os=bootstrap --branch=${BRANCH_NAME}"

if (OS.endsWith("armhf")) {
sh "docker run --rm --privileged multiarch/qemu-user-static:register --reset"
Expand Down Expand Up @@ -222,8 +229,7 @@ pipeline {

stage("Publish to GitHub") {
ws("${WORKSPACE}/publish") {
def tag = "${BRANCH_NAME}_release-" + new_version.replaceAll("\\.", "-")
echo "Creating GitHub Release and Tag for ${tag}"
echo "Creating GitHub Release and Tag for ${new_tag}"
withCredentials([
usernamePassword(
credentialsId: 'MDSplusJenkins',
Expand All @@ -233,7 +239,7 @@ pipeline {

// TODO: Protect against spaces in filenames
def release_file_list_arg = release_file_list.join(" ")
sh "./deploy/create_github_release.py --tag ${tag} --api-token \$GITHUB_ACCESS_TOKEN ${release_file_list_arg}"
sh "./deploy/create_github_release.py --tag ${new_tag} --api-token \$GITHUB_ACCESS_TOKEN ${release_file_list_arg}"
}

}
Expand Down
1 change: 1 addition & 0 deletions deploy/platform/bootstrap/bootstrap_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ trap cleanup EXIT INT
docker run -t -a stdout -a stderr --cidfile=$cid \
-u $(id -u):$(id -g) --privileged \
-e "HOME=/tmp" \
-e "RELEASE_VERSION" \
-v "${SRCDIR}:${DOCKER_SRCDIR}" \
${DOCKERIMAGE} "${DOCKER_SRCDIR}/bootstrap"