File tree 4 files changed +19
-6
lines changed
health-check/zuul-client-api/tasks 4 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
162
162
ENVTEST ?= $(LOCALBIN ) /setup-envtest
163
163
OPERATOR_SDK ?= $(LOCALBIN ) /operator-sdk
164
164
MKDOCS ?= $(LOCALBIN ) /mkdocs/bin/mkdocs
165
+ ZC ?= $(LOCALBIN ) /zc/bin/zuul-client
165
166
166
167
# # Tool Versions
167
168
KUSTOMIZE_VERSION ?= v5.3.0
@@ -170,12 +171,18 @@ OPERATOR_SDK_VERSION ?= 1.34.2
170
171
STATICCHECK_VERSION ?= 2023.1.7
171
172
MKDOCS_VERSION ?= 1.5.3
172
173
SETUP_ENVTEST_VERSION ?= v0.0.0-20240320141353-395cfc7486e6
174
+ ZUUL_CLIENT_VERSION ?= 10.0.0
173
175
174
176
.PHONY : mkdocs
175
177
mkdocs : $(MKDOCS ) # # Install material for mkdocs locally if necessary
176
178
$(MKDOCS ) : $(LOCALBIN )
177
179
( test -f $( LOCALBIN) /mkdocs/bin/mkdocs && [[ " $( shell $( LOCALBIN) /mkdocs/bin/mkdocs -V) " =~ " $( MKDOCS_VERSION) " ]] ) || ( python -m venv $( LOCALBIN) /mkdocs && $( LOCALBIN) /mkdocs/bin/pip install --upgrade -r mkdocs-requirements.txt )
178
180
181
+ .PHONY : zuul-client
182
+ zuul-client : $(ZC ) # # Install zuul-client locally if necessary
183
+ $(ZC ) : $(LOCALBIN )
184
+ ( test -f $( LOCALBIN) /zc/bin/zuul-client && [[ " $( shell $( LOCALBIN) /zc/bin/zuul-client --version) " =~ " $( ZUUL_CLIENT_VERSION) " ]] ) || ( python -m venv $( LOCALBIN) /zc && $( LOCALBIN) /zc/bin/pip install zuul-client )
185
+
179
186
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/kustomize/${KUSTOMIZE_VERSION}/hack/install_kustomize.sh"
180
187
.PHONY : kustomize
181
188
kustomize : $(KUSTOMIZE ) # # Download kustomize locally if necessary.
Original file line number Diff line number Diff line change 23
23
] ;
24
24
shellHook = ''
25
25
echo "Welcome in $name"
26
+ export LC_ALL=C.UTF-8
26
27
export GOPATH=$(go env GOPATH)
27
28
export GOBIN=$(go env GOPATH)/bin
28
29
'' ;
Original file line number Diff line number Diff line change
1
+ - name : Ensure zuul-client installation
2
+ community.general.make :
3
+ target : " zuul-client"
4
+ chdir : " {{ zuul.project.src_dir }}"
5
+
6
+ - set_fact :
7
+ zuul_client : " {{ zuul.project.src_dir }}/bin/zc/bin/zuul-client"
8
+
1
9
- name : Create a zuul-client configuration file
2
10
ansible.builtin.shell : >
3
11
go run ./main.go --config playbooks/files/sf-operator-cli.yaml zuul create client-config --insecure
12
20
13
21
- name : Create a autohold request with zuul-client and the generated config
14
22
ansible.builtin.command : |
15
- zuul-client -c /tmp/zuul-client.conf --use-config internal autohold --project config --job config-update --reason CI_TEST
16
- args :
17
- chdir : " {{ zuul.project.src_dir }}"
23
+ {{ zuul_client }} -c /tmp/zuul-client.conf --use-config internal autohold --project config --job config-update --reason CI_TEST
18
24
19
25
- name : Ensure autohold was set properly
20
26
ansible.builtin.command : |
21
- zuul-client -c /tmp/zuul-client.conf --use-config internal autohold-list
27
+ {{ zuul_client }} -c /tmp/zuul-client.conf --use-config internal autohold-list
22
28
register : _ah_list
23
29
failed_when : ' "CI_TEST" not in _ah_list.stdout'
24
30
25
31
- name : Remove autohold
26
32
ansible.builtin.shell : >
27
33
echo "{{ _ah_list.stdout }}" |
28
34
grep -oE "0000[0-9]+" |
29
- xargs zuul-client -c /tmp/zuul-client.conf --use-config internal autohold-delete
35
+ xargs {{ zuul_client }} -c /tmp/zuul-client.conf --use-config internal autohold-delete
Original file line number Diff line number Diff line change 78
78
- kubernetes
79
79
- oauthlib>=3.2.2
80
80
- websocket-client
81
- - zuul-client
You can’t perform that action at this time.
0 commit comments