mirror of
https://github.com/openshift/community.okd.git
synced 2026-07-25 00:44:32 +00:00
17
Makefile
17
Makefile
@@ -6,34 +6,25 @@ VERSION = 3.0.1
|
|||||||
SANITY_TEST_ARGS ?= --docker --color
|
SANITY_TEST_ARGS ?= --docker --color
|
||||||
UNITS_TEST_ARGS ?= --docker --color
|
UNITS_TEST_ARGS ?= --docker --color
|
||||||
PYTHON_VERSION ?= `python3 -c 'import platform; print("{0}.{1}".format(platform.python_version_tuple()[0], platform.python_version_tuple()[1]))'`
|
PYTHON_VERSION ?= `python3 -c 'import platform; print("{0}.{1}".format(platform.python_version_tuple()[0], platform.python_version_tuple()[1]))'`
|
||||||
# this expression compute the install path once for all the execution
|
|
||||||
# See: https://stackoverflow.com/questions/44114466/how-to-declare-a-deferred-variable-that-is-computed-only-once-for-all
|
|
||||||
INSTALL_PATH ?= $(eval INSTALL_PATH := $(shell mktemp -d))$(INSTALL_PATH)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f community-okd-$(VERSION).tar.gz
|
rm -f community-okd-$(VERSION).tar.gz
|
||||||
rm -f redhat-openshift-$(VERSION).tar.gz
|
rm -f redhat-openshift-$(VERSION).tar.gz
|
||||||
rm -rf $(INSTALL_PATH)
|
rm -rf ansible_collections
|
||||||
|
|
||||||
build: clean
|
build: clean
|
||||||
ansible-galaxy collection build
|
ansible-galaxy collection build
|
||||||
|
|
||||||
install: build
|
install: build
|
||||||
ansible-galaxy collection install --force -p $(INSTALL_PATH) community-okd-$(VERSION).tar.gz
|
|
||||||
|
|
||||||
install-docker: build
|
|
||||||
ansible-galaxy collection install --force -p ansible_collections community-okd-$(VERSION).tar.gz
|
ansible-galaxy collection install --force -p ansible_collections community-okd-$(VERSION).tar.gz
|
||||||
|
|
||||||
sanity: install
|
sanity: install
|
||||||
cd $(INSTALL_PATH)/ansible_collections/community/okd && ansible-test sanity -v --python $(PYTHON_VERSION) $(SANITY_TEST_ARGS) && rm -rf $(INSTALL_PATH)
|
cd ansible_collections/community/okd && ansible-test sanity -v --python $(PYTHON_VERSION) $(SANITY_TEST_ARGS)
|
||||||
|
|
||||||
units: install
|
units: install
|
||||||
cd $(INSTALL_PATH)/ansible_collections/community/okd && ansible-test units -v --python $(PYTHON_VERSION) $(UNITS_TEST_ARGS) && rm -rf $(INSTALL_PATH)
|
cd ansible_collections/community/okd && ansible-test units -v --python $(PYTHON_VERSION) $(UNITS_TEST_ARGS)
|
||||||
|
|
||||||
molecule: install
|
molecule: install
|
||||||
cd $(INSTALL_PATH)/ansible_collections/community/okd && molecule test && rm -rf $(INSTALL_PATH)
|
|
||||||
|
|
||||||
molecule-docker: install-docker
|
|
||||||
molecule test
|
molecule test
|
||||||
|
|
||||||
test-integration: upstream-test-integration downstream-test-integration
|
test-integration: upstream-test-integration downstream-test-integration
|
||||||
@@ -49,7 +40,7 @@ upstream-test-sanity: sanity
|
|||||||
|
|
||||||
upstream-test-units: units
|
upstream-test-units: units
|
||||||
|
|
||||||
upstream-test-integration: molecule-docker
|
upstream-test-integration: molecule
|
||||||
|
|
||||||
downstream-test-sanity:
|
downstream-test-sanity:
|
||||||
./ci/downstream.sh -s
|
./ci/downstream.sh -s
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ f_text_sub()
|
|||||||
sed -i.bak "s/[[:space:]]okd:$/ openshift:/" "${_build_dir}/meta/runtime.yml"
|
sed -i.bak "s/[[:space:]]okd:$/ openshift:/" "${_build_dir}/meta/runtime.yml"
|
||||||
|
|
||||||
find "${_build_dir}" -type f ! -name galaxy.yml -exec sed -i.bak "s/community\.okd/redhat\.openshift/g" {} \;
|
find "${_build_dir}" -type f ! -name galaxy.yml -exec sed -i.bak "s/community\.okd/redhat\.openshift/g" {} \;
|
||||||
find "${_build_dir}" -type f ! -name galaxy.yml -exec sed -i.bak "s/group\/redhat\.openshift\.okd/redhat\.openshift\.openshift/g" {} \;
|
|
||||||
find "${_build_dir}" -type f -name "*.bak" -delete
|
find "${_build_dir}" -type f -name "*.bak" -delete
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +227,7 @@ f_test_integration_option()
|
|||||||
f_common_steps
|
f_common_steps
|
||||||
pushd "${_build_dir}" || return
|
pushd "${_build_dir}" || return
|
||||||
f_log_info "INTEGRATION TEST WD: ${PWD}"
|
f_log_info "INTEGRATION TEST WD: ${PWD}"
|
||||||
make molecule-docker
|
make molecule
|
||||||
popd || return
|
popd || return
|
||||||
f_cleanup
|
f_cleanup
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user