Skip to content

Commit

Permalink
[#122] Copy source from local to kubernetes script
Browse files Browse the repository at this point in the history
  • Loading branch information
dedenbangkit committed Apr 12, 2022
1 parent 58cc4d5 commit 3d2636b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/copy_source_to_kubernetes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

SOURCE_PATH="$1"
CONTAINER="$2"

repo_url=$(git config --get remote.origin.url | cut -d '/' -f2 | sed 's/.git//g')
gcloud container clusters get-credentials test --zone europe-west1-d --project akvo-lumen
podname=$(kubectl get pods | grep "$repo_url" | cut -d' ' -f1)
kubectl cp "$SOURCE_PATH" "$podname:/usr/src/app/$SOURCE_PATH" -c "$CONTAINER"

0 comments on commit 3d2636b

Please sign in to comment.