Skip to content

Commit 519eec2

Browse files
Merge pull request openshift#564 from ritmun/osde2e-convention
SDCICD-1593 make e2e convention independent of operator convention
2 parents bbf7801 + 5cb9efe commit 519eec2

File tree

7 files changed

+12
-71
lines changed

7 files changed

+12
-71
lines changed
File renamed without changes.

boilerplate/openshift/golang-osd-operator-osde2e/README.md renamed to boilerplate/openshift/golang-osd-e2e/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Currently, this convention is only intended for OSD operators. To adopt this convention, your `boilerplate/update.cfg` should include:
1111

1212
```
13-
openshift/golang-osd-operator-osde2e
13+
openshift/golang-osd-e2e
1414
```
1515

1616
## `make` targets and functions.

boilerplate/openshift/golang-osd-operator-osde2e/e2e-template.yml renamed to boilerplate/openshift/golang-osd-e2e/e2e-template.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ parameters:
1212
required: false
1313
- name: OCM_CLIENT_SECRET
1414
required: false
15-
- name: OCM_TOKEN
16-
required: false
1715
- name: OCM_CCS
1816
required: false
1917
- name: AWS_ACCESS_KEY_ID
@@ -62,14 +60,12 @@ objects:
6260
seccompProfile:
6361
type: RuntimeDefault
6462
env:
65-
- name: TEST_IMAGES
63+
- name: AD_HOC_TEST_IMAGES
6664
value: ${TEST_IMAGE}:${IMAGE_TAG}
6765
- name: OCM_CLIENT_ID
6866
value: ${OCM_CLIENT_ID}
6967
- name: OCM_CLIENT_SECRET
7068
value: ${OCM_CLIENT_SECRET}
71-
- name: OCM_TOKEN
72-
value: ${OCM_TOKEN}
7369
- name: OCM_CCS
7470
value: ${OCM_CCS}
7571
- name: AWS_ACCESS_KEY_ID
File renamed without changes.

boilerplate/openshift/golang-osd-operator-osde2e/standard.mk renamed to boilerplate/openshift/golang-osd-e2e/standard.mk

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ REGISTRY_TOKEN ?=
4545
# TODO: Figure out how to discover this dynamically
4646
OSDE2E_CONVENTION_DIR := boilerplate/openshift/golang-osd-operator-osde2e
4747

48-
# TODO: figure out how to container-engine-login only once across multiple `make` calls
49-
.PHONY: container-build-push-one
50-
container-build-push-one: container-engine-login
51-
@(if [[ -z "${IMAGE_URI}" ]]; then echo "Must specify IMAGE_URI"; exit 1; fi)
52-
@(if [[ -z "${DOCKERFILE_PATH}" ]]; then echo "Must specify DOCKERFILE_PATH"; exit 1; fi)
53-
${CONTAINER_ENGINE} build --pull -f $(DOCKERFILE_PATH) -t $(IMAGE_URI) .
54-
${CONTAINER_ENGINE} push ${IMAGE_URI}
55-
5648
# log into quay.io
5749
.PHONY: container-engine-login
5850
container-engine-login:
@@ -72,9 +64,10 @@ e2e-binary-build:
7264
go mod tidy
7365
go test ./test/e2e -v -c --tags=osde2e -o e2e.test
7466

75-
# TODO: Push to a known image tag and commit id
76-
# push e2e image
67+
# push e2e image tagged as latest and as repo commit hash
7768
.PHONY: e2e-image-build-push
7869
e2e-image-build-push:
79-
${OSDE2E_CONVENTION_DIR}/e2e-image-build-push.sh "./test/e2e/Dockerfile $(IMAGE_REGISTRY)/$(E2E_IMAGE_REPOSITORY)/$(E2E_IMAGE_NAME):$(E2E_IMAGE_TAG)"
80-
${OSDE2E_CONVENTION_DIR}/e2e-image-build-push.sh "./test/e2e/Dockerfile $(IMAGE_REGISTRY)/$(E2E_IMAGE_REPOSITORY)/$(E2E_IMAGE_NAME):latest"
70+
${CONTAINER_ENGINE} build --pull -f test/e2e/Dockerfile -t $(E2E_IMAGE_REGISTRY)/$(E2E_IMAGE_REPOSITORY)/$(E2E_IMAGE_NAME):$(E2E_IMAGE_TAG) .
71+
${CONTAINER_ENGINE} tag $(E2E_IMAGE_REGISTRY)/$(E2E_IMAGE_REPOSITORY)/$(E2E_IMAGE_NAME):$(E2E_IMAGE_TAG) $(E2E_IMAGE_REGISTRY)/$(E2E_IMAGE_REPOSITORY)/$(E2E_IMAGE_NAME):latest
72+
${CONTAINER_ENGINE} push $(E2E_IMAGE_REGISTRY)/$(E2E_IMAGE_REPOSITORY)/$(E2E_IMAGE_NAME):$(E2E_IMAGE_TAG)
73+
${CONTAINER_ENGINE} push $(E2E_IMAGE_REGISTRY)/$(E2E_IMAGE_REPOSITORY)/$(E2E_IMAGE_NAME):latest

boilerplate/openshift/golang-osd-operator-osde2e/update renamed to boilerplate/openshift/golang-osd-e2e/update

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,8 @@ DISABLE_JUNIT_REPORT=true KUBECONFIG=/(path-to)/kubeconfig ./(path-to)/bin/gink
105105
EOF
106106

107107
sed -e "s/\${OPERATOR_NAME}/${OPERATOR_NAME}/" $(dirname $0)/e2e-template.yml >"${E2E_SUITE_DIRECTORY}/e2e-template.yml"
108+
109+
# todo: remove after file is renamed in ALL consumer repos
110+
if [ -f "${E2E_SUITE_DIRECTORY}/test-harness-template.yml" ]; then
111+
rm -f "${E2E_SUITE_DIRECTORY}/test-harness-template.yml"
112+
fi

boilerplate/openshift/golang-osd-operator-osde2e/e2e-image-build-push.sh

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

0 commit comments

Comments
 (0)