Skip to content
Snippets Groups Projects
Commit 9a201a02 authored by Stefan Hynek's avatar Stefan Hynek :drooling_face:
Browse files

Merge branch '16-set-up-release-workflow' into 'main'

Resolve "set up release workflow"

Closes #16

See merge request !9
parents 5e279430 d32c8863
No related branches found
No related tags found
1 merge request!9Resolve "set up release workflow"
Pipeline #276735 failed
venv/
......@@ -7,6 +7,7 @@ workflow:
stages:
- test
- release
- build
variables:
......@@ -34,21 +35,33 @@ lint dockerfile:
changes:
- Dockerfile
release:
stage: release
image: docker.io/python:3.8-alpine
before_script:
- pip install --user --requirement requirements.ci.txt
script:
- semantic-release --verbosity=DEBUG publish
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
build container image:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- "[[ -n $CI_COMMIT_TAG ]] && export version=$CI_COMMIT_TAG || export version=$CI_COMMIT_SHORT_SHA"
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64 | tr -d '\n')\"},\"$harbor_registry\":{\"auth\":\"$HARBOR_ROBOT_TOKEN64\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--build-arg build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
--build-arg vcs_ref=${CI_COMMIT_SHORT_SHA}
--build-arg version=${CI_COMMIT_SHORT_SHA}
--destination $CI_REGISTRY_IMAGE/repdav:$CI_COMMIT_SHORT_SHA
--destination $harbor_registry/$harbor_repo/repdav:$CI_COMMIT_SHORT_SHA
--build-arg vcs_ref=${version}
--build-arg version=${version}
--destination $CI_REGISTRY_IMAGE/repdav:$version
--destination $harbor_registry/$harbor_repo/repdav:$version
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG
[tool.semantic_release]
version_source = "tag"
branch = "main"
major_on_zero = false
tag_format = "{version}"
build_command = false
upload_to_repository = false
hvcs = "gitlab"
hvcs_domain = "gitlab.gwdg.de"
hvcs_api_domain = "gitlab.gwdg.de/api/v4"
check_build_status = true
python-semantic-release==7.25.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment