Skip to content

Instantly share code, notes, and snippets.

@Philmod
Created January 23, 2018 15:17
Show Gist options
  • Select an option

  • Save Philmod/f3928949e5d29bd5cee0fc8d99a37927 to your computer and use it in GitHub Desktop.

Select an option

Save Philmod/f3928949e5d29bd5cee0fc8d99a37927 to your computer and use it in GitHub Desktop.

Revisions

  1. Philmod created this gist Jan 23, 2018.
    20 changes: 20 additions & 0 deletions cloudbuild.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    steps:
    # Install dependencies.
    - name: 'gcr.io/cloud-builders/go'
    args: ['install', '.']
    env: ['PROJECT_ROOT=hello']
    # Run tests.
    - name: 'gcr.io/cloud-builders/go'
    args: ['test', 'hello']
    env: ['PROJECT_ROOT=hello']
    # Create binary.
    - name: 'gcr.io/cloud-builders/go'
    args: ['build', 'hello']
    env: ['PROJECT_ROOT=hello']
    # Run binary.
    # - name: 'ubuntu'
    # entrypoint: 'bash'
    # args: ['-c', './hello']
    # Copy binary to GCS.
    - name: 'gcr.io/cloud-builders/gsutil'
    args: ['-m', 'cp', 'hello', 'gs://my-bucket/']