A Concourse resource for submitting builds to Google Cloud Build
resource_types:
- name: cloud-build
type: docker-image
source:
repository: atthavit/concourse-gcb-resource
tag: "0.0.1"
-
project
: Required. The name of the GCP project. -
json_key
: Optional. The content of GCP key file in json format. -
cloudbuild_path
: Optional. The path ofcloudbuild.yaml
-
cloudbuild_content
: Optional. The content ofcloudbuild.yaml
-
substitutions
: Optional.Example:
substitutions: _ABC: 123 _DEF: 456
-
build
: Required. The path of a directory to build. -
cloudbuild_path
: Optional. The path ofcloudbuild.yaml
. This has higher precedence than source configuration. -
cloudbuild_content
: Optional. The content ofcloudbuild.yaml
. This has higher precedence than source configuration.Example:
steps: - name: 'alpine' args: - echo - abc
-
flags_file
: Optional. The path of flags file. (see https://cloud.google.com/sdk/gcloud/reference/topic/flags-file) -
flags_file_content
: Optional. The content of flags file.Example:
flags_file_content: | --machine-type: n1-highcpu-8
-
substitutions
: Optional. This has will be merged withsource.substitutions
resource_types:
- name: cloud-build
type: docker-image
source:
repository: atthavit/concourse-gcb-resource
tag: "0.0.1"
resources:
- name: code
type: git
source:
uri: git@github.com:XXXXX/XXXXX.git
private_key: ((git.private-key))
- name: docker-image
type: cloud-build
source:
project: XXX
# from vault
json_key: ((gcp.json_key))
substitutions:
_IMAGE_TAG: test
cloudbuild_content: |
steps:
- name: gcr.io/cloud-builders/docker
args:
- build
- -t
- gcr.io/XXXX:$_IMAGE_TAG
- .
images:
- gcr.io/XXXX:$_IMAGE_TAG
jobs:
- name: build
serial: true
plan:
- get: code
trigger: true
- put: image
params:
build: code