From 2c964100fa6ea98b1ece382da05187eebda75fe3 Mon Sep 17 00:00:00 2001 From: Kristian Klausen Date: Tue, 27 Oct 2020 17:57:48 +0100 Subject: [PATCH] Commit the releases to a separate disconneted branch We do a release every day so we end up with a lot of "release commits" (noise) in the master branch, which we don't want. --- .gitlab-ci.yml | 13 +++++++------ ci/base-devel/Dockerfile | 32 -------------------------------- ci/base/Dockerfile | 32 -------------------------------- 3 files changed, 7 insertions(+), 70 deletions(-) delete mode 100644 ci/base-devel/Dockerfile delete mode 100644 ci/base/Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1b771b..d8ce65b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -122,8 +122,8 @@ image:publish:secure: script: - /kaniko/executor --whitelist-var-run="false" - --context $CI_PROJECT_DIR/ci/$GROUP - --dockerfile $CI_PROJECT_DIR/ci/$GROUP/Dockerfile + --context $CI_PROJECT_DIR + --dockerfile $CI_PROJECT_DIR/Dockerfile.$GROUP --destination archlinux/archlinux:$GROUP-$BUILD_VERSION .test: @@ -177,6 +177,7 @@ release: curl -sSf --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file output/${group}.tar.xz ${PACKAGE_REGISTRY_URL}/${group}-${BUILD_VERSION}.tar.xz echo "Uploading ${group}.tar.xz.SHA256" curl -sSf --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file output/${group}.tar.xz.SHA256 ${PACKAGE_REGISTRY_URL}/${group}-${BUILD_VERSION}.tar.xz.SHA256 + mkdir ci/${group} sed "/TEMPLATE_ROOTFS_FILE/d" Dockerfile.template > ci/${group}/Dockerfile package_url=$(./ci/get-public-download-for-generic-package.sh ${group}-${BUILD_VERSION}.tar.xz) sed -i "s|TEMPLATE_ROOTFS_URL|${package_url}|" ci/${group}/Dockerfile @@ -185,13 +186,13 @@ release: - > curl -sSf --request POST --header "PRIVATE-TOKEN: ${GITLAB_PROJECT_TOKEN}" - --form "branch=master" + --form "branch=releases" --form "commit_message=Release ${BUILD_VERSION}" --form "actions[][action]=update" - --form "actions[][file_path]=ci/base/Dockerfile" + --form "actions[][file_path]=Dockerfile.base" --form "actions[][content]=