forked from redhat-openshift-ecosystem/operator-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (53 loc) · 2.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
-include .env
-include .set_env
# Default tag is gnerated from the current timestamp
TAG ?= $(shell date +%s)
PIPELINE_IMAGE_REPO ?= quay.io/redhat-isv/operator-pipelines-test-image
PIPELINE_IMAGE ?= $(PIPELINE_IMAGE_REPO):$(TAG)
# For local tests use a version-release based on the latest sucesfull
# pipeline run in Github action and bump up the release number
# https://github.com/redhat-openshift-ecosystem/operator-pipelines/actions/workflows/integration-tests.yml
OPERATOR_VERSION_RELEASE ?= 1-1
OPERATOR_VERSION ?= 0.1.$(OPERATOR_VERSION_RELEASE)
.PHONY: build-and-test-isv
build-and-test-isv:
@echo "Building and testing ISV operator pipelines..."
$(MAKE) build
$(MAKE) integration-test-isv TAG=$(TAG)
.PHONY: build-and-test-community
build-and-test-community:
@echo "Building and testing community operator pipelines..."
$(MAKE) build
$(MAKE) integration-test-community TAG=$(TAG)
.PHONY: build
build:
@echo "Building..."
podman build -t pipelines . -f operator-pipeline-images/Dockerfile
@echo "Tagging..."
podman tag pipelines $(PIPELINE_IMAGE_REPO):$(TAG)
podman push $(PIPELINE_IMAGE_REPO):$(TAG)
.PHONY: integration-test-isv
integration-test-isv:
ansible-playbook \
ansible/playbooks/operator-pipeline-integration-tests.yml \
-i ansible/inventory/operator-pipeline-integration-tests \
-e oc_namespace=$(USER)-isv-test-$(OPERATOR_VERSION_RELEASE) \
-e operator_bundle_version=$(OPERATOR_VERSION) \
-e operator_pipeline_image_pull_spec=$(PIPELINE_IMAGE) \
-e suffix=123 \
--skip-tags=signing-pipeline \
-vv \
--vault-password-file ansible/vault-password
.PHONY: integration-test-community
integration-test-community:
@echo "Running integration tests..."
ansible-playbook \
ansible/playbooks/community-operators-integration-tests.yaml \
-i ansible/inventory/operator-pipeline-integration-tests \
-e oc_namespace=$(USER)-comm-test-$(OPERATOR_VERSION_RELEASE) \
-e operator_bundle_version=$(OPERATOR_VERSION) \
-e operator_pipeline_image_pull_spec=$(PIPELINE_IMAGE) \
-e suffix=8c6beec \
--skip-tags=signing-pipeline,import-index-images \
-vv \
--vault-password-file ansible/vault-password