Skip to content

Commit

Permalink
attempt to fix directory issue in cloudbuild.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
james03160927 committed May 26, 2024
1 parent 6545899 commit 1b7b33c
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,43 @@
steps:
# Step 1: Clone the GitHub repository
- name: "gcr.io/cloud-builders/git"
args: ["clone", "https://github.com/your-github-username/your-repo-name.git", "."]
dir: "/workspace"

# Step 2: Build the container image
# build the container image
- name: "gcr.io/cloud-builders/docker"
args: ["build", "-t", "us-central1-docker.pkg.dev/dreamboothy/registry-backend/registry-backend-image:$SHORT_SHA", "."]
dir: "/workspace"

# Step 3: Push the container image
# push container image
- name: "gcr.io/cloud-builders/docker"
args: ["push", "us-central1-docker.pkg.dev/dreamboothy/registry-backend/registry-backend-image:$SHORT_SHA"]

# Clone the GitHub repository
- name: "gcr.io/cloud-builders/git"
args: [ "clone", "[email protected]:Comfy-Org/registry-backend.git", "registry-backend" ]
dir: "/workspace"

# Step 4: Run database migrations for staging
# Run database migrations for staging
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
entrypoint: "bash"
args:
- "-c"
- |
- |
curl -sSL https://atlasgo.sh | sh
atlas migrate apply --dir "file:///workspace/ent/migrate/migrations" --url $$STAGING_DB_CONNECTION_STRING
atlas migrate apply --dir "file://ent/migrate/migrations" --url $$STAGING_DB_CONNECTION_STRING
secretEnv: ['STAGING_DB_CONNECTION_STRING']
dir: "/workspace"
dir: "/workspace/registry-backend"

# Step 5: Publish the release
# Publish the release
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:458.0.1'
entrypoint: 'bash'
args:
- '-c'
- >
gcloud deploy releases create release-registry-backend-$SHORT_SHA
--project=dreamboothy
--region=us-central1
--delivery-pipeline=comfy-backend-api-pipeline
--images=registry-backend-image-substitute=us-central1-docker.pkg.dev/dreamboothy/registry-backend/registry-backend-image:$SHORT_SHA
dir: "/workspace"
- '-c'
- >
gcloud deploy releases create release-registry-backend-$SHORT_SHA
--project=dreamboothy
--region=us-central1
--delivery-pipeline=comfy-backend-api-pipeline
--images=registry-backend-image-substitute=us-central1-docker.pkg.dev/dreamboothy/registry-backend/registry-backend-image:$SHORT_SHA
availableSecrets:
secretManager:
- versionName: projects/357148958219/secrets/STAGING_SUPABASE_CONNECTION_STRING/versions/latest
env: 'STAGING_DB_CONNECTION_STRING'

options:
machineType: 'E2_HIGHCPU_8'
machineType: 'E2_HIGHCPU_8'

0 comments on commit 1b7b33c

Please sign in to comment.