Skip to content

Commit 7b2ad21

Browse files
authored
Merge pull request #1903 from ashish-amarnath/update-ci
🏃 Run CAPD verify scripts in CI
2 parents 64d1f6a + 8bc65c3 commit 7b2ad21

10 files changed

+11
-329
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ TOOLS_DIR := hack/tools
3939
TOOLS_BIN_DIR := $(TOOLS_DIR)/bin
4040
BIN_DIR := bin
4141
E2E_FRAMEWORK_DIR := test/framework
42+
CAPD_DIR := test/infrastructure/docker
4243
RELEASE_NOTES_BIN := bin/release-notes
4344
RELEASE_NOTES := $(TOOLS_DIR)/$(RELEASE_NOTES_BIN)
4445

@@ -278,6 +279,7 @@ modules: ## Runs go mod to ensure modules are up to date.
278279
cd $(TOOLS_DIR); go mod tidy
279280
cd $(E2E_FRAMEWORK_DIR); go mod tidy
280281
cd test/e2e; go mod tidy
282+
cd $(CAPD_DIR); $(MAKE) modules
281283

282284
## --------------------------------------
283285
## Docker
@@ -490,6 +492,7 @@ verify:
490492
./hack/verify-starlark.sh
491493
$(MAKE) verify-modules
492494
$(MAKE) verify-gen
495+
$(MAKE) verify-docker-provider
493496

494497
.PHONY: verify-modules
495498
verify-modules: modules
@@ -503,6 +506,11 @@ verify-gen: generate
503506
echo "generated files are out of date, run make generate"; exit 1; \
504507
fi
505508

509+
.PHONY: verify-docker-provider
510+
verify-docker-provider:
511+
@echo "Verifying CAPD"
512+
cd $(CAPD_DIR); $(MAKE) verify
513+
506514
## --------------------------------------
507515
## Others / Utilities
508516
## --------------------------------------

scripts/ci-make.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ set -o pipefail
2020

2121
REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2222

23-
cd "${REPO_ROOT}" && make lint-full docker-build
23+
cd "${REPO_ROOT}" && CONTROLLER_IMG=capi-pr-verify make lint-full docker-build
24+
25+
cd "${REPO_ROOT}/test/infrastructure/docker" && CONTROLLER_IMG=capd-pr-verify make docker-build-all

test/infrastructure/docker/hack/verify-all.sh

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -37,49 +37,6 @@ failed=()
3737
outputs=()
3838

3939
# run all verify scripts, optionally skipping any of them
40-
41-
if [[ "${VERIFY_WHITESPACE:-true}" == "true" ]]; then
42-
echo "[*] Verifying whitespace..."
43-
out=$(hack/verify-whitespace.sh 2>&1)
44-
failure $? "verify-whitespace.sh" "${out}"
45-
cd "${REPO_PATH}" || exit
46-
fi
47-
48-
if [[ "${VERIFY_SPELLING:-true}" == "true" ]]; then
49-
echo "[*] Verifying spelling..."
50-
out=$(hack/verify-spelling.sh 2>&1)
51-
failure $? "verify-spelling.sh" "${out}"
52-
cd "${REPO_PATH}" || exit
53-
fi
54-
55-
if [[ "${VERIFY_GOFMT:-true}" == "true" ]]; then
56-
echo "[*] Verifying gofmt..."
57-
out=$(hack/verify-gofmt.sh 2>&1)
58-
failure $? "verify-gofmt.sh" "${out}"
59-
cd "${REPO_PATH}" || exit
60-
fi
61-
62-
if [[ "${VERIFY_GOIMPORTS:-true}" == "true" ]]; then
63-
echo "[*] Verifying goimports..."
64-
out=$(hack/verify-goimports.sh 2>&1)
65-
failure $? "verify-goimports.sh" "${out}"
66-
cd "${REPO_PATH}" || exit
67-
fi
68-
69-
if [[ "${VERIFY_GOLINT:-true}" == "true" ]]; then
70-
echo "[*] Verifying golint..."
71-
out=$(hack/verify-golint.sh 2>&1)
72-
failure $? "verify-golint.sh" "${out}"
73-
cd "${REPO_PATH}" || exit
74-
fi
75-
76-
if [[ "${VERIFY_GOVET:-true}" == "true" ]]; then
77-
echo "[*] Verifying govet..."
78-
out=$(hack/verify-govet.sh 2>&1)
79-
failure $? "verify-govet.sh" "${out}"
80-
cd "${REPO_PATH}" || exit
81-
fi
82-
8340
if [[ "${VERIFY_DEPS:-true}" == "true" ]]; then
8441
echo "[*] Verifying deps..."
8542
out=$(hack/verify-deps.sh 2>&1)
@@ -101,13 +58,6 @@ if [[ "${VERIFY_BUILD:-true}" == "true" ]]; then
10158
cd "${REPO_PATH}" || exit
10259
fi
10360

104-
if [[ "${VERIFY_DOCKER_BUILD:-true}" == "true" ]]; then
105-
echo "[*] Verifying manager docker image build..."
106-
out=$(hack/verify-docker-build.sh 2>&1)
107-
failure $? "verify-docker-build.sh" "${out}"
108-
cd "${REPO_PATH}" || exit
109-
fi
110-
11161
# exit based on verify scripts
11262
if [[ "${res}" = 0 ]]; then
11363
echo ""

test/infrastructure/docker/hack/verify-docker-build.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

test/infrastructure/docker/hack/verify-gofmt.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.

test/infrastructure/docker/hack/verify-goimports.sh

Lines changed: 0 additions & 56 deletions
This file was deleted.

test/infrastructure/docker/hack/verify-golint.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

test/infrastructure/docker/hack/verify-govet.sh

Lines changed: 0 additions & 28 deletions
This file was deleted.

test/infrastructure/docker/hack/verify-spelling.sh

Lines changed: 0 additions & 61 deletions
This file was deleted.

test/infrastructure/docker/hack/verify-whitespace.sh

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)