Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Michael Sammler
ci
Commits
f8cda8eb
Commit
f8cda8eb
authored
May 20, 2021
by
Ralf Jung
Browse files
use CI_COMMIT_BRANCH instead of CI_COMMIT_REF_NAME (preparing for merge pipelines)
parent
b968ab46
Changes
1
Hide whitespace changes
Inline
Side-by-side
buildjob
View file @
f8cda8eb
...
...
@@ -73,7 +73,7 @@ if [[ -n "$DENY_WARNINGS" ]] && egrep -q "^Warning:" build-log.txt; then
fi
# maybe submit timing information
if
[[
"
$CI_RUNNER_DESCRIPTION
"
==
"coop-timing"
]]
;
then
if
[[
"
$CI_RUNNER_DESCRIPTION
"
==
"coop-timing"
&&
-n
"
$CI_COMMIT_BRANCH
"
]]
;
then
# collect all information into one file
status
"[buildjob] Build performance information"
find
-name
"*.v.perf"
-print0
| xargs
-0
cat
>
build-times.txt
...
...
@@ -87,28 +87,28 @@ if [[ "$CI_RUNNER_DESCRIPTION" == "coop-timing" ]]; then
panic
"[buildjob] TIMING_SECRET variable is missing"
fi
# Submit to webhook endpoint
status
"[buildjob] Submitting timing information to coq-speed (Project:
$TIMING_PROJECT
, Branch:
$CI_COMMIT_
REF_NAME
, Config:
$TIMING_CONF
)"
status
"[buildjob] Submitting timing information to coq-speed (Project:
$TIMING_PROJECT
, Branch:
$CI_COMMIT_
BRANCH
, Config:
$TIMING_CONF
)"
curl
--fail
-sS
-X
POST https://coq-speed.mpi-sws.org/webhook/build_times
\
--user
"
$TIMING_SECRET
"
\
-H
"X-Commit:
$CI_COMMIT_SHA
"
\
-H
"X-Project:
$TIMING_PROJECT
"
\
-H
"X-Branch:
$CI_COMMIT_
REF_NAME
"
\
-H
"X-Branch:
$CI_COMMIT_
BRANCH
"
\
-H
"X-Config:
$TIMING_CONF
"
\
-H
"X-Date:
$(
git show
$CI_COMMIT_SHA
-s
--pretty
=
%cI
)
"
\
--data-binary
@- < build-times.txt
fi
# maybe create opam package
if
[[
-n
"
$OPAM_PKG
"
&&
"
$CI_COMMIT_
REF_NAME
"
==
"master"
]]
;
then
if
[[
-n
"
$OPAM_PKG
"
&&
"
$CI_COMMIT_
BRANCH
"
==
"master"
]]
;
then
# check if we have the secret
if
[[
-z
"
$OPAM_UPDATE_SECRET
"
]]
;
then
panic
"[buildjob] OPAM_UPDATE_SECRET variable is missing"
fi
# determine package name prefix
if
[[
"
$CI_COMMIT_
REF_NAME
"
==
master
]]
;
then
if
[[
"
$CI_COMMIT_
BRANCH
"
==
master
]]
;
then
OPAM_PKG_PREFIX
=
dev
else
OPAM_PKG_PREFIX
=
"branch.
$CI_COMMIT_
REF_NAME
"
OPAM_PKG_PREFIX
=
"branch.
$CI_COMMIT_
BRANCH
"
fi
# Trigger opam updater
status
"[buildjob] Releasing package
$OPAM_PKG
on opam"
...
...
@@ -116,7 +116,7 @@ if [[ -n "$OPAM_PKG" && "$CI_COMMIT_REF_NAME" == "master" ]]; then
-F
"token=
$OPAM_UPDATE_SECRET
"
\
-F
"ref=master"
\
-F
"variables[REPO]=
$CI_PROJECT_URL
.git"
\
-F
"variables[REF]=
$CI_COMMIT_
REF_NAME
"
\
-F
"variables[REF]=
$CI_COMMIT_
BRANCH
"
\
-F
"variables[SHA]=
$CI_COMMIT_SHA
"
\
-F
"variables[OPAM_PREFIX]=
$OPAM_PKG_PREFIX
"
echo
# there's no newline here otherwise
...
...
@@ -129,8 +129,8 @@ if [[ -n "$CI_COQCHK" ]]; then
fi
# maybe generate and upload documentation
if
[[
-n
"
$DOC_DIR
"
&&
"
$CI_COMMIT_
REF_NAME
"
==
"master"
]]
;
then
status
"Publishing documentation from branch
$CI_COMMIT_
REF_NAME
to
$DOC_DIR
"
if
[[
-n
"
$DOC_DIR
"
&&
"
$CI_COMMIT_
BRANCH
"
==
"master"
]]
;
then
status
"Publishing documentation from branch
$CI_COMMIT_
BRANCH
to
$DOC_DIR
"
# check if we have the secret
if
[[
-z
"
$DOC_KEY
"
]]
;
then
panic
"[buildjob] DOC_KEY variable is missing"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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