Skip to content

create snapd snap after master is updated (14df48a469f6fee9e866e4a8de… #22498

create snapd snap after master is updated (14df48a469f6fee9e866e4a8de…

create snapd snap after master is updated (14df48a469f6fee9e866e4a8de… #22498

Workflow file for this run

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@v2
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 }}"