tests: Test the ci-package-builder pipeline
Set up a test repository and run the ci-package-builder pipeline on it by committing new changes, creating merge requests and monitoring the resulting pipelines.
The test currently checks:
- submitting non-release changes and landing them
- submitting release commits and landing them
- blocking commits to frozen stable branches
This pipeline needs some extra setup:
- a tests/dash> repository, forked from pkg/target/dash>, where we force-push changes, create merge requests and monitor pipelines
- the
OBS_PEFIX
CI variable to be set on tests/dash> to point to throwaway OBS branches to test the upload and monitorig jobs, for instancehome:apertis-gitlab:branches:test:
- the
GITLAB_CI_USER
,GITLAB_CI_PASSWORD
,OSC_USERNAME
andOSC_PASSWORD
CI variables to be set on tests/dash>, matching what it is used on the pkg/ projects - the
GITLAB_AUTH_TOKEN
CI variable to be set on this repository to access the GitLab APIs used to issue MRs and monitor pipelines, and to push changes via git to the tests/dash> repository
Another extra bit of configuration was needed to be able to run the pipeline from non-default branches:
- open https://gitlab.apertis.org/admin/application_settings/network#js-outbound-settings
- enable
Allow requests to the local network from web hooks and services
- add
gitlab.apertis.org
to the allowlist
Merge request reports
Activity
- Resolved by Emanuele Aina
At the momement I'm still using em/dash> rather than tests/dash> and home:em:branches:apertis:v2021dev3:target/home:em:branches:apertis:v2021dev3:target:snapshots.
Those needs to be switched to something more appropriate before landing this MR.
- Resolved by Emanuele Aina
Oh, there is another reason this is WIP: for testing I've enabled this on non-master branches but it should be disabled becausethe--ci-config-path
I'm setting points to the default branch. Update: I have disabled it already as it led to unwanted uploads to the real v2021dev3 archives, em/ci-package-builder> can be used instead to see how the pipeline works.The syntax currently does not allow to specify another branch (upstream issue #195484).
I've also tested with full URLs pointing to the raw file, but:
- HTTPS URLs do not work as the HTTPS connection is terminated outside of the Omnibus container so it tries to connect to itself and it fails
- HTTP URLs do not work as it complains about connecting to localhost, but there's a way to solve that:
- open https://gitlab.apertis.org/admin/application_settings/network#js-outbound-settings
- enable "Allow requests to the local network from web hooks and services"
- add gitlab.apertis.org to the allowlist
- PROFIT! (in the sense that the http reference works)
@sjoerd, would it be ok to set up things as described above?
Edited by Emanuele Aina
mentioned in merge request !69 (merged)
mentioned in merge request !77 (merged)
- Resolved by Emanuele Aina
Another good thing to do is to use a different OBS user for the tests/dash> scratch repository, so we don't end up actually uploading to v2021dev3. Any resemblance to actual events is purely coincidental.
- Resolved by Emanuele Aina
Overall this looks weeee; Didn't look thorugh it in a lot of details but seems sensible.. The pipeline output has quite a bit of debug output which doesn't seem useful making it hard to parse.