Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iris
ci
Commits
a8aabe36
Commit
a8aabe36
authored
7 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add support for publishing coqdoc
parent
d2edcd47
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildjob
+27
-1
27 additions, 1 deletion
buildjob
with
27 additions
and
1 deletion
buildjob
+
27
−
1
View file @
a8aabe36
...
...
@@ -15,6 +15,10 @@ set -e
## non-empty, submit timing information to coq-speed with the given project
## name and configuration string. Reqires the $TIMING_SECRET variable to be
## set.
## - $DOC_DIR, $DOC_BRANCH, $DOC_KEY: If $DOC_DIR is non-empty, run coqdoc and
## upload the results to the given directory. This only happens if the
## current branch is $DOC_BRANCH (defaults to master). Requires the $DOC_KEY
## variable to be set to the secret key for uploading.
# Parepare
.
ci/ansi-colors.sh
...
...
@@ -31,7 +35,7 @@ cat build-log.txt | egrep "(real|user): [0-9]" | tee build-time.txt
# maybe validate
if
[[
-n
"
$VALIDATE
"
]]
;
then
echo_color
"
$BOLDGREEN
"
"[buildjob] Performing validation"
make validate
;
make validate
fi
# maybe submit timing information
...
...
@@ -40,6 +44,7 @@ if [[ -n "$TIMING_PROJECT" && -n "$TIMING_CONF" ]]; then
# check if we have the secret
if
[[
-z
"
$TIMING_SECRET
"
]]
;
then
echo_color
"
$BOLDRED
"
"[buildjob] TIMING_SECRET variable is missing"
exit
1
fi
# Submit to webhook endpoint
curl
--fail
-sS
-X
POST https://coq-speed.mpi-sws.org/webhook/build_times
\
...
...
@@ -52,12 +57,33 @@ if [[ -n "$TIMING_PROJECT" && -n "$TIMING_CONF" ]]; then
--data-binary
@- < build-time.txt
fi
# maybe generate and upload documentation
if
[[
-n
"
$DOC_DIR
"
&&
"
$CI_COMMIT_REF_NAME
"
==
"
${
DOC_BRANCH
:-
master
}
"
]]
;
then
echo_color
"
$BOLDGREEN
"
"Publishing documentation from branch
$CI_COMMIT_REF_NAME
to
$DOC_DIR
"
# check if we have the secret
if
[[
-z
"
$DOC_KEY
"
]]
;
then
echo_color
"
$BOLDRED
"
"[buildjob] DOC_KEY variable is missing"
exit
1
fi
# We need a custom wrapper around SSH to use our settings, and ssh-agent for the key
eval
$(
ssh-agent
-s
)
echo
"
${
DOC_KEY
}
"
|
tr
-d
'\r'
| ssh-add -
export
GIT_SSH
=
$(
readlink
-e
ci/ssh
)
# Generate documentation
make html
# Upload documentation
rsync
-a
--delete
-e
"
$GIT_SSH
"
html/
"
$DOC_DIR
/"
fi
# maybe create opam package
if
[[
-n
"
$OPAM_PKG
"
&&
"
$CI_COMMIT_REF_NAME
"
==
"
${
OPAM_PKG_BRANCH
:-
master
}
"
]]
;
then
echo_color
"
$BOLDGREEN
"
"[buildjob] Releasing package on opam"
# check if we have the secret
if
[[
-z
"
$OPAM_UPDATE_SECRET
"
]]
;
then
echo_color
"
$BOLDRED
"
"[buildjob] OPAM_UPDATE_SECRET variable is missing"
exit
1
fi
# determine package name prefix
if
[[
"
$CI_COMMIT_REF_NAME
"
==
master
]]
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment