diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bdc704137..34ad53be9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -159,8 +159,12 @@ release:prepare: script: - echo "Preparing release..." # TODO: get tag and pass to following release jobs as artifact - rules: &release-rules #TODO: only start job for tags v$MAJOR.$MINOR.$SUBMINOR, t$MAJOR.$MINOR.$SUBMINOR, and d$MAJOR.$MINOR.$SUBMINOR - - when: manual + - echo FOOBAR > .current-version + artifacts: + paths: + - .current-version + rules: &release-rules + - if: $CI_COMMIT_TAG =~ /^v/ release:changelog: stage: release @@ -173,8 +177,7 @@ release:changelog: reports: dotenv: build.env paths: - - .current-version - - .current-changelog.md + - .changelog.md name: "changelog-${CI_COMMIT_SHORT_SHA}" expire_in: "1 day" @@ -184,15 +187,15 @@ release:container: GIT_STRATEGY: none image: ${IMAGE_BUILDER} script: - - echo "Building container for release ${RELEASE}..." - - buildah bud - - echo "Pushing container ${RELEASE} to container registry..." - - buildah push - # - skopeo --insecure-policy copy --dest-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" docker-archive://$(pwd)/uniworx.tar.gz docker://${CI_REGISTRY_IMAGE}:${VERSION} - # - skopeo --insecure-policy copy --src-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" --dest-creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" docker://${CI_REGISTRY_IMAGE}:${VERSION} docker://${CI_REGISTRY_IMAGE}:latest + - echo "Building container for release ${VERSION}..." + - buildah bud --tag fradrive:${VERSION} --file docker/fradrive/Dockerfile + - buildah add --chown uniworx:uniworx bin/uniworx /bin/uniworx + - echo "Pushing container ${VERSION} to container registry..." + - buildah push --creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" fradrive:${VERSION} ${CI_REGISTRY_IMAGE}/fradrive:${VERSION} needs: - frontend # sanity - backend:prod # sanity + - release:prepare - release:changelog rules: *release-rules @@ -206,8 +209,8 @@ release:release: - echo "Creating release ${VERSION}" release: name: "${VERSION}" - tag_name: '$CI_COMMIT_TAG' - description: .current-changelog.md + tag_name: "{$CI_COMMIT_TAG}" + description: .changelog.md needs: - frontend # sanity - backend:prod # sanity