|  | 
|  | 1 | +name: OpenShift Operator certification pipeline | 
|  | 2 | +on: | 
|  | 3 | +  push: | 
|  | 4 | +  workflow_dispatch: | 
|  | 5 | +    inputs: | 
|  | 6 | +      aws_region: | 
|  | 7 | +        description: 'AWS region' | 
|  | 8 | +        default: 'us-east-1' | 
|  | 9 | +        type: choice | 
|  | 10 | +        options: | 
|  | 11 | +          - 'us-east-1' | 
|  | 12 | +          - 'us-east-2' | 
|  | 13 | +          - 'us-west-2' | 
|  | 14 | +          - 'us-west-1' | 
|  | 15 | +          - 'eu-west-1' | 
|  | 16 | +          - 'eu-central-1' | 
|  | 17 | +          - 'sa-east-1' | 
|  | 18 | +          - 'ap-northeast-1' | 
|  | 19 | +          - 'ap-southeast-1' | 
|  | 20 | +          - 'ap-southeast-2' | 
|  | 21 | +          - 'ap-northeast-2' | 
|  | 22 | +      ocp_version: | 
|  | 23 | +        description: 'Openshift version' | 
|  | 24 | +        default: 'ocp-4-17' | 
|  | 25 | +        type: choice | 
|  | 26 | +        options: | 
|  | 27 | +          - 'ocp-4-14' | 
|  | 28 | +          - 'ocp-4-15' | 
|  | 29 | +          - 'ocp-4-16' | 
|  | 30 | +          - 'ocp-4-17' | 
|  | 31 | +      cilium_version: | 
|  | 32 | +        description: 'Cilium Version to use (ex: 1.16.4)' | 
|  | 33 | +        default: "1.16.4" | 
|  | 34 | +        required: true | 
|  | 35 | +      is_released: | 
|  | 36 | +        description: 'Is this version released ? No: `-ci` will be added to cilium_version' | 
|  | 37 | +        required: false | 
|  | 38 | +        type: boolean | 
|  | 39 | +        default: false | 
|  | 40 | +      run_tests: | 
|  | 41 | +        description: 'Run tests on the deployed cluster' | 
|  | 42 | +        required: false | 
|  | 43 | +        type: boolean | 
|  | 44 | +        default: false | 
|  | 45 | +      do_not_destroy: | 
|  | 46 | +        description: 'Do not destroy the cluster' | 
|  | 47 | +        required: false | 
|  | 48 | +        type: boolean | 
|  | 49 | +        default: false | 
|  | 50 | + | 
|  | 51 | +permissions: | 
|  | 52 | +  contents: read | 
|  | 53 | +  id-token: write | 
|  | 54 | +  pull-requests: read | 
|  | 55 | +  statuses: write | 
|  | 56 | + | 
|  | 57 | +env: | 
|  | 58 | +  TERRAFORM_VERSION: 1.10.3 | 
|  | 59 | +  PULL_SECRET_FILE: pull_secret.json | 
|  | 60 | + | 
|  | 61 | +jobs: | 
|  | 62 | +  deploy: | 
|  | 63 | +    runs-on: ubuntu-24.04 | 
|  | 64 | +    timeout-minutes: 120 | 
|  | 65 | +    steps: | 
|  | 66 | +      - name: Checkout workflow context branch | 
|  | 67 | +        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | 
|  | 68 | +        with: | 
|  | 69 | +          persist-credentials: false | 
|  | 70 | + | 
|  | 71 | +      - name: Install Terraform | 
|  | 72 | +        uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # 3.1.2 | 
|  | 73 | +        with: | 
|  | 74 | +          terraform_version: "${{ env.TERRAFORM_VERSION }}" | 
|  | 75 | +          terraform_wrapper: false | 
|  | 76 | + | 
|  | 77 | +      - name: Checkout OpenShift CuTE repository | 
|  | 78 | +        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | 
|  | 79 | +        with: | 
|  | 80 | +          repository: isovalent/cute-openshift-aws | 
|  | 81 | +          token: ${{ secrets.READ_PRIVATE_REPOSITORIES }} # TODO: replace with ISOVALENT_BOT_READ_PRIVATE_REPOSITORIES | 
|  | 82 | +          path: ocp | 
|  | 83 | + | 
|  | 84 | +      - name: Configure terraform variables | 
|  | 85 | +        working-directory: ./ocp/${{ inputs.ocp_version }} | 
|  | 86 | +        run: | | 
|  | 87 | +          echo '${{ secrets.RH_PULL_SECRET }}' | python -m json.tool > ${{ env.PULL_SECRET_FILE }} | 
|  | 88 | +
 | 
|  | 89 | +          cat > terraform.tfvars<<EOF | 
|  | 90 | +          cluster_name         = "ocp-cert" | 
|  | 91 | +          owner                = "ci" | 
|  | 92 | +          pull_secret_path     = "${{ env.PULL_SECRET_FILE }}" | 
|  | 93 | +          base_domain          = "ci.covalent.lol" | 
|  | 94 | +          worker_instance_type = "m5.xlarge" | 
|  | 95 | +          create_subscription  = false | 
|  | 96 | +          install_tetragon     = false | 
|  | 97 | +          EOF | 
|  | 98 | +
 | 
|  | 99 | +          cat terraform.tfvars | 
|  | 100 | +
 | 
|  | 101 | +      - name: Test | 
|  | 102 | +        working-directory: ./ocp/${{ inputs.ocp_version }} | 
|  | 103 | +        run: | | 
|  | 104 | +          echo "testing..." | 
|  | 105 | +          pwd | 
|  | 106 | +          ls -lah | 
|  | 107 | +          ls -lah .. | 
|  | 108 | +
 | 
|  | 109 | +      - name: Clean | 
|  | 110 | +        if: always() | 
|  | 111 | +        timeout-minutes: 60 | 
|  | 112 | +        working-directory: ./ocp/${{ inputs.ocp_version }} | 
|  | 113 | +        run: | | 
|  | 114 | +          rm ${{ env.PULL_SECRET_FILE }} | 
0 commit comments