add prepare release job

This commit is contained in:
2024-05-16 00:21:31 +03:00
parent 815e16324c
commit 7e510a487f

View File

@@ -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: