ci: add capability to handle container initialisation steps to sync.py
This commit is contained in:
parent
78be2f1333
commit
9c48c8bf18
3 changed files with 28 additions and 20 deletions
|
|
@ -4,7 +4,17 @@ versions: ["linked", "nightly-latest"]
|
|||
operatingSystems: ["ubuntu"]
|
||||
container:
|
||||
image: ubuntu:22.04
|
||||
options: --dns 127.0.0.1
|
||||
options: --dns 8.8.8.8
|
||||
container-init-steps:
|
||||
name: Set up GitHub CLI
|
||||
run: |
|
||||
apt update
|
||||
apt install -y curl libreadline8 gnupg2 software-properties-common zstd
|
||||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||
apt-key add /usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||
apt-add-repository https://cli.github.com/packages
|
||||
apt install -y gh
|
||||
env: {}
|
||||
services:
|
||||
squid-proxy:
|
||||
image: ubuntu/squid:latest
|
||||
|
|
|
|||
|
|
@ -124,6 +124,12 @@ for file in (this_dir / 'checks').glob('*.yml'):
|
|||
},
|
||||
]
|
||||
|
||||
# If container initialisation steps are present in the check specification,
|
||||
# make sure to execute them first.
|
||||
if 'container' in checkSpecification and 'container-init-steps' in checkSpecification:
|
||||
steps.insert(0, checkSpecification['container-init-steps'])
|
||||
|
||||
|
||||
steps.extend(checkSpecification['steps'])
|
||||
|
||||
checkJob = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue