Skip to content

Commit

Permalink
#841 - move to after subfolder CD and test for .lagoon.yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
twardnw committed Feb 5, 2019
1 parent 6d24b71 commit 791583c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions images/oc-build-deploy-dind/build-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ else
/oc-build-deploy/scripts/git-checkout-pull.sh "$SOURCE_REPOSITORY" "$GIT_REF"
fi

INJECT_GIT_SHA=$(cat .lagoon.yml | shyaml get-value environment_variables.git_sha false)
if [ "$INJECT_GIT_SHA" == "true" ]
then
LAGOON_GIT_SHA=`git rev-parse HEAD`
else
LAGOON_GIT_SHA="0000000000000000"
fi

if [[ -n "$SUBFOLDER" ]]; then
cd $SUBFOLDER
fi
Expand All @@ -34,6 +26,14 @@ if [ ! -f .lagoon.yml ]; then
echo "no .lagoon.yml file found"; exit 1;
fi

INJECT_GIT_SHA=$(cat .lagoon.yml | shyaml get-value environment_variables.git_sha false)
if [ "$INJECT_GIT_SHA" == "true" ]
then
LAGOON_GIT_SHA=`git rev-parse HEAD`
else
LAGOON_GIT_SHA="0000000000000000"
fi

DOCKER_REGISTRY_TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)

docker login -u=jenkins -p="${DOCKER_REGISTRY_TOKEN}" ${OPENSHIFT_REGISTRY}
Expand Down

0 comments on commit 791583c

Please sign in to comment.