Skip to content

Commit

Permalink
- quoting paths
Browse files Browse the repository at this point in the history
- extra debugging
  • Loading branch information
elipe17 committed Sep 6, 2024
1 parent 7625f9a commit 0ad5e1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .circleci/deployment/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
command: |
ls
pwd
./scripts/build-and-tag-images.sh <<parameters.backend-appname>> <<parameters.frontend-appname>> $CIRCLE_WORKING_DIRECTORY/tdrs-backend $CIRCLE_WORKING_DIRECTORY/tdrs-frontend $CIRCLE_BUILD_NUM $CIRCLE_SHA1 $CIRCI_DOCKER_LOGIN tdp-circi
./scripts/build-and-tag-images.sh <<parameters.backend-appname>> <<parameters.frontend-appname>> "$CIRCLE_WORKING_DIRECTORY/tdrs-backend" "$CIRCLE_WORKING_DIRECTORY/tdrs-frontend" $CIRCLE_BUILD_NUM $CIRCLE_SHA1 "$CIRCI_DOCKER_LOGIN" tdp-circi
deploy-cloud-dot-gov:
parameters:
Expand Down
8 changes: 6 additions & 2 deletions scripts/build-and-tag-images.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e

if [ "$#" -ne 8 ]; then
echo "Error, this script expects 8 parameters."
Expand All @@ -18,11 +19,14 @@ TAG="${BUILD_DATE}_build-${BUILD_NUM}_${COMMIT_HASH}"

BUILD_DATE=`date +%F`

ls $BACKEND_PATH
ls $FRONTEND_PATH

build_and_tag() {
echo "$DOCKER_LOGIN" | docker login https://tdp-docker.dev.raftlabs.tech -u $DOCKER_USER --password-stdin
for platform in "linux/amd64" "linux/arm64"; do
docker build --platform $platform -t tdp-docker.dev.raftlabs.tech/$BACKEND_APP_NAME:$TAG -t tdp-docker.dev.raftlabs.tech/$BACKEND_APP_NAME:latest $BACKEND_PATH
docker build --platform $platform -t tdp-docker.dev.raftlabs.tech/$FRONTEND_APP_NAME:$TAG -t tdp-docker.dev.raftlabs.tech/$FRONTEND_APP_NAME:latest $FRONTEND_PATH
docker build --platform $platform -t tdp-docker.dev.raftlabs.tech/$BACKEND_APP_NAME:$TAG -t tdp-docker.dev.raftlabs.tech/$BACKEND_APP_NAME:latest "$BACKEND_PATH"
docker build --platform $platform -t tdp-docker.dev.raftlabs.tech/$FRONTEND_APP_NAME:$TAG -t tdp-docker.dev.raftlabs.tech/$FRONTEND_APP_NAME:latest "$FRONTEND_PATH"

docker push tdp-docker.dev.raftlabs.tech/$BACKEND_APP_NAME --all-tags
docker push tdp-docker.dev.raftlabs.tech/$FRONTEND_APP_NAME --all-tags
Expand Down

0 comments on commit 0ad5e1c

Please sign in to comment.