-
Notifications
You must be signed in to change notification settings - Fork 59
/
Makefile
122 lines (109 loc) · 4.14 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
-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-deploy-playground
build-and-deploy-playground:
@echo "Building and deploying playground..."
$(MAKE) build
$(MAKE) deploy-playground TAG=$(TAG)
.PHONY: deploy-playground
deploy-playground:
@echo "Deploying playground..."
ansible-playbook \
ansible/playbooks/deploy.yml \
-e oc_namespace=$(USER)-playground \
-e integration_tests_operator_bundle_version=$(OPERATOR_VERSION) \
-e operator_pipeline_image_pull_spec=$(PIPELINE_IMAGE) \
-e suffix=123 \
-e ocp_token=`oc whoami -t` \
-e branch=$(USER) \
-e env=stage \
--skip-tags ci,import-index-images \
-vv \
--vault-password-file ansible/vault-password
.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-and-test-isv-fbc-bundle
build-and-test-isv-fbc-bundle:
@echo "Building and testing isv FBC operator pipelines..."
$(MAKE) build
$(MAKE) integration-test-isv-fbc-bundle TAG=$(TAG)
.PHONY: build-and-test-isv-fbc-catalog
build-and-test-isv-fbc-catalog:
@echo "Building and testing isv FBC catalog pipelines..."
$(MAKE) build
$(MAKE) integration-test-isv-fbc-catalog 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 \
-e test_type=isv \
-e oc_namespace=$(USER)-isv-test-$(OPERATOR_VERSION_RELEASE) \
-e integration_tests_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/operator-pipeline-integration-tests.yml \
-e test_type=community \
-e oc_namespace=$(USER)-comm-test-$(OPERATOR_VERSION_RELEASE) \
-e integration_tests_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
.PHONY: integration-test-isv-fbc-bundle
integration-test-isv-fbc-bundle:
@echo "Running integration tests..."
ansible-playbook \
ansible/playbooks/operator-pipeline-integration-tests.yml \
-e test_type=isv-fbc-bundle \
-e oc_namespace=$(USER)-isv-fbc-bundle-test-$(OPERATOR_VERSION_RELEASE) \
-e integration_tests_operator_bundle_version=$(OPERATOR_VERSION) \
-e operator_pipeline_image_pull_spec=$(PIPELINE_IMAGE) \
-e suffix=8c6beec \
--skip-tags=signing-pipeline \
-vv \
--vault-password-file ansible/vault-password
.PHONY: integration-test-isv-fbc-catalog
integration-test-isv-fbc-catalog:
@echo "Running integration tests..."
ansible-playbook \
ansible/playbooks/operator-pipeline-integration-tests.yml \
-e test_type=isv-fbc-catalog \
-e oc_namespace=$(USER)-fbc-catalog-test-$(OPERATOR_VERSION_RELEASE) \
-e integration_tests_operator_bundle_version=$(OPERATOR_VERSION) \
-e operator_pipeline_image_pull_spec=$(PIPELINE_IMAGE) \
-e suffix=8c6beec \
--skip-tags=signing-pipeline \
-vvvv \
--vault-password-file ansible/vault-password