Commit facde049 authored by Bennet Bleßmann's avatar Bennet Bleßmann

Merge branch 'master-setup-ci' into 'master'

fix error for tag release pipeline

See merge request !18
parents 30a61f23 f0749a0a
Pipeline #1432 passed with stages
in 215 minutes and 37 seconds
......@@ -152,8 +152,9 @@ check_version:
artifacts: true
rules:
- if: '$CI_COMMIT_TAG =~ /^v\d*\.\d*\.\d*$/i'
- if: '$TEST_RELEASE == "yes"'
script:
- '[[ $CI_COMMIT_TAG == "v${BUILD_PAKCS_VERSION} ]] || { echo "Expected git tag ${CI_COMMIT_TAG} to match version v${BUILD_PAKCS_VERSION}" ; exit 1 } '
- ci/check_tag_version.sh
# run_make is run except for the nightly download test run
run_test:
......@@ -268,6 +269,7 @@ upload_release:
- if: '$CI_COMMIT_TAG =~ /^v\d*\.\d*\.\d*$/i'
- if: '$TEST_RELEASE == "yes"'
needs:
- job: "check_version" # don't publish a release when the check failed
- job: "run_make"
artifacts: true # need pakcs binary to determine version
- job: "make_manual" # needed for Manual.pdf
......@@ -348,6 +350,7 @@ tag_release:
- if: '$CI_COMMIT_TAG =~ /^v\d*\.\d*\.\d*$/i'
- if: '$TEST_RELEASE == "yes"'
needs:
- job: "check_version" # don't publish a release when the check failed
- job: "run_make"
artifacts: true # need environment variables for build_pakcs_version
- job: upload_release # wait for upload
......@@ -392,6 +395,7 @@ link_release:
- if: '$TEST_RELEASE == "yes"'
when: on_success # wait for previous stage to finish
needs:
- job: "check_version" # don't publish a release when the check failed
- job: "run_make"
artifacts: true # need environment variables for build_pakcs_version
- job: tag_release # wait for release as we are hyperlinking to release assets
......
......@@ -14,6 +14,7 @@ CI Readme
| |
| +-- before_make.sh -- run before most CI jobs to setup the basic environment
| +-- build_docker_image.sh -- script to build the Dockerfile-swi image and tag it as pakcs-swi-ci
| +-- check_tag_version.sh -- for version tags check that the tag matches the build version
| +-- cypm_helper.sh -- script with helper function for interacting with cypm
| +-- Dockerfile-swi -- Dockerfile for the Docker Image used by most CI jobs
| +-- gitlab_release.sh -- used to create the gitlab (nightly) releases
......@@ -52,7 +53,7 @@ they are configured to not run concurrently by sharing a `resource_group`
unless configured by a Gitlab Admin, no clue how I found that out
- `CURRY_LANG_PROJECT`\: The Repo ID for the curry-lang.org repo, assumed to be in the same gitlab instance
- `CURRY_LANG_BRANCH` \: The branch to update for releases/nightlies in the curry-lang.org repo
- `URRY_CHECK_VERSION`, `CURRY_DOC_VERSION`, `MARKDOWN_VERSION`\: the version of the corresponding package to install using cypm
- `CURRY_CHECK_VERSION`, `CURRY_DOC_VERSION`, `MARKDOWN_VERSION`\: the version of the corresponding package to install using cypm
##### `gitlab-ci.yml` job `run_download_make` Variables
- `CURRY_CHECK_VERSION` override as this may need a different version than the other jobs
......@@ -67,7 +68,7 @@ it should not be necessary to override them.
As this project contains submodules those are checkedout recursively by instructing Gitlab via
`GIT_SUBMODULE_STRATEGY`, this should not be changed as long as this project uses submodules.
#### `ùpdate_version.sh`
#### `update_version.sh`
Here the content of the `./data/versions/packs/{latest,latest-nightly,v${VERSION}}.version`
including the download link bases.
Also, the commit messages to curry-lang.org are defined here.
......@@ -76,7 +77,7 @@ Also, the commit messages to curry-lang.org are defined here.
Defined the names used for tags and the generic packages.
Also, defined the mapping of paths to filenames for the files that are added to a release.
`LOCAL_FILE_NAME` contains the name of the file on disc relative to the `CI_PROJECT_DIR`.
`ÙPLOAD_FILE_NAMES` contains the corresponding name for the file upload.
`UPLOAD_FILE_NAMES` contains the corresponding name for the file upload.
#### `make_download.sh`
Has a hard coded download url
......@@ -180,7 +181,7 @@ that does not potentially match a past or futur version.
## CI Job Dependencies
Gitlab requires that job dependencies are acyclic (reasonable) and that jobs may only depend on jobs of prior stages.
While keeping this in mind the jobs are separated further in semantic stages.
While keeping this in mind, the jobs are separated further in semantic stages.
```text
......@@ -189,7 +190,7 @@ make | run_make
| +-------------+---------+------------+------------+
| | | | | |
test | | | | run_test check_version test_download_src test_download_amd64_linux
| | | |
| | | |
| | | +----------+-------------------+
| | v v v v
| | | | | |
......@@ -220,6 +221,9 @@ curry-lang-ci | curry-lang-ci
|
```
`link_release`, `tag_release` and `upload_release` further depend on `check_version`, this is
used to make sure that releases are only done if the check succeeds. There is no further artifact dependency.
## Makefile Interaction
All CI invocations of make should set `CI_BUILD=yes`,
......
#!/bin/bash
# if this is not a test release and the tag does not match the build pakcs version
# give an error
if [[ $TEST_RELEASE != "yes" && $CI_COMMIT_TAG != "v${BUILD_PAKCS_VERSION}" ]] ; then
echo "Expected git tag ${CI_COMMIT_TAG} to match version v${BUILD_PAKCS_VERSION}"
exit 1
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment