File tree Expand file tree Collapse file tree 1 file changed +31
-11
lines changed Expand file tree Collapse file tree 1 file changed +31
-11
lines changed Original file line number Diff line number Diff line change 11name : Workflow Cleanup
22on :
33 workflow_dispatch :
4- # checkov:skip=CKV_GHA_7: "The build output cannot be affected by user parameters other than the build entry point and the top-level source location. GitHub Actions workflow_dispatch inputs MUST be empty. "
5- inputs :
64 ci_cloud :
75 description : ' Select the CI_CLOUD'
86 required : true
1210 - SMS
1311 - ARCUS
1412 cluster_name :
15- description : ' Cluster to delete'
13+ description : ' Cluster to delete (RL*-***) '
1614 type : string
1715 required : true
1816
@@ -24,15 +22,37 @@ permissions:
2422 statuses : write
2523
2624jobs :
27- dummy :
28- name : dummy-job1
25+ ci_cleanup :
26+ name : ci-cleanup
2927 runs-on : ubuntu-22.04
30- env :
28+ env :
29+ OS_CLOUD : openstack
3130 CI_CLOUD : ${{ github.event.inputs.ci_cloud }}
3231 CLUSTER_NAME : ${{ github.event.inputs.cluster_name }}
32+ steps :
33+ - uses : actions/checkout@v4
3334
34- steps :
35- - name : print input vars
36- run : |
37- echo CI_CLOUD: ${{ env.CI_CLOUD }}
38- echo CLUSTER_NAME: ${{ env.CLUSTER_NAME }}
35+ - name : print input vars
36+ run : |
37+ echo CI_CLOUD: ${{ env.CI_CLOUD }}
38+ echo CLUSTER_NAME: ${{ env.CLUSTER_NAME }}
39+
40+ - name : Setup environment
41+ run : |
42+ python3 -m venv venv
43+ . venv/bin/activate
44+ pip install -U pip
45+ pip install "$(grep -o 'python-openstackclient[><=0-9\.]*' requirements.txt)"
46+ shell : bash
47+
48+ - name : Write clouds.yaml
49+ run : |
50+ mkdir -p ~/.config/openstack
51+ echo "${{ secrets[format('{0}_CLOUDS_YAML', env.CI_CLOUD)] }}" > ~/.config/openstack/clouds.yaml
52+ shell : bash
53+
54+ - name : Delete CI cluster
55+ run : |
56+ . venv/bin/activate
57+ ./dev/delete-cluster.py slurmci-${{ env.CLUSTER_NAME }}
58+ shell : bash
You can’t perform that action at this time.
0 commit comments