File tree 18 files changed +27
-578
lines changed
18 files changed +27
-578
lines changed Original file line number Diff line number Diff line change 1
1
- name : Setup Python
2
2
uses : actions/setup-python@v2
3
3
with :
4
- python-version : ' 3.8 '
4
+ python-version : ' 3.10.4 '
5
5
- name : Cache Dependencies
6
6
uses : actions/cache@v2
7
7
with :
Original file line number Diff line number Diff line change 55
55
- name : Setup Python
56
56
uses : actions/setup-python@v2
57
57
with :
58
- python-version : ' 3.8 '
58
+ python-version : ' 3.10.4 '
59
59
- name : Cache Dependencies
60
60
uses : actions/cache@v2
61
61
with :
91
91
- name : Setup Python
92
92
uses : actions/setup-python@v2
93
93
with :
94
- python-version : ' 3.8 '
94
+ python-version : ' 3.10.4 '
95
95
- name : Cache Dependencies
96
96
uses : actions/cache@v2
97
97
with :
Original file line number Diff line number Diff line change 57
57
- name : Setup Python
58
58
uses : actions/setup-python@v2
59
59
with :
60
- python-version : ' 3.8 '
60
+ python-version : ' 3.10.4 '
61
61
- name : Cache Dependencies
62
62
uses : actions/cache@v2
63
63
with :
@@ -173,7 +173,7 @@ jobs:
173
173
- name : Setup Python
174
174
uses : actions/setup-python@v2
175
175
with :
176
- python-version : ' 3.8 '
176
+ python-version : ' 3.10.4 '
177
177
- name : Cache Dependencies
178
178
uses : actions/cache@v2
179
179
with :
Original file line number Diff line number Diff line change 63
63
- name : Setup Python
64
64
uses : actions/setup-python@v2
65
65
with :
66
- python-version : ' 3.8 '
66
+ python-version : ' 3.10.4 '
67
67
- name : Cache Dependencies
68
68
uses : actions/cache@v2
69
69
with :
@@ -177,7 +177,7 @@ jobs:
177
177
- name : Setup Python
178
178
uses : actions/setup-python@v2
179
179
with :
180
- python-version : ' 3.8 '
180
+ python-version : ' 3.10.4 '
181
181
- name : Cache Dependencies
182
182
uses : actions/cache@v2
183
183
with :
Original file line number Diff line number Diff line change 28
28
- name : Setup Python
29
29
uses : actions/setup-python@v2
30
30
with :
31
- python-version : ' 3.8 '
31
+ python-version : ' 3.10.4 '
32
32
architecture : ' x64'
33
33
34
34
- uses : actions/cache@v2
Original file line number Diff line number Diff line change 17
17
- name : Setup Python
18
18
uses : actions/setup-python@v2
19
19
with :
20
- python-version : ' 3.8 '
20
+ python-version : ' 3.10.4 '
21
21
architecture : ' x64'
22
22
23
23
- uses : actions/cache@v2
Original file line number Diff line number Diff line change @@ -96,3 +96,6 @@ Dockerfile.ubuntu-*
96
96
diagnostics
97
97
98
98
! test /test-app /Dockerfile
99
+
100
+ Pipfile
101
+ Pipfile.lock
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ controller-gen:
163
163
ifeq (ok,$(shell test -f "$$(which helm ) " && echo ok) )
164
164
HELM =$(shell which helm)
165
165
else
166
- HELM =/usr/bin/ local/helm
166
+ HELM =/usr/local/bin /helm
167
167
endif
168
168
169
169
# Download helm locally if necessary
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ python -m pip install -r requirements.txt
115
115
116
116
* create a python environment and install dependencies.
117
117
``` bash
118
- pipenv install
118
+ pipenv install -r requirements.txt
119
119
```
120
120
121
121
* activate the python environment.
Original file line number Diff line number Diff line change 1
1
# Global options:
2
2
3
3
[mypy]
4
- python_version = 3.7
4
+ python_version = 3.10
5
5
ignore_missing_imports = true
6
6
disallow_untyped_calls = true
7
7
disallow_untyped_defs = true
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ jinja2==2.11.3
6
6
MarkupSafe == 2.0.1
7
7
PyYAML == 5.4.1
8
8
black == 22.3.0
9
- mypy == 0.782
9
+ mypy == 0.961
10
10
tqdm == v4.49.0
11
11
boto3 == 1.16.21
12
12
pymongo == 3.11.4
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env python
1
+ #!/usr/bin/env python3
2
2
3
3
from kubernetes .client .rest import ApiException
4
4
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env python
1
+ #!/usr/bin/env python3
2
2
from typing import Dict
3
3
4
4
from ghat .template import template_github_action
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env python
1
+ #!/usr/bin/env python3
2
2
import sys
3
3
from typing import Dict
4
4
import os .path
Original file line number Diff line number Diff line change @@ -42,24 +42,24 @@ reg_name='kind-registry'
42
42
reg_port=' 5000'
43
43
running=" $( docker inspect -f ' {{.State.Running}}' " ${reg_name} " 2> /dev/null || true) "
44
44
if [ " ${running} " != ' true' ]; then
45
- docker run \
46
- -d --restart=always -p " ${reg_port} :${reg_port} " --name " ${reg_name} " --network kind \
47
- registry:2
45
+ docker run -d --restart=always -p " 127.0.0.1:${reg_port} :5000" --name " ${reg_name} " registry:2
48
46
fi
49
47
50
- # find registry IP inside the kind network
51
- ip=" $( docker inspect kind-registry -f ' {{.NetworkSettings.Networks.kind.IPAddress}}' ) "
52
-
53
48
# create a cluster with the local registry enabled in containerd
54
49
cat << EOF | kind create cluster --name "${cluster_name} " --kubeconfig "${kubeconfig_path} " --config=-
55
50
kind: Cluster
56
51
apiVersion: kind.x-k8s.io/v1alpha4
57
52
containerdConfigPatches:
58
53
- |-
59
54
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:${reg_port} "]
60
- endpoint = ["http://${ip } :${reg_port} "]
55
+ endpoint = ["http://${reg_name } :${reg_port} "]
61
56
EOF
62
57
58
+ # connect the registry to the cluster network if not already connected
59
+ if [ " $( docker inspect -f=' {{json .NetworkSettings.Networks.kind}}' " ${reg_name} " ) " = ' null' ]; then
60
+ docker network connect " kind" " ${reg_name} "
61
+ fi
62
+
63
63
# Document the local registry (from https://kind.sigs.k8s.io/docs/user/local-registry/)
64
64
# https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/generic/1755-communicating-a-local-registry
65
65
cat << EOF | kubectl apply --kubeconfig "${kubeconfig_path} " -f -
Original file line number Diff line number Diff line change
1
+ //go:build tools
1
2
// +build tools
2
3
3
4
// Place any runtime dependencies as imports in this file.
You can’t perform that action at this time.
0 commit comments