Skip to content

Commit

Permalink
Cloud build accept optional param with path (#1989)
Browse files Browse the repository at this point in the history
  • Loading branch information
PopDaph authored Oct 6, 2023
1 parent b6a590f commit acf840c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-alerting-temporal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Build the image on Cloud Build
run: |
chmod +x ./k8s/cloud-build.sh
./k8s/cloud-build.sh alerting/temporal
./k8s/cloud-build.sh alerting-temporal alerting/temporal
- name: Deploy the image on Kubernetes
run: |
Expand Down
4 changes: 3 additions & 1 deletion k8s/cloud-build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/sh
# first arg : name of image to build
# second arg (optional) : working directory. If not provided, it defaults to "../$1"
set -e


SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)"
WORKING_DIR="${2:-${SCRIPT_DIR}/../$1}"

# Change the current working directory to the directory in which to build the image
cd "${SCRIPT_DIR}/../$1"
cd "$WORKING_DIR"

# Check the current working directory
echo "Current working directory is $(pwd)"
Expand Down

0 comments on commit acf840c

Please sign in to comment.