diff --git a/.ibm/pipelines/functions.sh b/.ibm/pipelines/functions.sh index 304da985b82..ed49cdb28b1 100644 --- a/.ibm/pipelines/functions.sh +++ b/.ibm/pipelines/functions.sh @@ -44,3 +44,16 @@ cleanup_namespaces() { fi done } + +skip_website_only() { + SKIP_IF_ONLY="website .ibm" + NAMES=$(git diff --name-only main) + for change in ${NAMES}; do + for skip in ${SKIP_IF_ONLY}; do + if [[ "$change" != "${skip}*"]]; then + return + fi + done + done + exit 0 +} diff --git a/.ibm/pipelines/kubernetes-tests.sh b/.ibm/pipelines/kubernetes-tests.sh index 5bc9ed4bd52..bc4f6fe1dd0 100755 --- a/.ibm/pipelines/kubernetes-tests.sh +++ b/.ibm/pipelines/kubernetes-tests.sh @@ -4,6 +4,8 @@ LOGFILE="pr-${GIT_PR_NUMBER}-kubernetes-tests-${BUILD_NUMBER}" source .ibm/pipelines/functions.sh +skip_website_only + ibmcloud login --apikey "${API_KEY_QE}" ibmcloud target -r "${IBM_REGION}" ibmcloud ks cluster config --cluster "${IBM_KUBERNETES_ID}" --admin diff --git a/.ibm/pipelines/nocluster-tests.sh b/.ibm/pipelines/nocluster-tests.sh index ab524c9b726..9d74367b861 100755 --- a/.ibm/pipelines/nocluster-tests.sh +++ b/.ibm/pipelines/nocluster-tests.sh @@ -4,6 +4,8 @@ LOGFILE="pr-${GIT_PR_NUMBER}-nocluster-tests-${BUILD_NUMBER}" source .ibm/pipelines/functions.sh +skip_website_only + ibmcloud login --apikey "${API_KEY_QE}" ibmcloud target -r "${IBM_REGION}" diff --git a/.ibm/pipelines/openshift-tests.sh b/.ibm/pipelines/openshift-tests.sh index d3512666b27..b5b43999f77 100755 --- a/.ibm/pipelines/openshift-tests.sh +++ b/.ibm/pipelines/openshift-tests.sh @@ -4,6 +4,8 @@ LOGFILE="pr-${GIT_PR_NUMBER}-openshift-tests-${BUILD_NUMBER}" source .ibm/pipelines/functions.sh +skip_website_only + ibmcloud login --apikey "${API_KEY_QE}" ibmcloud target -r eu-de ibmcloud oc cluster config -c "${CLUSTER_ID}" diff --git a/.ibm/pipelines/openshift-unauth-tests.sh b/.ibm/pipelines/openshift-unauth-tests.sh index c098940eb6e..f2871f8b751 100755 --- a/.ibm/pipelines/openshift-unauth-tests.sh +++ b/.ibm/pipelines/openshift-unauth-tests.sh @@ -4,6 +4,8 @@ LOGFILE="pr-${GIT_PR_NUMBER}-openshift-unauth-tests-${BUILD_NUMBER}" source .ibm/pipelines/functions.sh +skip_website_only + ibmcloud login --apikey "${API_KEY_QE}" ibmcloud target -r eu-de ibmcloud oc cluster config -c "${CLUSTER_ID}" diff --git a/.ibm/pipelines/unit-tests.sh b/.ibm/pipelines/unit-tests.sh index fa404d67205..4ab7d54bdcb 100755 --- a/.ibm/pipelines/unit-tests.sh +++ b/.ibm/pipelines/unit-tests.sh @@ -5,6 +5,8 @@ LOGFILE="pr-${GIT_PR_NUMBER}-unit-tests-${BUILD_NUMBER}" +skip_website_only + source .ibm/pipelines/functions.sh ( diff --git a/.ibm/pipelines/validate.sh b/.ibm/pipelines/validate.sh index 53f2d51b681..4e18c873762 100755 --- a/.ibm/pipelines/validate.sh +++ b/.ibm/pipelines/validate.sh @@ -5,6 +5,8 @@ LOGFILE="pr-${GIT_PR_NUMBER}-Validate-tests-${BUILD_NUMBER}" +skip_website_only + source .ibm/pipelines/functions.sh ( diff --git a/.ibm/pipelines/windows-test.sh b/.ibm/pipelines/windows-test.sh index 7fd84b701ee..bf0831ecf63 100755 --- a/.ibm/pipelines/windows-test.sh +++ b/.ibm/pipelines/windows-test.sh @@ -7,6 +7,8 @@ set -x +skip_website_only + LOGFILE="pr-${GIT_PR_NUMBER}-windows-tests-${BUILD_NUMBER}" export REPO=${REPO:-"https://github.com/redhat-developer/odo"} #copy test script inside /tmp/