Nested classic suite execution (20241101) #23327
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Jobs | |
on: | |
push: | |
branches: | |
- '**' # matches every branch | |
- '!master' # excludes master | |
jobs: | |
test: | |
runs-on: [self-hosted, spread-enabled] | |
steps: | |
- name: Ensure the workspace is clean | |
run: | | |
rm -rf "${{ github.workspace }}" | |
mkdir "${{ github.workspace }}" | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: master | |
- name: Run test | |
env: | |
SPREAD_USER_SA: ${{ secrets.SPREAD_USER_SA }} | |
IMAGE_BAKER_SA: ${{ secrets.IMAGE_BAKER_SA }} | |
LAUNCHPAD_ID_RSA: ${{ secrets.LAUNCHPAD_ID_RSA }} | |
LAUNCHPAD_COOKIES: ${{ secrets.LAUNCHPAD_COOKIES }} | |
S390X_ENDPOINT: ${{ secrets.S390X_ENDPOINT }} | |
S390X_SSH_KEY: ${{ secrets.S390X_SSH_KEY }} | |
run: | | |
BRANCH="${GITHUB_REF##*/}" | |
export PROJECT_PATH="$(pwd)" | |
export BRANCH_PATH="$PROJECT_PATH"/branches/"$BRANCH" | |
cd "$BRANCH_PATH" | |
if [[ "$BRANCH" == gce-update-* ]] || [[ "$BRANCH" == update-gce-* ]] || [[ "$BRANCH" == build-spread* ]] || [[ "$BRANCH" == build-ubuntu* ]]; then | |
echo "$IMAGE_BAKER_SA" > sa.json | |
fi | |
if [ "$BRANCH" = "build-snapd-snap" ]; then | |
echo "$IMAGE_BAKER_SA" > sa.json | |
fi | |
if [ "$BRANCH" = "snapd-vendor-sync" ]; then | |
echo "$LAUNCHPAD_ID_RSA" > target/tasks/snapd-vendor-sync/id_rsa | |
echo "$LAUNCHPAD_COOKIES" > target/tasks/snapd-vendor-sync/cookies.txt | |
fi | |
if [[ "$BRANCH" == *-s390x-* ]]; then | |
echo "$S390X_SSH_KEY" > s390x_key | |
chmod 0400 s390x_key | |
fi | |
./run-checks | |
- name: Cleanup job workspace after run tests | |
if: always() | |
run: | | |
rm -rf "${{ github.workspace }}" | |
mkdir "${{ github.workspace }}" |