Skip to content
Snippets Groups Projects
Commit 53be5bf6 authored by Radek Ošlejšek's avatar Radek Ošlejšek
Browse files

Merge branch '134-update-ci-pipeline' into 'master'

Resolve "Update CI pipeline"

Closes #134

See merge request grp-fidentis/analyst2!144
parents ec13b772 42d46ca2
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,8 @@ stages:
- build
- test
- document
- publish
- upload
- release
# Builds code and generates documentation
build:
......@@ -70,9 +71,9 @@ test:
# expire_in: 1 hour
# when: on_success
# publish release when commiting to master and the VERSION.txt file has changed
publish:
stage: publish
# upload code to the web server when commiting to master and the VERSION.txt file has changed
upload:
stage: upload
image: ubuntu:latest
script:
- export VERSION=$(grep -oP '^([^\s]*)' $DEPLOYMENT_INFO_VERSION_FILE)
......@@ -92,3 +93,33 @@ publish:
- if: '$CI_COMMIT_BRANCH'
when: never
# Make Gitlab release when a new version is uploaded:
release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
needs:
- job: upload
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
changes:
- VERSION.txt
- if: '$CI_COMMIT_BRANCH'
when: never
script:
- export VERSION=$(grep -oP '^([^\s]*)' $DEPLOYMENT_INFO_VERSION_FILE)
- export TAG_MESSAGE=$(grep -oP '(?<=\s)[^\s].*' $DEPLOYMENT_INFO_VERSION_FILE)
release:
name: 'Release $VERSION'
description: 'Created using the release-cli $TAG_MESSAGE'
tag_name: '$VERSION'
ref: '$VERSION'
# milestones:
assets:
links:
- name: 'Application'
url: 'https://radek-oslejsek.cz/download/fidentis-analyst/FIDENTIS-Analyst-app-$VERSION.zip'
- name: 'Data'
url: 'https://radek-oslejsek.cz/download/fidentis-analyst/FIDENTIS-Analyst-data.zip'
- name: 'Documentation'
url: 'https://www.radek-oslejsek.cz/download/fidentis-analyst/apidocs/index.html'
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