diff --git a/run/helloworld/cloudbuild.yaml b/run/helloworld/cloudbuild.yaml new file mode 100644 index 00000000000..0580dc953cd --- /dev/null +++ b/run/helloworld/cloudbuild.yaml @@ -0,0 +1,19 @@ +substitutions: + _REGION: us-central1 + _LOCATION: us-south1 + _IMAGE: hello-world + _REPOSITORY: hello-world-repo +steps: + # Build the container image for Artifact Registry +- name: 'gcr.io/cloud-builders/docker' + args: [ 'build', '-t', '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_IMAGE}', '.' ] + dir: 'run/helloworld' + # Push the container image to Artifact Registry +- name: 'gcr.io/cloud-builders/docker' + args: ['push', '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_IMAGE}'] +# Deploy container image to Cloud Run +- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' + entrypoint: gcloud + args: ['run', 'deploy', '${_IMAGE}', '--image', '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_IMAGE}', '--region', '${_REGION}'] +images: +- ${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_IMAGE}:$COMMIT_SHA \ No newline at end of file diff --git a/run/idp-sql/cloudbuild.yaml b/run/idp-sql/cloudbuild.yaml new file mode 100644 index 00000000000..badc29245ef --- /dev/null +++ b/run/idp-sql/cloudbuild.yaml @@ -0,0 +1,22 @@ +substitutions: + _REGION: us-central1 + _LOCATION: us-central1 + _IMAGE: idp-sql + _REPOSITORY: idp-sql-repo +steps: + # Build the container image for Artifact Registry +- name: 'gcr.io/cloud-builders/docker' + args: [ 'build', '-t', '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_IMAGE}', '.' ] + dir: 'run/helloworld' + # Push the container image to Artifact Registry +- name: 'gcr.io/cloud-builders/docker' + args: ['push', '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_IMAGE}'] +# Deploy container image to Cloud Run +- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' + entrypoint: gcloud + args: ['run', 'deploy', '${_IMAGE}', '--image', '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_IMAGE}', '--region', '${_REGION}', + '--service-account', 'idp-sql-identity@zanthos-22.iam.gserviceaccount.com', + '--add-cloudsql-instances', 'zanthos-22:us-central1:idp-sql', + '--update-secrets', 'CLOUD_SQL_CREDENTIALS_SECRET=idp-sql-secrets:latest'] +images: +- ${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_IMAGE}:$COMMIT_SHA \ No newline at end of file diff --git a/run/idp-sql/src/main/resources/static/config.js b/run/idp-sql/src/main/resources/static/config.js index 9bdd4587a10..02883d73210 100644 --- a/run/idp-sql/src/main/resources/static/config.js +++ b/run/idp-sql/src/main/resources/static/config.js @@ -1,6 +1,7 @@ // [START cloudrun_end_user_firebase_config] -const config = { - apiKey: "API_KEY", - authDomain: "PROJECT_ID.firebaseapp.com", +var config = { + apiKey: "", + authDomain: "", }; +firebase.initializeApp(config); // [END cloudrun_end_user_firebase_config]