Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add cross project pipelines #567

Merged
merged 60 commits into from
Jan 23, 2024
Merged
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e63d247
use new trigger method
marcvs Jan 16, 2024
1b54304
trigger ci
marcvs Jan 16, 2024
45e9308
Hardcode image for triggering parent job
marcvs Jan 16, 2024
13f65ea
Define the trigger token
marcvs Jan 17, 2024
a1a1815
retrigger ci
marcvs Jan 17, 2024
70c1869
define trigger token in trigger job
marcvs Jan 17, 2024
4ee569c
retrigger ci
marcvs Jan 17, 2024
e37a7e1
Trigger proper project
marcvs Jan 17, 2024
5fcf404
retrigger ci
marcvs Jan 17, 2024
0cb90e6
Comment rules, which might confuse the Trigger Branch
marcvs Jan 17, 2024
a0d0f40
retrigger ci
marcvs Jan 17, 2024
b8dc1a9
retrigger ci
marcvs Jan 17, 2024
99b076b
Use rules to define TRIGGER_BRANCH
marcvs Jan 17, 2024
566aa0b
Pass KI_OIDC_PIPELINE_ID
marcvs Jan 17, 2024
d96def1
fix call to trigger_pipeline
marcvs Jan 18, 2024
93c76b8
define image and move installer to build
marcvs Jan 18, 2024
955274a
Better detection of master branch
marcvs Jan 18, 2024
90597ec
retrigger ci
marcvs Jan 18, 2024
1e45f5f
retrigger ci
marcvs Jan 18, 2024
064f613
make debug output more true
marcvs Jan 19, 2024
8603066
Follow ci-voodoo 8e8843f
marcvs Jan 19, 2024
ef523ac
Follow ci-voodoo 86cbd08
marcvs Jan 19, 2024
2ff36d9
Follow ci-voodoo 86cbd08 more debug
marcvs Jan 19, 2024
80cbb25
ci-voodoo: 85cb918 more precise debug
marcvs Jan 19, 2024
692c281
ci-voodoo: 2d32b68 lots of debug
marcvs Jan 19, 2024
1c1d65f
ci-voodoo: ee86452 Define urlencode
marcvs Jan 19, 2024
0a4244f
ci-voodoo: 4d73e13 something strange is happening
marcvs Jan 19, 2024
66c2f47
ci-voodoo: 3947ad4 see output
marcvs Jan 19, 2024
55ccefe
ci-voodoo: 04c48ae dont show jq
marcvs Jan 19, 2024
cec7398
ci-voodoo: 20b9592 no >><<
marcvs Jan 19, 2024
2867969
ci-voodoo: 20b9592 no >><<
marcvs Jan 22, 2024
e96da5d
ci-voodoo: 20b9592 no >><<
marcvs Jan 22, 2024
2b9ca31
ci-voodoo: 22b55a1 Test >>
marcvs Jan 22, 2024
ce2d2f0
ci-voodoo: d37962d remove one silly debug with another one
marcvs Jan 22, 2024
c4e1f62
ci-voodoo: 3c7d5f8 Answer with other sillyness
marcvs Jan 22, 2024
e9e8d17
ci-voodoo: 0af748a Remove trash
marcvs Jan 22, 2024
586be9a
ci-voodoo: b3868af Sillyness overload
marcvs Jan 22, 2024
345af53
ci-voodoo: 9130a1f more debug
marcvs Jan 22, 2024
ac19ebb
ci-voodoo: 20603cf test commit
marcvs Jan 22, 2024
1121a89
ci-voodoo: 378fdf8 Fix output trouble on windows
marcvs Jan 22, 2024
5d385d9
ci-voodoo: c2a66c8 Add better debug
marcvs Jan 22, 2024
2363011
ci-voodoo: ea602b2 sort prj and proj
marcvs Jan 22, 2024
bf3bdad
ci-voodoo: decbdfb Set helper variables to "" after use
marcvs Jan 22, 2024
e6b21bb
remove useless trash
marcvs Jan 22, 2024
6d089eb
prepare win-installer job to provide data for artifact download
marcvs Jan 22, 2024
a061237
get artifacts back from triggered job
marcvs Jan 22, 2024
4927ac7
Define Trigger token!
marcvs Jan 22, 2024
632f7f7
define get-artifacts
marcvs Jan 23, 2024
09cfebb
ci-voodoo: 736d0ab also run, when not triggered
marcvs Jan 23, 2024
a8f9e6a
use parameters everywhere
marcvs Jan 23, 2024
5c28e86
Final cleanup
marcvs Jan 23, 2024
8039d00
Use ci-voodoo/master
marcvs Jan 23, 2024
e3ddedd
prefix triggering jobs with trigger:
marcvs Jan 23, 2024
88b1c1a
Change trigger prefix separator to :
marcvs Jan 23, 2024
f01be61
Adapt needs
marcvs Jan 23, 2024
f75f986
ci-voodoo: a8a9503 enable debug
marcvs Jan 23, 2024
b615522
Remove trigger- marks
marcvs Jan 23, 2024
41b775a
Remove trigger marks
marcvs Jan 23, 2024
a517462
re-add trigger marks
marcvs Jan 23, 2024
649ccee
Merge branch 'prerel' into ci/add-parent-child
marcvs Jan 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 64 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ variables:
DOCKER_IMAGE_NAME: 'oidc-agent'
GIT_STRATEGY: clone
GIT_DEPTH: 0
# KI_OIDC_TRIGGER_TOKEN: glptt-c5d04fbd30ad088fcacdaadc90c974e18f35ecee
# TARGET_REPO: 'devel'
# The following varialbes can be overwritten only in specific targets
# See generic-ci.yml -> .repo-definition for the full list
Expand Down Expand Up @@ -82,4 +83,66 @@ build-windows-64:
make -j 1 win
ls -la bin

set +x
trigger-ki-oidc-plugin:
stage: build
image: marcvs/build_oidc-agent_debian-trixie
needs:
- build-windows-64
- build-windows-lib-64
rules:
- if: $CI_PIPELINE_SOURCE != "push" && $CI_PIPELINE_SOURCE != "web"
when: never
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event"
variables:
TRIGGER_BRANCH: main
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
variables:
TRIGGER_BRANCH: main
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
variables:
TRIGGER_BRANCH: devel
script:
- !reference [.def-trigger-pipeline]
- |
trigger_pipeline --project-name m-team/oidc/ssh/ki-oidc-plugin\
--branch ${TRIGGER_BRANCH} \
--trigger-token ${TRIGGER_TOKEN_KI_OIDC_PLUGIN}
echo "KI_OIDC_PIPELINE_ID=${TRIGGERED_PIPELINE_ID}" >> ki-oidc-plugin.env
artifacts:
reports:
dotenv: ki-oidc-plugin.env

trigger-win-installer:
stage: build
image: marcvs/build_oidc-agent_debian-trixie
needs:
- build-windows-64
- trigger-ki-oidc-plugin
rules:
- if: $CI_PIPELINE_SOURCE != "push" && $CI_PIPELINE_SOURCE != "web"
when: never
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event"
variables:
TRIGGER_BRANCH: main
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
variables:
TRIGGER_BRANCH: main
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
variables:
TRIGGER_BRANCH: devel # TODO change back to devel if 5 is merged
script:
- !reference [.def-trigger-pipeline]
- !reference [.def-get-artifacts]
- |
echo "KI_OIDC_PIPELINE_ID: ${KI_OIDC_PIPELINE_ID}"
trigger_pipeline \
--project-name "m-team/oidc/oidc-agent-win-installer" \
--branch ${TRIGGER_BRANCH} \
--KI_OIDC_PIPELINE_ID ${KI_OIDC_PIPELINE_ID} \
--trigger-token ${TRIGGER_TOKEN_WIN_INSTALLER}
get_artifacts --upstream-project-name "m-team/oidc/oidc-agent-win-installer" \
--upstream-job-name "build-windows-64" \
--upstream-pipeline-id ${TRIGGERED_PIPELINE_ID}
artifacts:
paths:
- "results/*"
Loading