Commit 81ad0250 authored by Michael Hanus 's avatar Michael Hanus

Merge branch 'master' of git.ps.informatik.uni-kiel.de:curry/pakcs

parents 2519984f ea241e21
......@@ -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
......@@ -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
......@@ -10,9 +10,12 @@ function init() {
VERSION="${BUILD_PAKCS_VERSION}"
VERSION_FILE="./curry-lang.org/data/version/pakcs/v${VERSION}.version"
NIGHTLY_FILE=./curry-lang.org/data/versions/pakcs/latest-nighly.version
LATEST_FILE=./curry-lang.org/data/versions/pakcs/latest.version
# the path to the folder where the pakcs version files will be created/updated
VERSION_FOLDER_PATH=./curry-lang.org/data/versions/pakcs
VERSION_FILE="${VERSION_FOLDER_PATH}/v${VERSION}.version"
NIGHTLY_FILE="${VERSION_FOLDER_PATH}/latest-nighly.version"
LATEST_FILE="${VERSION_FOLDER_PATH}/latest.version"
# configure git (user)name and email
git config user.name "${CURRY_LANG_USER}"
......
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