Sign inSign up

atthavit/concourse-gcb-resource

By atthavit

•Updated over 7 years ago

A Concourse resource for submitting builds to Google Cloud Build

Image
0

1M+

atthavit/concourse-gcb-resource repository overview

⁠Google Cloud Build Resource

A Concourse resource for submitting builds to Google Cloud Build

⁠Resource Type Configuration

resource_types:
- name: cloud-build
  type: docker-image
  source:
    repository: atthavit/concourse-gcb-resource
    tag: "0.0.1"

⁠Source Configuration

  • 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 of cloudbuild.yaml

  • cloudbuild_content: Optional. The content of cloudbuild.yaml

  • substitutions: Optional.

    Example:

    substitutions:
      _ABC: 123
      _DEF: 456
    

⁠Behavior

⁠check: Do nothing.
⁠in: Do nothing.
⁠push: Submits a build to Google Cloud Build
⁠Parameters
  • build: Required. The path of a directory to build.

  • cloudbuild_path: Optional. The path of cloudbuild.yaml. This has higher precedence than source configuration.

  • cloudbuild_content: Optional. The content of cloudbuild.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 with source.substitutions

⁠Example

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: [email protected]: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

Tag summary

Content type

Image

Digest

Size

53.8 MB

Last updated

over 7 years ago

docker pull atthavit/concourse-gcb-resource:0.0.1