Skip to content

Commit

Permalink
ci: add capability to handle container initialisation steps to sync.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Fotis Koutoulakis (@NlightNFotis) committed Dec 5, 2024
1 parent 78be2f1 commit 9c48c8b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
30 changes: 11 additions & 19 deletions .github/workflows/__test-proxy.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion pr-checks/checks/test-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions pr-checks/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ def writeHeader(checkStream):
},
]

# 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 = {
Expand Down

0 comments on commit 9c48c8b

Please sign in to comment.