From 00ee46876ff2176e15fff8dde9e94ad0f56c4598 Mon Sep 17 00:00:00 2001 From: Remy Moll Date: Mon, 22 Apr 2024 12:27:19 +0200 Subject: [PATCH] workflows for pr ands tags (along with required fixes to go code) --- .../workflows/workflow_full-test-suite.yaml | 32 +++++++++++++++++++ .github/workflows/workflow_tagged-build.yaml | 16 ++++++++++ src/go.mod | 2 +- src/main_test.go | 2 ++ 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/workflow_full-test-suite.yaml create mode 100644 .github/workflows/workflow_tagged-build.yaml diff --git a/.github/workflows/workflow_full-test-suite.yaml b/.github/workflows/workflow_full-test-suite.yaml new file mode 100644 index 0000000..88e2a40 --- /dev/null +++ b/.github/workflows/workflow_full-test-suite.yaml @@ -0,0 +1,32 @@ +name: Run full test suite + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + code-test: + name: Run tests on code + uses: ./.github/workflows/test-go.yaml + secrets: inherit + + + build-image: + name: Build Docker image + uses: ./.github/workflows/build-images.yaml + with: + tags: > + commit-${{ github.sha }} + latest + needs: code-test + + + webhook-tests: + name: Run tests on webhooks + needs: build-image + uses: ./.github/workflows/test-kubernetes.yaml + secrets: inherit diff --git a/.github/workflows/workflow_tagged-build.yaml b/.github/workflows/workflow_tagged-build.yaml new file mode 100644 index 0000000..2b559f0 --- /dev/null +++ b/.github/workflows/workflow_tagged-build.yaml @@ -0,0 +1,16 @@ +name: Publish a new tagged Docker image + +on: + push: + tags: # v* tags are protected in the repository settings + - 'v*' + +jobs: + docker-build: + name: Build tagged Docker image + uses: ./.github/workflows/build-images.yaml + with: + tags: > + ${{ github.ref }} + commit-${{ github.sha }} + latest diff --git a/src/go.mod b/src/go.mod index 28b2e42..f84e3cf 100644 --- a/src/go.mod +++ b/src/go.mod @@ -1,6 +1,6 @@ module github.com/neoskop/cert-manager-webhook-dnsimple -go 1.20 +go 1.22 require ( github.com/cert-manager/cert-manager v1.12.1 diff --git a/src/main_test.go b/src/main_test.go index 2786097..9d7dc43 100644 --- a/src/main_test.go +++ b/src/main_test.go @@ -22,6 +22,8 @@ func TestRunsSuite(t *testing.T) { dns.SetAllowAmbientCredentials(false), dns.SetManifestPath(testdata_dir), dns.SetDNSName("puzzle.beer"), + dns.SetUseAuthoritative(false), + dns.SetDNSServer("ns1.dnsimple.com:53"), ) fixture.RunConformance(t)