Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/scanner-db-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: ./.github/actions/job-preamble
with:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/start-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ jobs:
git switch --create "${{needs.variables.outputs.branch}}"
git commit --allow-empty --message \
"Empty commit to diverge ${{needs.variables.outputs.release}} from ${{env.main_branch}}"
- name: Verify VERSION file matches release
run: |
expected="${{needs.variables.outputs.release}}.x"
actual="$(cat VERSION 2>/dev/null || echo '')"
if [ "$actual" != "$expected" ]; then
echo "::error::VERSION file contains '$actual', expected '$expected'"
exit 1
fi
- name: Tag release branch with rc.0 ${{needs.variables.outputs.branch}}
run: |
git tag --annotate --message "Upstream automation" \
Expand Down Expand Up @@ -186,6 +194,26 @@ jobs:
git switch "${{needs.variables.outputs.branch}}"
# This command pushes all new tags, not just the ones on the current branch. Therefore, it will push the tag we put on ${{env.main_branch}}.
git push --follow-tags --set-upstream origin "${{needs.variables.outputs.branch}}"
- name: Create PR to update VERSION on ${{env.main_branch}}
if: env.DRY_RUN == 'false' && steps.check-existing.outputs.branch-exists == 'false'
env:
GH_TOKEN: "${{ secrets.RHACS_BOT_GITHUB_TOKEN }}"
run: |
branch="automation/update-version-${{needs.variables.outputs.next-minor-release}}"
git switch ${{env.main_branch}}
git pull origin --rebase ${{env.main_branch}}
git switch --create "$branch"
echo "${{needs.variables.outputs.next-minor-release}}.x" > VERSION
git add VERSION
git commit --message "chore: update VERSION to ${{needs.variables.outputs.next-minor-release}}.x"
git push --set-upstream origin "$branch"
gh pr create \
--base ${{env.main_branch}} \
--head "$branch" \
--title "chore: update VERSION to ${{needs.variables.outputs.next-minor-release}}.x" \
--body "Automated VERSION update from release ${{needs.variables.outputs.release}}." \
--reviewer "${{github.actor}}" \
--label "area/ci"

ci:
name: Configure OpenShift CI jobs
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- uses: ./.github/actions/job-preamble
Expand Down Expand Up @@ -65,7 +64,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-depth: 0 # misc-checks needs full history for git diff --check
ref: ${{ github.event.pull_request.head.sha }}

- uses: ./.github/actions/job-preamble
Expand Down Expand Up @@ -117,7 +116,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- uses: ./.github/actions/job-preamble
Expand Down Expand Up @@ -302,7 +300,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- uses: ./.github/actions/job-preamble
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: ./.github/actions/job-preamble
with:
Expand Down Expand Up @@ -108,8 +106,6 @@ jobs:

- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: ./.github/actions/job-preamble
with:
Expand Down Expand Up @@ -168,8 +164,6 @@ jobs:

- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: ./.github/actions/job-preamble
with:
Expand Down Expand Up @@ -294,7 +288,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- uses: ./.github/actions/job-preamble
Expand Down Expand Up @@ -335,7 +328,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- uses: ./.github/actions/job-preamble
Expand Down Expand Up @@ -369,7 +361,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- uses: ./.github/actions/job-preamble
Expand All @@ -388,8 +379,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v6
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.11.x
2 changes: 1 addition & 1 deletion make/env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TAG := $(BUILD_TAG)
endif

ifeq ($(TAG),)
TAG=$(shell git describe --tags --abbrev=10 --dirty --long --exclude '*-nightly-*')
TAG=$(shell git describe --tags --abbrev=10 --dirty --long --exclude '*-nightly-*' || cat VERSION || echo "0.0.0")
endif

# Set expiration on Quay.io for non-release tags.
Expand Down
2 changes: 1 addition & 1 deletion tests/roxctl/bats-tests/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ any_version='[0-9]+\.[0-9]+\.'

delete-outdated-binaries() {
local roxctl_ver="${1}"
current_tag="$(git describe --tags --abbrev=10 --dirty --long --exclude '*-nightly-*')"
current_tag="$(git describe --tags --abbrev=10 --dirty --long --exclude '*-nightly-*' || cat VERSION || echo '0.0.0')"
echo "Roxctl version='${roxctl_ver}'" >&3
echo "Current tag ='${current_tag}'" >&3
if [[ "${current_tag}" != "${roxctl_ver}" ]]; then
Expand Down
Loading