Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/internal/embedded/resources/Makefile-common
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ validate-schema: ## validates values files against schema in common/clustergroup
.PHONY: argo-healthcheck
argo-healthcheck: ## Checks if all argo applications are synced
@$(ANSIBLE_RUN) rhvp.cluster_utils.argo_healthcheck

.PHONY: run-ci-tests
run-ci-tests: ## To run ci-tests, set any needed env vars
@$(ANSIBLE_RUN) rhvp.cluster_utils.run_ci_tests
14 changes: 14 additions & 0 deletions src/internal/embedded/resources/pattern.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ function version {
echo "$1" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'
}

# We need this check mostly for CI testing, we do not want to run container in container
function is_container() {
[ -n "${KUBERNETES_SERVICE_HOST:-}" ] && return 0
[ -f /.dockerenv ] && return 0
[ -f /run/.containerenv ] && return 0
return 1
}

if is_container; then
echo "Already running in a container"
exec "$@"
fi

if [ -z "${PATTERN_UTILITY_CONTAINER:-}" ]; then
PATTERN_UTILITY_CONTAINER="quay.io/validatedpatterns/utility-container"
fi
Expand Down Expand Up @@ -115,6 +128,7 @@ podman run -it --rm --pull=newer \
-e TOKEN_SECRET \
-e UUID_FILE \
-e VALUES_SECRET \
-e 'VP_*' \
"${PKI_HOST_MOUNT_ARGS[@]}" \
-v "$(pwd -P)":"$(pwd -P)" \
-v "${HOME}":"${HOME}" \
Expand Down
Loading