ai cooking
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

use deploy files from origin/master (#518)

Co-authored-by: paul miller <paul.miller>

authored by

Paul Miller
paul miller
and committed by
GitHub
cbacbbf5 60a86aad

+11 -12
+11 -12
deploy/deploy.sh
··· 2 2 set -euo pipefail 3 3 4 4 ref="${1:-origin/master}" 5 - deploy_dir="deploy" 6 - manifest_files=( 7 - "${deploy_dir}/deploy.yaml" 8 - "${deploy_dir}/cronjob-careme-mail.yaml" 9 - "${deploy_dir}/cronjob-albertsons-scrape.yaml" 10 - "${deploy_dir}/cronjob-albertsons-reese84.yaml" 11 - "${deploy_dir}/cronjob-wholefoods-scrape.yaml" 5 + manifest_paths=( 6 + "deploy/deploy.yaml" 7 + "deploy/cronjob-careme-mail.yaml" 8 + "deploy/cronjob-albertsons-scrape.yaml" 9 + "deploy/cronjob-albertsons-reese84.yaml" 10 + "deploy/cronjob-wholefoods-scrape.yaml" 12 11 ) 13 12 namespace="${2:-careme}" 14 13 short_len=7 ··· 32 31 33 32 export IMAGE_TAG="${commit_hash:0:${short_len}}" 34 33 35 - for manifest_file in "${manifest_files[@]}"; do 36 - if [[ ! -f "${manifest_file}" ]]; then 37 - echo "error: deploy file not found: ${manifest_file}" >&2 34 + for manifest_path in "${manifest_paths[@]}"; do 35 + if ! git cat-file -e "${ref}:${manifest_path}" 2>/dev/null; then 36 + echo "error: deploy file not found in ref '${ref}': ${manifest_path}" >&2 38 37 exit 1 39 38 fi 40 39 done 41 40 42 41 echo "Deploying image: ${IMAGE_TAG}" 43 - for manifest_file in "${manifest_files[@]}"; do 44 - envsubst '${IMAGE_TAG}' <"${manifest_file}" | kubectl apply -f - -n "${namespace}" 42 + for manifest_path in "${manifest_paths[@]}"; do 43 + git show "${ref}:${manifest_path}" | envsubst '${IMAGE_TAG}' | kubectl apply -f - -n "${namespace}" 45 44 done 46 45 47 46 echo "Waiting for rollout of deployment/careme"