Skip to content

feat: add GCP project integration#16

Merged
h13 merged 2 commits intomainfrom
feat/gcp-project-integration
Mar 27, 2026
Merged

feat: add GCP project integration#16
h13 merged 2 commits intomainfrom
feat/gcp-project-integration

Conversation

@h13
Copy link
Copy Markdown
Owner

@h13 h13 commented Mar 27, 2026

Summary

  • Add --gcp-project <NUMBER> option to scripts/init.sh — binds GAS projects to a standard GCP project via clasp create --parentId, includes projectId in CLASP_JSON, and sets GCP_PROJECT_NUMBER as a CI/CD variable
  • Add src/setProperties.ts + scripts/set-properties.sh for Script Properties injection via clasp run
  • Add auto-injection step in CD workflows (GitHub Actions + GitLab CI) — runs when both GCP_PROJECT_NUMBER and SCRIPT_PROPERTIES are set
  • Add post-deploy hook examples (.github/hooks/post-deploy.sh.example, .gitlab/post-deploy.yml.example)
  • Update README (EN/JA), setup docs, jest config, and .templatesyncignore

Motivation

  • Centralize Cloud Logging / Error Reporting / API usage monitoring across all GAS apps
  • Enable clasp run so CI/CD can automatically inject Script Properties (API keys, webhooks, etc.)

Test plan

  • pnpm run check passes (lint + typecheck + test)
  • init.sh --gcp-project 123456789 creates GAS projects with --parentId
  • CLASP_JSON includes projectId field when GCP project is specified
  • set-properties.sh --json '{"KEY":"value"}' calls clasp run setScriptProperties
  • CD pipeline skips property injection when GCP_PROJECT_NUMBER or SCRIPT_PROPERTIES is not set
  • Backward compatible — init.sh without --gcp-project works as before

h13 added 2 commits March 27, 2026 21:45
Bind all GAS projects to a standard GCP project for Cloud Logging,
Error Reporting, and API usage monitoring. Enable clasp run for CI/CD
Script Properties injection.

- Add --gcp-project option to init.sh (clasp create --parentId)
- Add setScriptProperties GAS function + set-properties.sh wrapper
- Add auto-injection step in CD workflows (GitHub Actions + GitLab CI)
- Add post-deploy hook examples for both platforms
- Update README, setup docs, and template sync config
@h13 h13 merged commit e4b3368 into main Mar 27, 2026
4 checks passed
@h13 h13 deleted the feat/gcp-project-integration branch March 27, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant