Catch FileNotFoundError when netplan test config absent #44
Workflow file for this run
This file contains hidden or 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: checkbox-ce-oem snap edge build | ||
| permissions: | ||
| contents: read | ||
| on: | ||
| workflow_dispatch: | ||
| workflow_call: | ||
| secrets: | ||
| SNAPCRAFT7_CREDS: | ||
| required: true | ||
| GITHUB_TOKEN: | ||
|
Check failure on line 10 in .github/workflows/checkbox-ce-oem-edge-builds.yml
|
||
| required: true | ||
| jobs: | ||
| snap: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| type: [classic, uc] | ||
| releases: [20, 22, 24] | ||
| runs-on: | ||
| group: "Canonical self-hosted runners" | ||
| labels: | ||
| - self-hosted | ||
| - linux | ||
| - jammy | ||
| - large | ||
| - X64 | ||
| timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts | ||
| env: | ||
| SERIES: series_${{ matrix.type }}${{ matrix.releases }} | ||
| SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }} | ||
| # snapcraft remote-build will create a repository with the name decided by the --build-id arg | ||
| # URL to this repo echoed below to help debug builds (does not change if the workflow is re-run) | ||
| # as the run_id will not change | ||
| SNAPCRAFT_BUILDER_ID: checkbox-${{ matrix.type }}${{ matrix.releases }}-${{ github.run_id }} | ||
| name: Frontend ${{ matrix.type }}${{ matrix.releases }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Add LP credentials | ||
| run: | | ||
| mkdir -p ~/.local/share/snapcraft/provider/launchpad/ | ||
| echo '${{ secrets.LP_CREDS }}' > ~/.local/share/snapcraft/provider/launchpad/credentials | ||
| git config --global user.email "robot@lists.canonical.com" | ||
| git config --global user.name "Certification bot" | ||
| - name: Print Launchpad build repository | ||
| run: | | ||
| echo "Building at: https://git.launchpad.net/~ce-certification-qa/+snap/$SNAPCRAFT_BUILDER_ID" | ||
| - uses: Wandalen/wretry.action@v3.4.0_js_action | ||
| name: Building the snaps | ||
| timeout-minutes: 600 # 10hours | ||
| with: | ||
| action: Hook25/action-build@707dce252c4f367b6c1afe61ed577f7413cf7912 | ||
| attempt_delay: 600000 # 10min | ||
| attempt_limit: 5 | ||
| with: | | ||
| path: contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_${{ matrix.type }}${{ matrix.releases }} | ||
| snapcraft-channel: 7.x/stable | ||
| snapcraft-args: remote-build --build-for amd64,arm64,armhf --launchpad-accept-public-upload --build-id $SNAPCRAFT_BUILDER_ID | ||
| - uses: actions/upload-artifact@v4 | ||
| name: Upload logs on failure | ||
| if: failure() | ||
| with: | ||
| name: ce-oem-build-log-${{ matrix.type }}${{ matrix.releases }} | ||
| path: | | ||
| /home/runner/.cache/snapcraft/log/ | ||
| /home/runner/.local/state/snapcraft/log/ | ||
| contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_${{ matrix.type }}${{ matrix.releases }}/checkbox*.txt | ||
| - uses: actions/upload-artifact@v4 | ||
| name: Upload the snaps as artefacts | ||
| with: | ||
| name: ce_oem_snap${{ matrix.type }}${{ matrix.releases }} | ||
| path: contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_${{ matrix.type }}${{ matrix.releases }}/*.snap | ||
| - uses: Wandalen/wretry.action@v3.4.0_js_action | ||
| name: Upload the snaps to the store | ||
| timeout-minutes: 600 # 10hours | ||
| with: | ||
| attempt_delay: 600000 # 10min | ||
| attempt_limit: 10 | ||
| command: | | ||
| for snap in contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_${{ matrix.type }}${{ matrix.releases }}/*.snap ; \ | ||
| do \ | ||
| echo "Uploading $snap..." ; \ | ||
| if [ ${{ matrix.type }} = 'classic' ]; then \ | ||
| if [ ${{ matrix.releases }} = '24' ]; then \ | ||
| snapcraft upload $snap --release ${{ matrix.releases }}.04/edge,latest/edge ; \ | ||
| else \ | ||
| snapcraft upload $snap --release ${{ matrix.releases }}.04/edge ; \ | ||
| fi \ | ||
| else \ | ||
| snapcraft upload $snap --release ${{ matrix.type }}${{ matrix.releases }}/edge ; \ | ||
| fi ; \ | ||
| done | ||