File tree Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : " Export all KinD pod logs"
2
+ description : " Step to export all KinD pod logs"
3
+
4
+ inputs :
5
+ output-directory :
6
+ description : " Directory to export log files to"
7
+ required : true
8
+ cluster-name :
9
+ description : " Name of the KinD cluster"
10
+ required : false
11
+ default : cluster
12
+
13
+ runs :
14
+ using : " composite"
15
+ steps :
16
+ - name : Export all KinD pod logs
17
+ run : |
18
+ echo "Export all KinD pod logs to ${{ inputs.output-directory }}"
19
+ kind export logs ${{ inputs.output-directory }} --name ${{ inputs.cluster-name }}
20
+ shell : bash
Original file line number Diff line number Diff line change @@ -2,10 +2,14 @@ name: "Set up KinD"
2
2
description : " Step to start and configure KinD cluster"
3
3
4
4
inputs :
5
- kind- node-hostname :
5
+ node-hostname :
6
6
description : " Hostname of the main kind node"
7
7
required : false
8
8
default : kind
9
+ cluster-name :
10
+ description : " Name of the KinD cluster"
11
+ required : false
12
+ default : cluster
9
13
10
14
runs :
11
15
using : " composite"
43
47
- name : Setup KinD cluster
44
48
uses : helm/kind-action@v1.8.0
45
49
with :
46
- cluster_name : cluster
50
+ cluster_name : ${{ inputs. cluster-name }}
47
51
version : v0.17.0
48
52
config : ${{ env.KIND_CONFIG_FILE }}
49
53
@@ -63,12 +67,12 @@ runs:
63
67
kubectl annotate ingressclass nginx "ingressclass.kubernetes.io/is-default-class=true"
64
68
kubectl -n ingress-nginx wait --timeout=300s --for=condition=Available deployments --all
65
69
66
- - name : Add ${{ inputs.kind- node-hostname }} host to machine hosts
70
+ - name : Add ${{ inputs.node-hostname }} host to machine hosts
67
71
shell : bash
68
- run : echo "127.0.0.1 ${{ inputs.kind- node-hostname }}" | sudo tee -a /etc/hosts
72
+ run : echo "127.0.0.1 ${{ inputs.node-hostname }}" | sudo tee -a /etc/hosts
69
73
70
74
- name : Set env variables for tests to properly leverage KinD cluster
71
75
shell : bash
72
76
run : |
73
77
echo "CLUSTER_TYPE=KIND" >> $GITHUB_ENV
74
- echo "CLUSTER_HOSTNAME=${{ inputs.kind- node-hostname }}" >> $GITHUB_ENV
78
+ echo "CLUSTER_HOSTNAME=${{ inputs.node-hostname }}" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments