Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
curry
pakcs
Commits
f0749a0a
Verified
Commit
f0749a0a
authored
Feb 05, 2021
by
Bennet Bleßmann
❔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error for tag release pipeline
parent
30a61f23
Pipeline
#1421
passed with stages
in 212 minutes and 2 seconds
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
.gitlab-ci.yml
.gitlab-ci.yml
+5
-1
ci/README.md
ci/README.md
+9
-5
ci/check_tag_version.sh
ci/check_tag_version.sh
+9
-0
No files found.
.gitlab-ci.yml
View file @
f0749a0a
...
...
@@ -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
...
...
ci/README.md
View file @
f0749a0a
...
...
@@ -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
-
`
C
URRY_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`
#### `
u
pdate_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.
`
U
PLOAD_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`
,
...
...
ci/check_tag_version.sh
0 → 100755
View file @
f0749a0a
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment