Skip to content

Commit

Permalink
Merge pull request #66 from yiyinglovecoding/cloudbuild
Browse files Browse the repository at this point in the history
[EZ] remove text color info in cloudbuild logs
  • Loading branch information
yiyinglovecoding authored Oct 16, 2023
2 parents aaaf32c + dfb37e6 commit 3059f5a
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions ray-on-gke/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ steps:
- id: 'validate platform'
name: 'gcr.io/$PROJECT_ID/terraform'
script: |
terraform init
terraform validate
terraform init -no-color
terraform validate -no-color
dir: 'gke-platform/'
waitFor: ['-']

- id: 'validate user'
name: 'gcr.io/$PROJECT_ID/terraform'
script: |
terraform init
terraform validate
terraform init -no-color
terraform validate -no-color
dir: 'ray-on-gke/user/'
waitFor: ['-']

Expand All @@ -25,7 +25,7 @@ steps:
- |
terraform apply -var=project_id=$PROJECT_ID \
-var=cluster_name=ray-$SHORT_SHA-$_PR_NUMBER-cluster \
-var=region=$_ZONE -auto-approve \
-var=region=$_ZONE -auto-approve -no-color \
|| ( terraform destroy -auto-approve && exit 1 )
dir: 'gke-platform/'
waitFor: ['validate platform', 'validate user']
Expand All @@ -52,19 +52,23 @@ steps:
-var=project_id=$PROJECT_ID \
-var=namespace=$SHORT_SHA \
-var=service_account=$_USER_NAME-$SHORT_SHA-system-account \
-auto-approve || ( echo "false" > /workspace/user_result )
-auto-approve -no-color \
|| ( echo "false" > /workspace/user_result )
# Make sure pods are running
kubectl wait --all pods -n $SHORT_SHA --for=condition=Ready --timeout=300s
kubectl port-forward -n $SHORT_SHA service/example-cluster-kuberay-head-svc 8265:8265 &
# Wait port-forwarding to take its place
sleep 5s
ray job submit --working-dir ../example_ray_job_scripts --address=http://127.0.0.1:8265 -- python ray_job.py || ( echo "false" >> /workspace/ray_result.txt )
ray job submit --working-dir ../example_ray_job_scripts \
--address=http://127.0.0.1:8265 -- python ray_job.py \
|| ( echo "false" >> /workspace/ray_result.txt )
terraform destroy -var=project_id=$PROJECT_ID \
-var=namespace=$SHORT_SHA \
-var=service_account=$_USER_NAME-$SHORT_SHA-system-account \
-auto-approve
-auto-approve -no-color
dir: 'ray-on-gke/user/'
waitFor: ['get kube config']

Expand Down

0 comments on commit 3059f5a

Please sign in to comment.