From 5d6d197b495bf3e82ba2ca517397a5ee3b61c8e0 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Mon, 17 Oct 2016 13:25:49 +0530 Subject: [PATCH 1/2] ci: quote variables in bash conditional statements --- bitnami/moodle/circle.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitnami/moodle/circle.yml b/bitnami/moodle/circle.yml index c392a05641c1..0130c1068188 100644 --- a/bitnami/moodle/circle.yml +++ b/bitnami/moodle/circle.yml @@ -21,7 +21,7 @@ deployment: branch: master commands: - > - if [ -n $DOCKER_PASS ]; then + if [ -n "$DOCKER_PASS" ]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS docker build --rm=false -t $DOCKER_PROJECT/$IMAGE_NAME:_ . docker push $DOCKER_PROJECT/$IMAGE_NAME:_ @@ -30,7 +30,7 @@ deployment: tag: /^[0-9].*/ commands: - > - if [ -n $DOCKER_PASS ]; then + if [ -n "$DOCKER_PASS" ]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS docker build --rm=false -t $DOCKER_PROJECT/$IMAGE_NAME:$CIRCLE_TAG . docker tag $DOCKER_PROJECT/$IMAGE_NAME:$CIRCLE_TAG $DOCKER_PROJECT/$IMAGE_NAME:latest @@ -38,7 +38,7 @@ deployment: docker push $DOCKER_PROJECT/$IMAGE_NAME:latest fi - > - if [ -n $GCLOUD_SERVICE_KEY ]; then + if [ -n "$GCLOUD_SERVICE_KEY" ]; then echo $GCLOUD_SERVICE_KEY | base64 --decode > ${HOME}/gcloud-service-key.json gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json echo 'ENV BITNAMI_CONTAINER_ORIGIN=GCR' >> Dockerfile From f58ee5980d8b78f07afd59e652a931c5a5a1c3d1 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Mon, 17 Oct 2016 13:25:49 +0530 Subject: [PATCH 2/2] ci: enforce stricter tagging rules --- bitnami/moodle/circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitnami/moodle/circle.yml b/bitnami/moodle/circle.yml index 0130c1068188..0b560e55a74c 100644 --- a/bitnami/moodle/circle.yml +++ b/bitnami/moodle/circle.yml @@ -27,7 +27,7 @@ deployment: docker push $DOCKER_PROJECT/$IMAGE_NAME:_ fi release: - tag: /^[0-9].*/ + tag: /^[0-9].*-r[0-9]+$/ commands: - > if [ -n "$DOCKER_PASS" ]; then