Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
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-cpplib
Commits
3e34abaa
Commit
3e34abaa
authored
2 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Plain Diff
Merge branch 'f-trigger' into 'dev'
Use "trigger" keyword for pipeline. See merge request
!38
parents
984b4791
e6cf68ec
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!42
Release 0.2.0
,
!38
Use "trigger" keyword for pipeline.
Pipeline
#25437
passed
2 years ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Pipeline: caosdb-cppinttest
#25444
Changes
1
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+37
-18
37 additions, 18 deletions
.gitlab-ci.yml
with
37 additions
and
18 deletions
.gitlab-ci.yml
+
37
−
18
View file @
3e34abaa
#
#
# This file is a part of the CaosDB Project.
# This file is a part of the CaosDB Project.
#
#
# Copyright (C) 2019-202
1
Indiscale GmbH <info@indiscale.com>
# Copyright (C) 2019-202
2
Indiscale GmbH <info@indiscale.com>
# Copyright (C) 2019 Henrik tom Wörden <h.tomwoerden@indiscale.com>
# Copyright (C) 2019 Henrik tom Wörden <h.tomwoerden@indiscale.com>
# Copyright (C) 2020 Daniel Hornung <d.hornung@indiscale.com>
# Copyright (C) 2020
-2022
Daniel Hornung <d.hornung@indiscale.com>
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
variables
:
variables
:
CPPLIB_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb/src/caosdb-cpplib/testenv:$CI_COMMIT_REF_NAME
CPPLIB_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb/src/caosdb-cpplib/testenv:$CI_COMMIT_REF_NAME
CPPINTTEST_PIPELINE
:
https://gitlab.indiscale.com/api/v4/projects/111/trigger/pipeline
CPPINTTEST_BRANCHES
:
https://gitlab.indiscale.com/api/v4/projects/111/repository/branches
CPPINTTEST_BRANCHES
:
https://gitlab.indiscale.com/api/v4/projects/111/repository/branches
GIT_SUBMODULE_STRATEGY
:
normal
GIT_SUBMODULE_STRATEGY
:
normal
...
@@ -32,6 +31,9 @@ variables:
...
@@ -32,6 +31,9 @@ variables:
TRIGGERED_BY_REF
:
$CI_COMMIT_REF_NAME
TRIGGERED_BY_REF
:
$CI_COMMIT_REF_NAME
TRIGGERED_BY_HASH
:
$CI_COMMIT_SHORT_SHA
TRIGGERED_BY_HASH
:
$CI_COMMIT_SHORT_SHA
# For storing cross-job environment variables
DOTENV
:
custom.env
image
:
$CPPLIB_REGISTRY_IMAGE
image
:
$CPPLIB_REGISTRY_IMAGE
...
@@ -92,12 +94,11 @@ test:
...
@@ -92,12 +94,11 @@ test:
-
cmake --build . -j --target cxxcaosdbcli
-
cmake --build . -j --target cxxcaosdbcli
# - cmake --build . -j --target ccaosdbcli # Disabled until it compiles again.
# - cmake --build . -j --target ccaosdbcli # Disabled until it compiles again.
#
trigger
the integration tests
trigger
_prepare
:
trigger_inttest
:
# Calculate the branch name
tags
:
[
docker
]
tags
:
[
docker
]
stage
:
deploy
stage
:
deploy
script
:
script
:
## Determine the cppinttest branch...
## Determine the cppinttest branch...
# ... use an f-branch if posible...
# ... use an f-branch if posible...
-
F_BRANCH=dev
-
F_BRANCH=dev
...
@@ -122,18 +123,36 @@ trigger_inttest:
...
@@ -122,18 +123,36 @@ trigger_inttest:
# ... and fall-back to dev
# ... and fall-back to dev
-
CPPINT_REF=${CPPINT_REF:-dev}
-
CPPINT_REF=${CPPINT_REF:-dev}
-
echo "Triggering caosdb-cppinttest@${CPPINT_REF} (F_BRANCH=$F_BRANCH)"
# Write to dotenv
-
curl -w "%{stderr}HTTPCODE=%{http_code}" -X POST
-
echo "CPPINT_REF=${CPPINT_REF}" >> "$DOTENV"
-F token=$CI_JOB_TOKEN
-
echo "F_BRANCH=${F_BRANCH}" >> "$DOTENV"
-F "variables[TRIGGERED_BY_REPO]=$TRIGGERED_BY_REPO"
-
cat "$DOTENV"
-F "variables[TRIGGERED_BY_REF]=$TRIGGERED_BY_REF"
artifacts
:
-F "variables[TRIGGERED_BY_HASH]=$TRIGGERED_BY_HASH"
# this special artifact will be loaded in the next job and make the environment variables available
-F "variables[CPPLIB_REGISTRY_IMAGE]=$CPPLIB_REGISTRY_IMAGE"
reports
:
-F "variables[F_BRANCH]=${F_BRANCH}"
dotenv
:
"
$DOTENV"
-F ref=${CPPINT_REF} $CPPINTTEST_PIPELINE 2>HTTPCODE
expire_in
:
1 day
# fail if the request failed
-
grep -c "HTTPCODE=2" HTTPCODE
# trigger the integration tests
trigger_inttest
:
stage
:
deploy
needs
:
[
trigger_prepare
]
inherit
:
variables
:
# List the variables that shall be inherited, which also means they will override any equally
# named varibles in child pipelines.
-
TRIGGERED_BY_REPO
-
TRIGGERED_BY_REF
-
TRIGGERED_BY_HASH
-
CPPLIB_REGISTRY_IMAGE
variables
:
# dotenv variables must be set again here.
F_BRANCH
:
$F_BRANCH
trigger
:
project
:
caosdb/src/caosdb-cppinttest
branch
:
$CPPINT_REF
strategy
:
depend
# Build the sphinx documentation and make it ready for deployment by Gitlab Pages
# Build the sphinx documentation and make it ready for deployment by Gitlab Pages
# Special job for serving a static website. See https://docs.gitlab.com/ee/ci/yaml/README.html#pages
# Special job for serving a static website. See https://docs.gitlab.com/ee/ci/yaml/README.html#pages
...
...
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