diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1cd63a7..29b4c55 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,13 @@ variables: value: "No" description: Create release from this build? + WITHOUT_BUILD: + options: + - "No" + - "Yes" + value: "Yes" + description: Create release without building? + stages: - build - release @@ -24,7 +31,7 @@ build-docker: image: name: ${KANIKO_IMAGE} entrypoint: [""] - allow_failure: true + allow_failure: false tags: - build - docker @@ -39,6 +46,8 @@ build-docker: --destination "${DOCKER_IMAGE}:${VERSION}-${CI_COMMIT_SHORT_SHA}" dependencies: [] rules: + - if: $PREPARE_RELEASE == "Yes" && $WITHOUT_BUILD == "Yes" + when: never - changes: - build/docker/**/* - cmd/**/* @@ -64,7 +73,7 @@ make-release: - echo "Preparing release for version ${VERSION}-${CI_COMMIT_SHORT_SHA}" release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties name: kube-forge:${VERSION}-${CI_COMMIT_SHORT_SHA} - tag_name: "${VERSION}-${CI_COMMIT_SHORT_SHA}" + tag_name: "${CI_COMMIT_SHORT_SHA}" description: "${VERSION}-${CI_COMMIT_SHORT_SHA}" assets: links: