Skip to content

Add support for operator environment variables #264

Add support for operator environment variables

Add support for operator environment variables #264

Workflow file for this run

name: PR
on:
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
uses: ./.github/workflows/unit-tests.yml
check-olm-label:
runs-on: ubuntu-latest
outputs:
has-label: ${{ steps.check.outputs.has-label }}
steps:
- name: Check for olm-tests label
id: check
run: |
has_label="${{ contains(github.event.pull_request.labels.*.name, 'olm-tests') }}"
echo "has-label=${has_label}" >> "$GITHUB_OUTPUT"
if [ "$has_label" = "true" ]; then
echo "::notice::olm-tests label is set — OpenShift cluster will be created"
else
echo "::notice::olm-tests label is not set — skipping OpenShift cluster"
fi
create-gke-cluster:
if: github.event.pull_request.head.repo.full_name == github.repository
uses: ./.github/workflows/create-dev-cluster.yml
with:
cluster-name: infra-roxie-pr-${{ github.event.pull_request.number }}-gke
flavor: gke-default
args: machine-type=e2-standard-4,nodes=3,gcp-image-type=ubuntu_containerd
secrets: inherit
create-openshift-cluster:
needs: check-olm-label
if: needs.check-olm-label.outputs.has-label == 'true' && github.event.pull_request.head.repo.full_name == github.repository
uses: ./.github/workflows/create-dev-cluster.yml
with:
cluster-name: infra-roxie-pr-${{ github.event.pull_request.number }}-openshift
flavor: ocp-4
args: master-node-type=e2-standard-4,worker-node-type=e2-standard-8,master-node-count=3,worker-node-count=3
secrets: inherit
build-roxie-image:
if: github.event.pull_request.head.repo.full_name == github.repository
uses: ./.github/workflows/build-roxie-image.yml
permissions:
contents: read
packages: write
secrets: inherit
e2e-tests:
if: github.event.pull_request.head.repo.full_name == github.repository
needs: [ create-gke-cluster, build-roxie-image ]
uses: ./.github/workflows/e2e-tests.yml
with:
cluster-name: ${{ needs.create-gke-cluster.outputs.cluster-name }}
image: ${{ needs.build-roxie-image.outputs.image }}
secrets: inherit
e2e-tests-openshift:
if: github.event.pull_request.head.repo.full_name == github.repository
needs: [ create-openshift-cluster, build-roxie-image ]
uses: ./.github/workflows/e2e-tests.yml
with:
cluster-name: ${{ needs.create-openshift-cluster.outputs.cluster-name }}
image: ${{ needs.build-roxie-image.outputs.image }}
cluster-type: openshift
skip-olm-tests: 'false'
secrets: inherit
delete-gke-cluster:
if: ${{ always() && needs.create-gke-cluster.result == 'success' && github.event.pull_request.head.repo.full_name == github.repository }}
needs: [ create-gke-cluster, e2e-tests ]
uses: ./.github/workflows/delete-dev-cluster.yml
with:
cluster-name: ${{ needs.create-gke-cluster.outputs.cluster-name }}
secrets: inherit
delete-openshift-cluster:
if: ${{ always() && needs.create-openshift-cluster.result == 'success' && github.event.pull_request.head.repo.full_name == github.repository }}
needs: [ create-openshift-cluster, e2e-tests-openshift ]
uses: ./.github/workflows/delete-dev-cluster.yml
with:
cluster-name: ${{ needs.create-openshift-cluster.outputs.cluster-name }}
secrets: inherit