1111 required : true
1212 type : string
1313 default : " stable"
14- k8s_version :
14+ platform_version :
15+ required : true
16+ type : string
17+ platform :
1518 required : true
1619 type : string
1720 operator_version :
7477 required : true
7578 CR_PAT :
7679 required : true
80+ OPENSHIFT_IAM_USER_ACCESS_ID :
81+ required : true
82+ OPENSHIFT_IAM_USER_SECRET_KEY :
83+ required : true
7784
7885jobs :
7986 build_image :
95102 - name : Echo Inputs
96103 run : |
97104 echo Platform Builder version: ${{ inputs.platform_builder_version }}
98- echo Kubernetes version: ${{ inputs.k8s_version }}
105+ echo Platform version: ${{ inputs.platform_version }}
106+ echo Platfrom: ${{ inputs.platform }}
99107 echo Ondat version: ${{ inputs.operator_version }}
100108 echo Tests Regex: ${{ inputs.tests_regex }}
101109 echo Use existing cluster: ${{ inputs.use_existing_cluster }}
@@ -125,9 +133,13 @@ jobs:
125133
126134 - name : Get Cluster
127135 id : get_cluster
128- uses : ./.github/actions/github-actions/get_k8s_cluster
136+ uses : ./.github/actions/github-actions/get_cluster
137+ env :
138+ OCP_AWS_ACCESS_KEY_ID : ${{ secrets.OPENSHIFT_IAM_USER_ACCESS_ID }}
139+ OCP_AWS_SECRET_ACCESS_KEY : ${{ secrets.OPENSHIFT_IAM_USER_SECRET_KEY }}
129140 with :
130- k8s_version : ${{ inputs.k8s_version }}
141+ platform : ${{ inputs.platform }}
142+ platform_version : ${{ inputs.platform_version }}
131143 use_existing_cluster : ${{ inputs.use_existing_cluster }}
132144 workers_num : ${{ inputs.workers_num }}
133145 disk_size : ${{ inputs.disk_size }}
@@ -165,6 +177,7 @@ jobs:
165177 nfs_container : ${{ inputs.nfs_container }}
166178 node_container : ${{ inputs.node_container }}
167179 operator_version : ${{ inputs.operator_version }}
180+ platform : ${{ inputs.platform }}
168181
169182 run-tests :
170183 needs : [install_ondat]
@@ -196,7 +209,6 @@ jobs:
196209 image : 120921464587.dkr.ecr.eu-west-2.amazonaws.com/platform-builder:${{ inputs.platform_builder_version }}
197210 runs-on : self-hosted
198211 steps :
199-
200212 - name : Checkout GitHub Action Repo
201213 uses : actions/checkout@v2
202214 with :
@@ -205,6 +217,23 @@ jobs:
205217 repository : ondat/github_actions
206218 token : ${{ secrets.ONDAT_ORG_TOKEN }}
207219
220+ - uses : actions/download-artifact@v2
221+ with :
222+ name : cluster_name
223+
224+ - name : Set cluster name var from artefact
225+ id : vars
226+ shell : bash
227+ run : |
228+ echo "CLUSTER_NAME=$(cat cluster_name)" >> $GITHUB_ENV
229+ export CLUSTER_NAME=$(cat cluster_name)
230+
208231 - name : Destroy Cluster
209232 id : destroy_cluster
210- uses : ./.github/actions/github-actions/destroy_k8s_cluster
233+ uses : ./.github/actions/github-actions/destroy_cluster
234+ env :
235+ OCP_AWS_ACCESS_KEY_ID : ${{ secrets.OPENSHIFT_IAM_USER_ACCESS_ID }}
236+ OCP_AWS_SECRET_ACCESS_KEY : ${{ secrets.OPENSHIFT_IAM_USER_SECRET_KEY }}
237+ name :
238+ platform : ${{ inputs.platform }}
239+ cluster_name : ${{ env.cluster_name }}
0 commit comments