Skip to content
Merged
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
5 changes: 1 addition & 4 deletions .github/workflows/build-openstack-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
name: openstack operator image builder

on:
push:
branches:
- '*'

env:
imageregistry: 'quay.io'
imagenamespace: ${{ secrets.IMAGENAMESPACE || secrets.QUAY_USERNAME }}
latesttag: latest

jobs:
call-build-workflow:
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/reusable-build-operator.yaml@main
Expand All @@ -18,7 +15,7 @@ jobs:
go_version: 1.24.x
operator_sdk_version: 1.41.1
bundle_dockerfile: ./bundle.Dockerfile
operator_version: 0.5.0
operator_version: 0.6.0
secrets:
IMAGENAMESPACE: ${{ secrets.IMAGENAMESPACE }}
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
Expand Down
131 changes: 58 additions & 73 deletions .github/workflows/catalog-openstack-operator-upgrades.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: Build catalog for OLM upgrade testing

on:

workflow_dispatch:
branches:
- '*'

workflow_run:
workflows: ["openstack operator image builder"]
types:
Expand All @@ -23,81 +20,69 @@ on:
required: true
REDHATIO_PASSWORD:
required: true

env:
imageregistry: 'quay.io'
imagenamespace: ${{ secrets.IMAGENAMESPACE || secrets.QUAY_USERNAME }}
latesttag: latest

jobs:
build-catalog:
runs-on: ubuntu-latest

steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ inputs.go_version }}
cache: false

- name: Checkout openstack-operator repository
uses: actions/checkout@v4
with:
path: ./openstack-operator

- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v9

- name: Set latest tag for non main branch
if: "${{ steps.branch-name.outputs.current_branch != 'main' }}"
run: |
echo "latesttag=${{ steps.branch-name.outputs.current_branch }}-latest" >> $GITHUB_ENV

- name: Install opm
uses: redhat-actions/openshift-tools-installer@v1
with:
source: github
opm: 'latest'

- name: Log in to Quay Registry
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.imageregistry }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Log in to Red Hat Registry
uses: redhat-actions/podman-login@v1
with:
registry: registry.redhat.io
username: ${{ secrets.REDHATIO_USERNAME }}
password: ${{ secrets.REDHATIO_PASSWORD }}

- name: Create the catalog index
shell: bash
run: ./openstack-operator/hack/catalog-build-olm-upgrade.sh
env:
#FIXME: these should be pulled from a YAML config in the main operator directory?
MAIN_VERSION: 0.5.0
FEATURE_RELEASE_VERSION: 0.4.0
FEATURE_RELEASE_BRANCH: 18.0-fr4
BUNDLE: ${{ env.imageregistry }}/${{ env.imagenamespace }}/openstack-operator-bundle:${{ github.sha }}

- name: Buildah Action
id: build-operator-index-upgrade
uses: redhat-actions/buildah-build@v2
with:
image: openstack-operator-index-upgrade
tags: ${{ env.latesttag }} ${{ github.sha }}
containerfiles: |
./catalog.Dockerfile

- name: Push openstack-operator-index-upgrade To ${{ env.imageregistry }}
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-operator-index-upgrade.outputs.image }}
tags: ${{ steps.build-operator-index-upgrade.outputs.tags }}
registry: ${{ env.imageregistry }}/${{ env.imagenamespace }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ inputs.go_version }}
cache: false
- name: Checkout openstack-operator repository
uses: actions/checkout@v4
with:
path: ./openstack-operator
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v9
- name: Set latest tag for non main branch
if: "${{ steps.branch-name.outputs.current_branch != 'main' }}"
run: |
echo "latesttag=${{ steps.branch-name.outputs.current_branch }}-latest" >> $GITHUB_ENV
- name: Install opm
uses: redhat-actions/openshift-tools-installer@v1
with:
source: github
opm: 'latest'
- name: Log in to Quay Registry
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.imageregistry }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Log in to Red Hat Registry
uses: redhat-actions/podman-login@v1
with:
registry: registry.redhat.io
username: ${{ secrets.REDHATIO_USERNAME }}
password: ${{ secrets.REDHATIO_PASSWORD }}
- name: Create the catalog index
shell: bash
run: ./openstack-operator/hack/catalog-build-olm-upgrade.sh
env:
#FIXME: these should be pulled from a YAML config in the main operator directory?
MAIN_VERSION: 0.6.0
FEATURE_RELEASE_VERSION: 0.5.0
FEATURE_RELEASE_BRANCH: 18.0-fr5
BUNDLE: ${{ env.imageregistry }}/${{ env.imagenamespace }}/openstack-operator-bundle:${{ github.sha }}
- name: Buildah Action
id: build-operator-index-upgrade
uses: redhat-actions/buildah-build@v2
with:
image: openstack-operator-index-upgrade
tags: ${{ env.latesttag }} ${{ github.sha }}
containerfiles: |
./catalog.Dockerfile
- name: Push openstack-operator-index-upgrade To ${{ env.imageregistry }}
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-operator-index-upgrade.outputs.image }}
tags: ${{ steps.build-operator-index-upgrade.outputs.tags }}
registry: ${{ env.imageregistry }}/${{ env.imagenamespace }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 0.5.0
VERSION ?= 0.6.0

OPENSTACK_RELEASE_VERSION ?= $(VERSION)-$(shell date +%s)

Expand Down
2 changes: 1 addition & 1 deletion hack/fake_minor_update.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A quick way to test a fake minor update. Run this script, and then once the
# openstackversion reconciles (the CSV will redeploy the controller-manager)
# you can set targetVersion == 0.0.2 for a quick test
VERSION=0.5
VERSION=0.6
CURRENT=${VERSION}.0
UPDATE=${VERSION}.1
oc get csv openstack-operator.v${CURRENT} -o yaml -n openstack-operators > csv.yaml
Expand Down
Loading