Skip to content

Commit

Permalink
skip: run sandbox step (cannot run script otherwise)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaudet-pass committed Jan 23, 2025
1 parent 6c4eccc commit 32f77bf
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/dev_on_workflow_deploy_pullrequests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,26 +265,26 @@ jobs:
argocd_app_wait: true
prune: true

- name: "Run sandbox"
run: |
set -e
VERSION="${{ inputs.app_version }}"
export ENVIRONMENT="${{ inputs.environment }}"
IMAGE="europe-west1-docker.pkg.dev/passculture-infra-prod/pass-culture-artifact-registry/pcapi"
export IMAGE="${IMAGE}:${VERSION}"
export PRID=${{ github.event.pull_request.number }}
#- name: "Run sandbox"
#run: |
#set -e
#VERSION="${{ inputs.app_version }}"
#export ENVIRONMENT="${{ inputs.environment }}"
#IMAGE="europe-west1-docker.pkg.dev/passculture-infra-prod/pass-culture-artifact-registry/pcapi"
#export IMAGE="${IMAGE}:${VERSION}"
#export PRID=${{ github.event.pull_request.number }}

echo "=== exec: flask sandbox -n industrial"
export DATE=$(date +"%Y-%m-%d-%H-%M-%S")
start=$(date +%s.%N)
envsubst < .github/workflows/templates/pullrequest-db-init-05.yaml | kubectl -n pcapi-pr-${{ github.event.pull_request.number }} apply -f -
while true;
do
kubectl logs -n pcapi-pr-${{ github.event.pull_request.number }} -f jobs/pullrequest-db-init-05-${DATE} && break
done
kubectl wait --for=condition=complete --timeout=1800s -n pcapi-pr-${{ github.event.pull_request.number }} jobs/pullrequest-db-init-05-${DATE}
end=$(date +%s.%N)
duration=`date -d@$(bc <<< "$end - $start") -u +%H:%M:%S`
{
echo "| flask sandbox -n industrial | $duration |"
} >> $GITHUB_STEP_SUMMARY
#echo "=== exec: flask sandbox -n industrial"
#export DATE=$(date +"%Y-%m-%d-%H-%M-%S")
#start=$(date +%s.%N)
#envsubst < .github/workflows/templates/pullrequest-db-init-05.yaml | kubectl -n pcapi-pr-${{ github.event.pull_request.number }} apply -f -
#while true;
#do
#kubectl logs -n pcapi-pr-${{ github.event.pull_request.number }} -f jobs/pullrequest-db-init-05-${DATE} && break
#done
#kubectl wait --for=condition=complete --timeout=1800s -n pcapi-pr-${{ github.event.pull_request.number }} jobs/pullrequest-db-init-05-${DATE}
#end=$(date +%s.%N)
#duration=`date -d@$(bc <<< "$end - $start") -u +%H:%M:%S`
#{
#echo "| flask sandbox -n industrial | $duration |"
#} >> $GITHUB_STEP_SUMMARY

0 comments on commit 32f77bf

Please sign in to comment.