Created
January 23, 2018 15:17
-
-
Save Philmod/f3928949e5d29bd5cee0fc8d99a37927 to your computer and use it in GitHub Desktop.
Create a Go binary with GCB.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment