Skip to content

Commit 7f46876

Browse files
authored
Makefile: Use hyphen instead of slash (#2019)
* Makefile: switch test/unit to test-unit * Makefile: switch test/markdown to test-markdown * Makefile: switch test/sanity to test-sanity * Makefile: switch test/ci to test-ci * Makefile: switch test/subcommand/* to test-subcommand-* * Makefile: switch test/e2e/* to test-e2e-* * Makefile: switch image/build/* to image-build-* * Makefile: switch image/scaffold/* to image-scaffold-* * Makefile: switch image/push/* to image-push-* * (prow.)Makefile: transition from slashes to hyphens Adding back the slashes to allow the CI to pass. We have a chicken and the egg problem. The CI for SDK doesn't know about the hyphens and the CI for the release PR doesn't know about the slashes.
1 parent 70efaa3 commit 7f46876

File tree

10 files changed

+71
-71
lines changed

10 files changed

+71
-71
lines changed

.travis.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
- if: tag IS present OR branch != master
110110
<<: *test
111111
name: Go on Kubernetes
112-
script: make test/e2e/go
112+
script: make test-e2e-go
113113

114114
# Build and test ansible and test ansible using molecule in non-master PRs
115115
- if: tag IS present OR branch != master
@@ -119,75 +119,75 @@ jobs:
119119
- pip3 install --upgrade setuptools pip
120120
- pip install --user ansible
121121
script:
122-
- make test/e2e/ansible
123-
- make test/e2e/ansible-molecule
122+
- make test-e2e-ansible
123+
- make test-e2e-ansible-molecule
124124

125125
# Build and test helm in non-master PRs
126126
- if: tag IS present OR branch != master
127127
<<: *test
128128
name: Helm on Kubernetes
129-
script: make test/e2e/helm
129+
script: make test-e2e-helm
130130

131131
# Test subcommands in non-master PRs
132132
- if: tag IS present OR branch != master
133133
<<: *test
134134
name: Subcommands on Kubernetes
135-
script: make test/subcommand
135+
script: make test-subcommand
136136

137137
# Test olm install/uninstall subcommands on master, as these cannot be tested in prow/api-ci.
138138
- if: tag IS NOT present AND branch = master
139139
<<: *test
140140
name: OLM Install/Uninstall on Kubernetes
141-
script: make test/subcommand/olm-install
141+
script: make test-subcommand-olm-install
142142

143143
# Build and test ansible using molecule, as this cannot be tested in prow/api-ci.
144144
- if: tag IS NOT present AND branch = master
145145
<<: *test
146146
name: Ansible Molecule on Kubernetes
147-
script: make test/e2e/ansible-molecule
147+
script: make test-e2e-ansible-molecule
148148

149149
# Run the unit, sanity, and markdown tests
150150
- stage: test
151151
name: Unit, Sanity, and Markdown Tests
152152
# Currently, prow/api-ci tests all PRs that target master; use travis for post merge testing and non-master PRs
153153
if: type != pull_request OR branch != master
154154
<<: *dep_before_install
155-
script: make test/sanity test/unit test/markdown
155+
script: make test-sanity test-unit test-markdown
156156
after_success: echo 'Tests Passed'
157157
after_failure: echo 'Failure in unit, sanity, or markdown test'
158158

159159
# Build and deploy ansible-operator docker image
160160
- <<: *deploy
161161
name: Docker image for ansible-operator
162162
script:
163-
- make image/build/ansible
164-
- make image/push/ansible
163+
- make image-build-ansible
164+
- make image-push-ansible
165165

166166
# Build and deploy amd64 helm-operator docker image
167167
- <<: *deploy
168168
name: Docker image for helm-operator (amd64)
169169
os: linux
170170
script:
171-
- make image/build/helm
172-
- make image/push/helm
171+
- make image-build-helm
172+
- make image-push-helm
173173

174174
# Build and deploy ppc64le helm-operator docker image
175175
- <<: *deploy
176176
name: Docker image for helm-operator (ppc64le)
177177
os: linux-ppc64le
178178
script:
179-
- make image/build/helm
180-
- make image/push/helm
179+
- make image-build-helm
180+
- make image-push-helm
181181

182182
# Build and deploy scorecard-proxy docker image
183183
- <<: *deploy
184184
name: Docker image for scorecard-proxy
185185
script:
186-
- make image/build/scorecard-proxy
187-
- make image/push/scorecard-proxy
186+
- make image-build-scorecard-proxy
187+
- make image-push-scorecard-proxy
188188

189189
# Build and deploy helm multi-arch manifest list
190190
- <<: *manifest-deploy
191191
name: Manifest list for helm-operator
192192
script:
193-
- make image/push/helm-multiarch
193+
- make image-push-helm-multiarch

Makefile

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -104,89 +104,89 @@ build/%.asc:
104104
}
105105

106106
# Static tests.
107-
.PHONY: test test/markdown test/sanity test/unit
107+
.PHONY: test test-markdown test-sanity test-unit
108108

109-
test: test/unit ## Run the tests
109+
test: test-unit ## Run the tests
110110

111-
test/markdown:
111+
test-markdown test/markdown:
112112
./hack/ci/marker --root=doc
113113

114-
test/sanity: tidy
114+
test-sanity test/sanity: tidy
115115
./hack/tests/sanity-check.sh
116116

117-
test/unit: ## Run the unit tests
117+
test-unit test/unit: ## Run the unit tests
118118
$(Q)go test -count=1 -short ./cmd/...
119119
$(Q)go test -count=1 -short ./pkg/...
120120
$(Q)go test -count=1 -short ./internal/...
121121

122122
# CI tests.
123-
.PHONY: test/ci
123+
.PHONY: test-ci
124124

125-
test/ci: test/markdown test/sanity test/unit install test/subcommand test/e2e ## Run the CI test suite
125+
test-ci: test-markdown test-sanity test-unit install test-subcommand test-e2e ## Run the CI test suite
126126

127127
# Subcommand tests.
128-
.PHONY: test/subcommand test/subcommand/test-local test/subcommand/scorecard test/subcommand/olm-install
128+
.PHONY: test-subcommand test-subcommand-local test-subcommand-scorecard test-subcommand-olm-install
129129

130-
test/subcommand: test/subcommand/test-local test/subcommand/scorecard test/subcommand/olm-install
130+
test-subcommand: test-subcommand-local test-subcommand-scorecard test-subcommand-olm-install
131131

132-
test/subcommand/test-local:
132+
test-subcommand-local:
133133
./hack/tests/subcommand.sh
134134

135-
test/subcommand/scorecard:
135+
test-subcommand-scorecard:
136136
./hack/tests/subcommand-scorecard.sh
137137

138-
test/subcommand/olm-install:
138+
test-subcommand-olm-install:
139139
./hack/tests/subcommand-olm-install.sh
140140

141141
# E2E tests.
142-
.PHONY: test/e2e test/e2e/go test/e2e/ansible test/e2e/ansible-molecule test/e2e/helm
142+
.PHONY: test-e2e test-e2e-go test-e2e-ansible test-e2e-ansible-molecule test-e2e-helm
143143

144-
test/e2e: test/e2e/go test/e2e/ansible test/e2e/ansible-molecule test/e2e/helm ## Run the e2e tests
144+
test-e2e: test-e2e-go test-e2e-ansible test-e2e-ansible-molecule test-e2e-helm ## Run the e2e tests
145145

146-
test/e2e/go:
146+
test-e2e-go:
147147
./hack/tests/e2e-go.sh $(ARGS)
148148

149-
test/e2e/ansible: image/build/ansible
149+
test-e2e-ansible: image-build-ansible
150150
./hack/tests/e2e-ansible.sh
151151

152-
test/e2e/ansible-molecule: image/build/ansible
152+
test-e2e-ansible-molecule: image-build-ansible
153153
./hack/tests/e2e-ansible-molecule.sh
154154

155-
test/e2e/helm: image/build/helm
155+
test-e2e-helm: image-build-helm
156156
./hack/tests/e2e-helm.sh
157157

158158
# Image scaffold/build/push.
159-
.PHONY: image image/scaffold/ansible image/scaffold/helm image/build image/build/ansible image/build/helm image/push image/push/ansible image/push/helm
159+
.PHONY: image image-scaffold-ansible image-scaffold-helm image-build image-build-ansible image-build-helm image-push image-push-ansible image-push-helm
160160

161-
image: image/build image/push ## Build and push all images
161+
image: image-build image-push ## Build and push all images
162162

163-
image/scaffold/ansible:
163+
image-scaffold-ansible:
164164
go run ./hack/image/ansible/scaffold-ansible-image.go
165165

166-
image/scaffold/helm:
166+
image-scaffold-helm:
167167
go run ./hack/image/helm/scaffold-helm-image.go
168168

169-
image/build: image/build/ansible image/build/helm image/build/scorecard-proxy ## Build all images
169+
image-build: image-build-ansible image-build-helm image-build-scorecard-proxy ## Build all images
170170

171-
image/build/ansible: build/operator-sdk-dev-x86_64-linux-gnu
171+
image-build-ansible: build/operator-sdk-dev-x86_64-linux-gnu
172172
./hack/image/build-ansible-image.sh $(ANSIBLE_BASE_IMAGE):dev
173173

174-
image/build/helm: build/operator-sdk-dev
174+
image-build-helm: build/operator-sdk-dev
175175
./hack/image/build-helm-image.sh $(HELM_BASE_IMAGE):dev
176176

177-
image/build/scorecard-proxy:
177+
image-build-scorecard-proxy:
178178
./hack/image/build-scorecard-proxy-image.sh $(SCORECARD_PROXY_BASE_IMAGE):dev
179179

180-
image/push: image/push/ansible image/push/helm image/push/scorecard-proxy ## Push all images
180+
image-push: image-push-ansible image-push-helm image-push-scorecard-proxy ## Push all images
181181

182-
image/push/ansible:
182+
image-push-ansible:
183183
./hack/image/push-image-tags.sh $(ANSIBLE_BASE_IMAGE):dev $(ANSIBLE_IMAGE)
184184

185-
image/push/helm:
185+
image-push-helm:
186186
./hack/image/push-image-tags.sh $(HELM_BASE_IMAGE):dev $(HELM_IMAGE)-$(shell go env GOARCH)
187187

188-
image/push/helm-multiarch:
188+
image-push-helm-multiarch:
189189
./hack/image/push-manifest-list.sh $(HELM_IMAGE) ${HELM_ARCHES}
190190

191-
image/push/scorecard-proxy:
191+
image-push-scorecard-proxy:
192192
./hack/image/push-image-tags.sh $(SCORECARD_PROXY_BASE_IMAGE):dev $(SCORECARD_PROXY_IMAGE)

ci/dockerfiles/ansible-e2e-hybrid.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM osdk-builder as builder
22

3-
RUN make image/scaffold/ansible
3+
RUN make image-scaffold-ansible
44
RUN ci/tests/scaffolding/e2e-ansible-scaffold-hybrid.sh
55

66
FROM registry.access.redhat.com/ubi8/ubi

ci/dockerfiles/ansible.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM osdk-builder as builder
22

3-
RUN make image/scaffold/ansible
3+
RUN make image-scaffold-ansible
44

55
FROM registry.access.redhat.com/ubi8/ubi
66

ci/dockerfiles/helm-e2e-hybrid.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM osdk-builder as builder
22

3-
RUN make image/scaffold/helm
3+
RUN make image-scaffold-helm
44
RUN ci/tests/scaffolding/e2e-helm-scaffold-hybrid.sh
55

66
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest

ci/dockerfiles/helm.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM osdk-builder as builder
22

3-
RUN make image/scaffold/helm
3+
RUN make image-scaffold-helm
44

55
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
66

ci/prow.Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ export GOPROXY ?= https://proxy.golang.org/
77
build:
88
$(MAKE) -f Makefile build/operator-sdk
99

10-
test/e2e/go:
10+
test-e2e-go test/e2e/go:
1111
./ci/tests/e2e-go.sh $(ARGS)
1212

13-
test/e2e/ansible:
13+
test-e2e-ansible test/e2e/ansible:
1414
./ci/tests/e2e-ansible.sh
1515

16-
test/e2e/helm:
16+
test-e2e-helm test/e2e/helm:
1717
./ci/tests/e2e-helm.sh
1818

19-
test/subcommand:
19+
test-subcommand test/subcommand:
2020
./ci/tests/subcommand.sh

doc/dev/developer_guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To build the binary and run all tests (assuming you have a correctly configured
2424
you can simple run:
2525

2626
```sh
27-
$ make test/ci
27+
$ make test-ci
2828
```
2929

3030
If you simply want to run the unit tests, you can run:

doc/dev/testing/running-the-tests.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ $ export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
5353

5454
All the tests are run through the [`Makefile`][makefile]. This is a brief description of all makefile test instructions:
5555

56-
- `test` - Runs the unit tests (`test/unit`).
57-
- `test/ci` - Runs markdown, sanity, and unit tests, installs the SDK binary, and runs the SDK subcommand and all E2E tests.
58-
- `test/sanity` - Runs sanity checks.
59-
- `test/unit` - Runs unit tests.
60-
- `test/subcommand` - Runs subcommand tests.
61-
- `test/e2e` - Runs all E2E tests (`test/e2e/go`, `test/e2e/ansible`, `test/e2e/ansible-molecule`, and `e2e/helm`).
62-
- `test/e2e/go` - Runs the go E2E test.
63-
- `test/e2e/ansible` - Runs the ansible E2E test.
64-
- `test/e2e/ansible-molecule` - Runs the ansible molecule E2E test.
65-
- `test/e2e/helm` - Runs the helm E2E test.
66-
- `test/markdown` - Runs the markdown checks
56+
- `test` - Runs the unit tests (`test-unit`).
57+
- `test-ci` - Runs markdown, sanity, and unit tests, installs the SDK binary, and runs the SDK subcommand and all E2E tests.
58+
- `test-sanity` - Runs sanity checks.
59+
- `test-unit` - Runs unit tests.
60+
- `test-subcommand` - Runs subcommand tests.
61+
- `test-e2e` - Runs all E2E tests (`test-e2e-go`, `test-e2e-ansible`, `test-e2e-ansible-molecule`, and `test-e2e-helm`).
62+
- `test-e2e-go` - Runs the go E2E test.
63+
- `test-e2e-ansible` - Runs the ansible E2E test.
64+
- `test-e2e-ansible-molecule` - Runs the ansible molecule E2E test.
65+
- `test-e2e-helm` - Runs the helm E2E test.
66+
- `test-markdown` - Runs the markdown checks
6767

6868
For more info on what these tests actually do, please see the [Travis Build][travis] doc.
6969

@@ -72,14 +72,14 @@ and the operator images will be built and stored in you local docker registry.
7272

7373
### Go E2E test flags
7474

75-
The `make test/e2e/go` command accepts an `ARGS` variable containing flags that will be passed to `go test`:
75+
The `make test-e2e-go` command accepts an `ARGS` variable containing flags that will be passed to `go test`:
7676

7777
- `-image-name` string - Sets the operator test image tag to be built and used in testing. Defaults to "quay.io/example/memcached-operator:v0.0.1"
7878
- `-local-repo` string - Sets the path to the local SDK repo being tested. Defaults to the path of the SDK repo containing e2e tests. This is useful for testing customized e2e code.
7979

8080
An example of using `ARGS` is in the note below.
8181

82-
**NOTE**: Some of these tests, specifically the ansible (`test/e2e/ansible`), helm (`test/e2e/helm`), and Go (`test/e2e/go`) tests,
82+
**NOTE**: Some of these tests, specifically the ansible (`test-e2e-ansible`), helm (`test-e2e-helm`), and Go (`test-e2e-go`) tests,
8383
only work when the cluster shares the local docker registry, as is the case with `oc cluster up` and `minikube` after running `eval $(minikube docker-env)`.
8484

8585
```sh

doc/dev/testing/travis-build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The Go, Ansible, and Helm tests then differ in what tests they run.
7575

7676
### Ansible tests
7777

78-
1. Run [ansible molecule tests][ansible-molecule]. (`make test/e2e/ansible-molecule)
78+
1. Run [ansible molecule tests][ansible-molecule]. (`make test-e2e-ansible-molecule)
7979
1. Create and configure a new ansible type memcached-operator.
8080
2. Create cluster resources.
8181
3. Run `operator-sdk test local` to run ansible molecule tests

0 commit comments

Comments
 (0)