Skip to content

Commit

Permalink
ci: skeleton
Browse files Browse the repository at this point in the history
Signed-off-by: viktor-kurchenko <[email protected]>
  • Loading branch information
viktor-kurchenko committed Jan 27, 2025
1 parent 6b24d37 commit 49c6ec5
Showing 1 changed file with 131 additions and 0 deletions.
131 changes: 131 additions & 0 deletions .github/workflows/openshift-cert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: OpenShift Operator certification pipeline
on:
push:
workflow_dispatch:
inputs:
aws_region:
description: 'AWS region'
default: 'us-east-1'
type: choice
options:
- 'us-east-1'
- 'us-east-2'
- 'us-west-2'
- 'us-west-1'
- 'eu-west-1'
- 'eu-central-1'
- 'sa-east-1'
- 'ap-northeast-1'
- 'ap-southeast-1'
- 'ap-southeast-2'
- 'ap-northeast-2'
ocp_version:
description: 'Openshift version'
default: 'ocp-4-17'
type: choice
options:
- 'ocp-4-14'
- 'ocp-4-15'
- 'ocp-4-16'
- 'ocp-4-17'
cilium_version:
description: 'Cilium Version to use (ex: 1.16.4)'
default: "1.16.4"
required: true
is_released:
description: 'Is this version released ? No: `-ci` will be added to cilium_version'
required: false
type: boolean
default: false
run_tests:
description: 'Run tests on the deployed cluster'
required: false
type: boolean
default: false
do_not_destroy:
description: 'Do not destroy the cluster'
required: false
type: boolean
default: false

permissions:
contents: read
id-token: write
pull-requests: read
statuses: write

env:
TERRAFORM_VERSION: 1.10.3
TEKTON_VERSION: 0.39.0
OC_VERSION: 4.17.0
PULL_SECRET_FILE: pull_secret.json

jobs:
deploy:
runs-on: ubuntu-24.04
timeout-minutes: 120
steps:
- name: Checkout workflow context branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Install Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # 3.1.2
with:
terraform_version: "${{ env.TERRAFORM_VERSION }}"
terraform_wrapper: false

- name: Install Tekton CLI
run: |
curl -LO https://github.com/tektoncd/cli/releases/download/v${{ env.TEKTON_VERSION }}/tkn_${{ env.TEKTON_VERSION }}_Linux_x86_64.tar.gz
sudo tar xvzf tkn_${{ env.TEKTON_VERSION }}_Linux_x86_64.tar.gz -C /usr/local/bin/ tkn
- name: Checkout OpenShift CuTE repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: isovalent/cute-openshift-aws
token: ${{ secrets.READ_PRIVATE_REPOSITORIES }} # TODO: replace with ISOVALENT_BOT_READ_PRIVATE_REPOSITORIES
path: ocp

- name: Install OpenShift CLI tools
uses: redhat-actions/openshift-tools-installer@144527c7d98999f2652264c048c7a9bd103f8a82 # v1.13.1
with:
source: "mirror"
oc: "${{ env.OC_VERSION }}"

- name: Configure terraform variables
working-directory: ./ocp/${{ inputs.ocp_version }}
run: |
# TODO: replace RH_PULL_SECRET secret
echo '${{ secrets.RH_PULL_SECRET }}' | python -m json.tool > ${{ env.PULL_SECRET_FILE }}
cat > terraform.tfvars<<EOF
cluster_name = "ocp-cert"
owner = "ci"
pull_secret_path = "${{ env.PULL_SECRET_FILE }}"
base_domain = "ci.covalent.lol"
worker_instance_type = "m5.xlarge"
create_subscription = false
install_tetragon = false
EOF
cat terraform.tfvars
- name: Test
working-directory: ./ocp/${{ inputs.ocp_version }}
run: |
echo "testing..."
pwd
ls -lah
ls -lah ..
oc version
terraform version
tkn version
- name: Clean
if: always()
timeout-minutes: 60
working-directory: ./ocp/${{ inputs.ocp_version }}
run: |
rm -f ${{ env.PULL_SECRET_FILE }}

0 comments on commit 49c6ec5

Please sign in to comment.