Skip to content

Commit d3c97aa

Browse files
committed
Avoid calling git in wercker integration test pipeline
1 parent 402ef59 commit d3c97aa

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

src/integration-tests/bash/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function declare_reset {
184184
# - also echos same if 'echo' passed as the second parameter
185185
#
186186
function declare_test_trace {
187-
local GIT_ABBREVIATED_COMMIT_HASH="`git log --pretty=format:%h -n 1`"
187+
local GIT_ABBREVIATED_COMMIT_HASH="${WERCKER_GIT_COMMIT:-`git log --pretty=format:%h -n 1`}"
188188
local str="##TEST_INFO:${GIT_ABBREVIATED_COMMIT_HASH}:${TEST_ID}:${TEST_VERSION}:${1}##"
189189
trace "$str"
190190
if [ "$2" = echo ]; then
@@ -2234,7 +2234,7 @@ function test_suite_init {
22342234
export PV_ROOT=${PV_ROOT:-$RESULT_ROOT}
22352235
export NODEPORT_HOST=${K8S_NODEPORT_HOST:-`hostname | awk -F. '{print $1}'`}
22362236
export JVM_ARGS="${JVM_ARGS:-'-Dweblogic.StdoutDebugEnabled=false'}"
2237-
export BRANCH_NAME="${BRANCH_NAME}"
2237+
export BRANCH_NAME="${BRANCH_NAME:-$WERCKER_GIT_BRANCH}"
22382238

22392239
if [ -z "$BRANCH_NAME" ]; then
22402240
export BRANCH_NAME="`git branch | grep \* | cut -d ' ' -f2-`"

wercker.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,21 @@ integration-test: # run in weblogic container so that wlst is available
124124
kubectl delete secret docker-store --ignore-not-found=true
125125
kubectl create secret docker-registry docker-store --docker-server=index.docker.io/v1/ --docker-username=$DOCKER_USERNAME --docker-password=$DOCKER_PASSWORD --docker-email=$DOCKER_EMAIL
126126
127-
kubectl delete ns test --ignore-not-found=true
128-
kubectl create ns test
129-
kubectl create secret docker-registry docker-store -n test --docker-server=index.docker.io/v1/ --docker-username=$DOCKER_USERNAME --docker-password=$DOCKER_PASSWORD --docker-email=$DOCKER_EMAIL
127+
kubectl delete ns test1 --ignore-not-found=true
128+
kubectl create ns test1
129+
kubectl create secret docker-registry docker-store -n test1 --docker-server=index.docker.io/v1/ --docker-username=$DOCKER_USERNAME --docker-password=$DOCKER_PASSWORD --docker-email=$DOCKER_EMAIL
130130
131131
kubectl delete ns test2 --ignore-not-found=true
132132
kubectl create ns test2
133133
kubectl create secret docker-registry docker-store -n test2 --docker-server=index.docker.io/v1/ --docker-username=$DOCKER_USERNAME --docker-password=$DOCKER_PASSWORD --docker-email=$DOCKER_EMAIL
134134
135-
kubectl delete ns weblogic-operator --ignore-not-found=true
136-
kubectl create ns weblogic-operator
137-
#kubectl delete secret quay-io --ignore-not-found=true
138-
kubectl create secret docker-registry quay-io -n weblogic-operator --docker-server=quay.io --docker-username=$QUAY_USERNAME --docker-password=$QUAY_PASSWORD --docker-email=$QUAY_EMAIL
135+
kubectl delete ns weblogic-operator-1 --ignore-not-found=true
136+
kubectl create ns weblogic-operator-1
137+
kubectl create secret docker-registry quay-io -n weblogic-operator-1 --docker-server=quay.io --docker-username=$QUAY_USERNAME --docker-password=$QUAY_PASSWORD --docker-email=$QUAY_EMAIL
138+
139+
kubectl delete ns weblogic-operator-2 --ignore-not-found=true
140+
kubectl create ns weblogic-operator-2
141+
kubectl create secret docker-registry quay-io -n weblogic-operator-2 --docker-server=quay.io --docker-username=$QUAY_USERNAME --docker-password=$QUAY_PASSWORD --docker-email=$QUAY_EMAIL
139142
140143
export IMAGE_NAME_OPERATOR="quay.io/markxnelson/weblogic-kubernetes-operator"
141144
export IMAGE_TAG_OPERATOR="$WERCKER_GIT_COMMIT"

0 commit comments

Comments
 (0)