Skip to content

Commit da1ddf5

Browse files
committed
Tweaks to workflows
CodeQL has a warning about not analysing Go files. Trying manual build mode. Kubectl plugin got renamed during the code port.
1 parent 3e3017c commit da1ddf5

File tree

5 files changed

+90
-79
lines changed

5 files changed

+90
-79
lines changed

.github/workflows/build-test-publish.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ jobs:
3232
- name: Install Go
3333
uses: actions/setup-go@v6
3434
with:
35-
go-version-file: kubectl-rabbitmq-plugin/go.mod
35+
go-version-file: kubectl-rabbitmq/go.mod
3636
cache-dependency-path: |
37-
kubectl-rabbitmq-plugin/go.sum
38-
kubectl-rabbitmq-plugin/go.mod
37+
kubectl-rabbitmq/go.sum
38+
kubectl-rabbitmq/go.mod
3939
4040
- name: Install Carvel
4141
run: make ytt
@@ -58,10 +58,10 @@ jobs:
5858
run: |
5959
kind load image-archive ${{ runner.temp }}/operator.tar --name cluster-operator-testing
6060
kustomize build config/namespace/base | kubectl apply -f -
61-
kustomize build config/default | ytt -f- -f config/ytt/overlay-manager-image.yaml --data-value operator_image="${IMG}" -f config/ytt/never_pull.yaml | kubectl apply -f -
61+
kustomize build config/default | bin/ytt -f- -f config/ytt/overlay-manager-image.yaml --data-value operator_image="${IMG}" -f config/ytt/never_pull.yaml | kubectl apply -f -
6262
6363
- name: Test kubectl plugin
64-
working-directory: kubectl-rabbitmq-plugin
64+
working-directory: kubectl-rabbitmq
6565
run: make tests TEST_TAGS=integration
6666

6767
- name: Notify Google Chat
@@ -88,24 +88,24 @@ jobs:
8888
- name: Install Go
8989
uses: actions/setup-go@v6
9090
with:
91-
go-version-file: kubectl-rabbitmq-plugin/go.mod
91+
go-version-file: kubectl-rabbitmq/go.mod
9292
cache-dependency-path: |
93-
kubectl-rabbitmq-plugin/go.sum
94-
kubectl-rabbitmq-plugin/go.mod
93+
kubectl-rabbitmq/go.sum
94+
kubectl-rabbitmq/go.mod
9595
9696
- name: Build kubectl plugin
97-
working-directory: kubectl-rabbitmq-plugin
97+
working-directory: kubectl-rabbitmq
9898
run: make build PLUGIN_VERSION=${{ github.ref_name }} GO_OS=${{ matrix.os }} GO_ARCH=${{ matrix.arch }}
9999

100100
- name: Compress kubectl plugin
101-
working-directory: kubectl-rabbitmq-plugin
101+
working-directory: kubectl-rabbitmq
102102
run: tar -cvzf kubectl-rabbitmq-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz kubectl-rabbitmq-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }} ../../LICENSE.txt ../../README.md
103103

104104
- name: Upload kubectl plugin artifact
105105
uses: actions/upload-artifact@v7
106106
with:
107107
name: kubectl-rabbitmq-${{ matrix.os }}-${{ matrix.arch }}
108-
path: kubectl-rabbitmq-plugin/kubectl-rabbitmq-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
108+
path: kubectl-rabbitmq/kubectl-rabbitmq-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
109109

110110
unit_integration_tests:
111111
name: unit and integration tests
@@ -408,7 +408,7 @@ jobs:
408408
id: list_examples
409409
run: |
410410
echo -n 'examples_matrix=' >> $GITHUB_OUTPUT
411-
find "$PWD/docs/examples" -mindepth 1 -type d | jq -R -s -c 'split("\n") | map(select(length > 0))' >> $GITHUB_OUTPUT
411+
find "docs/examples" -mindepth 1 -type d | jq -R -s -c 'split("\n") | map(select(length > 0))' >> $GITHUB_OUTPUT
412412
413413
test_doc_examples:
414414
name: Documented example tests

.github/workflows/codeql-analysis.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,18 @@ jobs:
3939
uses: github/codeql-action/init@v4
4040
with:
4141
languages: go
42-
# If you wish to specify custom queries, you can do so here or in a config file.
43-
# By default, queries listed here will override any specified in a config file.
44-
# Prefix the list here with "+" to use these queries and those in the config file.
45-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
42+
build-mode: manual
43+
dependency-caching: true
4644

4745
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4846
# If this step fails, then you should remove it and run the build manually (see below)
49-
- name: Autobuild
50-
uses: github/codeql-action/autobuild@v4
47+
# - name: Autobuild
48+
# uses: github/codeql-action/autobuild@v4
5149

52-
# ℹ️ Command-line programs to run using the OS shell.
53-
# 📚 https://git.io/JvXDl
54-
55-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
56-
# and modify them (or add more) to build your code if your project
57-
# uses a compiled language
58-
59-
#- run: |
60-
# make bootstrap
61-
# make release
50+
- run: |
51+
go build -o manager ./cmd
6252
6353
- name: Perform CodeQL Analysis
6454
uses: github/codeql-action/analyze@v4
55+
with:
56+
category: '/language:go'

.github/workflows/test-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
go-version-file: go.mod
2121

2222
- name: Install Kind via Makefile
23-
run: make kind
23+
run: make kind yj
2424

2525
- name: Running Test e2e
2626
run: make test-e2e

kubectl-rabbitmq/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ require (
2626
github.com/spf13/pflag v1.0.10 // indirect
2727
github.com/x448/float16 v0.8.4 // indirect
2828
go.yaml.in/yaml/v2 v2.4.4 // indirect
29-
golang.org/x/net v0.51.0 // indirect
29+
golang.org/x/net v0.52.0 // indirect
3030
golang.org/x/text v0.35.0 // indirect
3131
gopkg.in/inf.v0 v0.9.1 // indirect
3232
gopkg.in/yaml.v3 v3.0.1 // indirect
3333
k8s.io/klog/v2 v2.140.0 // indirect
34-
k8s.io/kube-openapi v0.0.0-20260304202019-5b3e3fdb0acf // indirect
34+
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect
3535
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect
3636
sigs.k8s.io/controller-runtime v0.23.3 // indirect
3737
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect

0 commit comments

Comments
 (0)