-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render the templates for LTSS code streams but don't build them on OBS
This fixes #1087
- Loading branch information
Showing
3 changed files
with
68 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,20 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
no_build: | ||
- false | ||
os_version: | ||
- 6 | ||
- 5 | ||
- 6 | ||
- Tumbleweed | ||
- Basalt | ||
|
||
include: | ||
- os_version: 3 | ||
no_build: true | ||
- os_version: 4 | ||
no_build: true | ||
|
||
steps: | ||
# we need all branches for the build checks | ||
- uses: actions/checkout@v4 | ||
|
@@ -82,7 +90,7 @@ jobs: | |
--os-version ${{ matrix.os_version }} \ | ||
--branch-name="${{ matrix.os_version }}-${{ github.event.pull_request.number }}" \ | ||
-vvvv \ | ||
scratch_build \ | ||
${{ matrix.no_build && 'commit_state' || 'scratch_build' }} \ | ||
--commit-message='Test build for #${{ github.event.pull_request.number }}' \ | ||
| tee info | ||
if grep -q "No changes" info; then | ||
|
@@ -103,19 +111,20 @@ jobs: | |
issue-number: ${{ github.event.pull_request.number }} | ||
# !!! if you change the body, then you must adjust StagingBot.from_github_comment() !!! | ||
body: | | ||
Created a staging project on OBS for ${{ matrix.os_version }}: [${{ env.PROJECT_NAME }}](${{ env.PROJECT_URL }}) | ||
Rendered the templates for ${{ matrix.os_version }} | ||
Changes pushed to branch [`${{ env.BRANCH_NAME }}`](https://github.com/SUSE/BCI-dockerfile-generator/tree/${{ env.BRANCH_NAME }}) as commit [`${{ env.DEPLOYMENT_COMMIT_HASH }}`](https://github.com/SUSE/BCI-dockerfile-generator/commit/${{ env.DEPLOYMENT_COMMIT_HASH }}) | ||
${{ matrix.no_build && '' || format('Created a staging project on OBS: [{0}]({1})', env.PROJECT_NAME, env.PROJECT_URL) }} | ||
- name: wait for the build to finish | ||
run: poetry run scratch-build-bot -vvvv wait | ||
env: | ||
OSC_PASSWORD: ${{ secrets.OSC_PASSWORD }} | ||
OSC_USER: "defolos" | ||
if: env.no_change != 'true' | ||
if: ${{ (env.no_change != 'true') && (! matrix.no_build) }} | ||
|
||
- name: Install crane to list images on the registry | ||
uses: imjasonh/[email protected] | ||
if: env.no_change != 'true' | ||
if: ${{ (env.no_change != 'true') && (! matrix.no_build) }} | ||
|
||
- name: retrieve the build result | ||
run: | | ||
|
@@ -147,10 +156,10 @@ jobs: | |
env: | ||
OSC_PASSWORD: ${{ secrets.OSC_PASSWORD }} | ||
OSC_USER: "defolos" | ||
if: env.no_change != 'true' | ||
if: ${{ (env.no_change != 'true') && (! matrix.no_build) }} | ||
|
||
- name: report the finished build | ||
if: env.no_change != 'true' | ||
if: ${{ (env.no_change != 'true') && (! matrix.no_build) }} | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
|
@@ -164,7 +173,7 @@ jobs: | |
env: | ||
OSC_PASSWORD: ${{ secrets.OSC_PASSWORD }} | ||
OSC_USER: "defolos" | ||
if: env.no_change != 'true' | ||
if: ${{ (env.no_change != 'true') && (! matrix.no_build) }} | ||
|
||
- name: cleanup the branches if no functional changes were commited or the build was cancelled | ||
run: poetry run scratch-build-bot -vvvv -l cleanup | ||
|
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
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