Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-julialib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-julialib
Commits
da47a89a
Commit
da47a89a
authored
3 years ago
by
Florian Spreckelsen
Committed by
Henrik tom Wörden
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
TST: Add CI infrastructure for integration testing
parent
96fca3b0
No related branches found
No related tags found
1 merge request
!3
TST: Add CI infrastructure for integration testing
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.docker/Dockerfile
+8
-1
8 additions, 1 deletion
.docker/Dockerfile
.docker/install_cpplib.sh
+7
-1
7 additions, 1 deletion
.docker/install_cpplib.sh
.gitlab-ci.yml
+73
-2
73 additions, 2 deletions
.gitlab-ci.yml
docs/src/index.md
+1
-1
1 addition, 1 deletion
docs/src/index.md
with
89 additions
and
5 deletions
.docker/Dockerfile
+
8
−
1
View file @
da47a89a
FROM
julia:1.6
RUN
echo
'deb http://deb.debian.org/debian buster-backports main'
>
/etc/apt/sources.list.d/buster-backports.list
RUN
apt-get update
&&
apt-get
install
-y
git python3-pip
RUN
apt-get update
RUN
apt-get
install
-y
cmake/buster-backports
RUN
apt-get
install
-y
git
RUN
apt-get
install
-y
python3-pip
RUN
apt-get
install
-y
curl
# Dirty workaround for java not linking to the correct manpage directory (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199)
RUN
mkdir
-p
/usr/share/man/man1
RUN
apt-get
install
-y
openjdk-11-jdk-headless
RUN
pip3
install
conan
This diff is collapsed.
Click to expand it.
.docker/install_cpplib.sh
+
7
−
1
View file @
da47a89a
...
...
@@ -2,7 +2,13 @@
git clone https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib.git
cd
caosdb-cpplib
git checkout f-extern-c
# check if there is a crooesponding cpp branch. Use the default branch
# if there isn't.
if
(
git show-ref
--verify
--quiet
refs/heads/
$CI_COMMIT_REF_NAME
)
;
then
git checkout
$CI_COMMIT_REF_NAME
else
git checkout
$CPP_DEFAULT_BRANCH
fi
git submodule update
--init
--recursive
mkdir
build
cd
build
...
...
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
73
−
2
View file @
da47a89a
...
...
@@ -16,14 +16,39 @@
variables
:
JULIALIB_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb/src/caosdb-julialib/testenv:$CI_COMMIT_REF_NAME
JULIAINTTEST_PIPELINE
:
https://gitlab.indiscale.com/api/v4/projects/120/trigger/pipeline
JULIAINTTEST_BRANCHES
:
https://gitlab.indiscale.com/api/v4/projects/120/repository/branches
GIT_SUBMODULE_STRATEGY
:
normal
TRIGGERED_BY_REPO
:
JULIALIB
TRIGGERED_BY_REF
:
$CI_COMMIT_REF_NAME
TRIGGERED_BY_HASH
:
$CI_COMMIT_SHORT_SHA
# The defalt branch to use with caosdb-cpplib
CPP_DEFAULT_BRANCH
:
f-extern-c
image
:
$JULIALIB_REGISTRY_IMAGE
stages
:
-
info
-
code-style
-
setup
-
test
-
deploy
# Print debugging info
info
:
tags
:
[
cached-dind
]
image
:
docker:20.10
stage
:
info
needs
:
[]
script
:
-
echo "Pipeline triggered by $TRIGGERED_BY_REPO@$TRIGGERED_BY_REF ($TRIGGERED_BY_HASH)"
-
echo "$JULIALIB_REGISTRY_IMAGE"
-
echo "$JULIAINTTEST_PIPELINE"
-
echo "$JULIAINTTEST_BRANCHES"
-
echo "$GIT_SUBMODULE_STRATEGY"
# Only check style for Julia 1.6 since support for 1.0 may be dropped anyway
code-style
:
stage
:
code-style
...
...
@@ -98,7 +123,11 @@ test:
# parsing` textfield.
# Example documentation deployment
pages
:
# Prepare documentation for deployment but only deploy it when run on
# main branch
.pages_prepare
:
&pages_prepare
tags
:
[
docker
]
stage
:
deploy
script
:
...
...
@@ -106,11 +135,53 @@ pages:
-
julia -e 'using Pkg; import CaosDB; Pkg.add("Documenter")'
# install Documenter
-
julia --color=yes docs/make.jl
# make documentation
-
mv docs/build public
# move to the directory picked up by Gitlab pages
pages
:
<<
:
*pages_prepare
artifacts
:
paths
:
-
public
only
:
-
main
refs
:
-
main
test_pages
:
<<
:
*pages_prepare
except
:
refs
:
-
main
# trigger the integration tests
trigger_inttest
:
tags
:
[
docker
]
stage
:
deploy
script
:
## Determine the juliainttest branch...
# ... use an f-branch if posible...
-
if echo "$CI_COMMIT_REF_NAME" | grep -c "^f-" ; then
JULIAINT_REF=$CI_COMMIT_REF_NAME ;
fi;
# ... or use main if possible...
-
if [[ "$CI_COMMIT_REF_NAME" == "main" ]] ; then
JULIAINT_REF=main ;
fi
# ... and fall-back to dev
-
JULIAINT_REF=${JULIAINT_REF:-dev}
-
F_BRANCH=$CI_COMMIT_REF_NAME
-
echo "Triggering caosdb-juliainttest@${JULIAINT_REF} (F_BRANCH=$F_BRANCH)"
-
curl -w "%{stderr}HTTPCODE=%{http_code}" -X POST
-F token=$CI_JOB_TOKEN
-F "variables[TRIGGERED_BY_REPO]=$TRIGGERED_BY_REPO"
-F "variables[TRIGGERED_BY_REF]=$TRIGGERED_BY_REF"
-F "variables[TRIGGERED_BY_HASH]=$TRIGGERED_BY_HASH"
-F "variables[JULIALIB_REGISTRY_IMAGE]=$JULIALIB_REGISTRY_IMAGE"
-F "variables[F_BRANCH]=${F_BRANCH}"
-F ref=${JULIAINT_REF} $JULIAINTTEST_PIPELINE 2>HTTPCODE
# fail if the request failed
-
grep -c "HTTPCODE=2" HTTPCODE
# WARNING: This template is using the `julia` images from [Docker
# Hub][3]. One can use custom Julia images and/or the official ones
...
...
This diff is collapsed.
Click to expand it.
docs/src/index.md
+
1
−
1
View file @
da47a89a
...
...
@@ -6,7 +6,7 @@ library.
Manually add a docstring here:
```
@docs
CaosDB.Utility.get_env_var(
var, default
)
CaosDB.Utility.get_env_var(
::AbstractString, ::AbstractString
)
```
...
...
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