-
Notifications
You must be signed in to change notification settings - Fork 243
48 lines (44 loc) · 1.53 KB
/
infra-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: odo-infra-stage-test
on:
pull_request:
branches:
- main
paths:
- 'scripts/ansible/**'
- '!scripts/ansible/**/*.md'
jobs:
kubernetes-infra-stage-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: pre-config
run: |
echo "${{ secrets.NFSKEY }}" > ./ssh_key
chmod 600 ./ssh_key
- name: Create Stageing Cluster
uses: dawidd6/action-ansible-playbook@v2
env:
IC_API_KEY: ${{ secrets.IC_API_KEY }}
IC_REGION: 'eu-de'
SSHKEY: './ssh_key'
with:
playbook: scripts/ansible/create-infra.yaml
requirements: scripts/ansible/requirements.yaml
- name: login to the three cluster
env:
IC_API_KEY: ${{ secrets.IC_API_KEY }}
IC_REGION: 'eu-de'
run: |
curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
ibmcloud login --apikey $IC_API_KEY -r $IC_REGION
ibmcloud plugin install ks
CLUSTER=`ibmcloud ks cluster get -c odo-test-kubernetes-cluster --output json `
ID=$(echo $CLUSTER | jq -r '.id')
ibmcloud ks cluster config --cluster $ID --admin
CLUSTER=`ibmcloud ks cluster get -c odo-test-kubernetes-cluster --output json `
ID=$(echo $CLUSTER | jq -r '.id')
ibmcloud ks cluster config --cluster $ID --admin
CLUSTER=`ibmcloud ks cluster get -c odo-test-kubernetes-cluster --output json `
ID=$(echo $CLUSTER | jq -r '.id')
ibmcloud ks cluster config --cluster $ID --admin