-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
attempt to fix directory issue in cloudbuild.yaml
- Loading branch information
1 parent
6545899
commit 1b7b33c
Showing
1 changed file
with
19 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |