variables:
GCP_ZONE: us-central1-a
stages:
- build
- deploy
build:
image: node:12.14.0
stage: build
only:
- master
script:
- npm install
deploy:
stage: deploy
image: google/cloud-sdk:latest
only:
- master
dependencies:
- build
script:
#
# Authenticate using the service account stored here: https://gitlab.com/groups/{YOUR_GITLAB_PROJECT}/-/settings/ci_cd
- echo $GCLOUD_SERVICE_KEY > ${HOME}/gcloud-service-key.json
- gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
# Register GCP Project
# - gcloud auth activate-service-account --key-file=$GCLOUD_SERVICE_KEY
- gcloud config set project $PROJECT_ID
# Deploy
- gcloud beta functions deploy $FUNCTION_NAME --runtime nodejs10 --trigger-http
-
Notifications
You must be signed in to change notification settings - Fork 0
d1sco/gitlab-pipeline-gcp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published