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: | |
- name: 'gcr.io/cloud-builders/docker' | |
args: ['build', '-t', 'gcr.io/$PROJECT_ID/my-image:latest', '-t', 'gcr.io/$PROJECT_ID/my-image:$SHORT_SHA', '.'] | |
images: ['gcr.io/$PROJECT_ID/my-image:latest', 'gcr.io/$PROJECT_ID/my-image:$SHORT_SHA'] |
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
#!/bin/bash | |
for f in DSC_*.*; do | |
ts="$(GetFileInfo -d "$f")" | |
e="$(date -j -f "%m/%d/%Y %H:%M:%S" "$ts" +%s)" | |
((o=304730220)) | |
((e+=o)) | |
nd="$(date -r $e "+%m/%d/%Y %H:%M:%S")" | |
echo "$nd" | |
SetFile -m "$nd" "$f" | |
SetFile -d "$nd" "$f" |
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: | |
- name: 'gcr.io/cloud-builders/docker' | |
args: ['build', '--build-arg', 'node_version=${_NODE_VERSION_1}', '-t', 'gcr.io/$PROJECT_ID/build-substitutions-nodejs-${_NODE_VERSION_1}', '.'] | |
wait_for: '-' | |
- name: 'gcr.io/cloud-builders/docker' | |
args: ['build', '--build-arg', 'node_version=${_NODE_VERSION_2}', '-t', 'gcr.io/$PROJECT_ID/build-substitutions-nodejs-${_NODE_VERSION_2}', '.'] | |
wait_for: '-' | |
images: ['gcr.io/$PROJECT_ID/build-substitutions-nodejs-${_NODE_VERSION_1}', 'gcr.io/$PROJECT_ID/build-substitutions-nodejs-${_NODE_VERSION_2}'] |
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: | |
# Run docker stats in the background. | |
# --no-stream is used in order to print the stats on different lines. | |
- name: 'gcr.io/cloud-builders/docker' | |
args: | |
- 'run' | |
- '-d' | |
- '--name=docker-stats' | |
- '--volume=/var/run/docker.sock:/var/run/docker.sock' | |
- '--entrypoint=/bin/bash' |
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. |
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
import matplotlib.pyplot as plt | |
import numpy as np | |
import time | |
%matplotlib notebook | |
x = np.linspace(0, 10*np.pi, 100) | |
y = np.sin(x) | |
plt.ion() |
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: | |
- name: 'gcr.io/cloud-builders/npm' | |
args: ['install'] | |
- name: 'gcr.io/cloud-builders/npm' | |
args: ['test'] | |
- name: 'gcr.io/cloud-builders/docker' | |
args: ["build", "-t", "gcr.io/$PROJECT_ID/my-image", "."] | |
images: ["gcr.io/$PROJECT_ID/my-image"] |
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: | |
- name: 'gcr.io/cloud-builders/docker' | |
args: ["build", "-t", "gcr.io/$PROJECT_ID/birthday:$REVISION_ID", "."] | |
- name: 'gcr.io/cloud-builders/docker' | |
args: ["push", "gcr.io/$PROJECT_ID/birthday:$REVISION_ID"] | |
- name: 'gcr.io/cloud-builders/kubectl' | |
args: ['set', 'image', 'deployment/birthday', 'birthday=gcr.io/$PROJECT_ID/birthday:$REVISION_ID'] | |
env: | |
- 'CLOUDSDK_COMPUTE_ZONE=us-east1-b' | |
- 'CLOUDSDK_CONTAINER_CLUSTER=node-example-cluster' |
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: | |
- name: 'gcr.io/cloud-builders/docker' | |
args: | |
- 'build' | |
- '-f' | |
- 'Dockerfile.alpine' | |
- '-t' | |
- 'gcr.io/$PROJECT_ID/large-docker-alpine:latest' | |
- '.' | |
waitFor: ['-'] |
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: | |
- name: 'gcr.io/cloud-builders/docker' | |
args: | |
- 'build' | |
- '-t' | |
- 'us.gcr.io/$PROJECT_ID/test' | |
- '-t' | |
- 'asia.gcr.io/$PROJECT_ID/test' | |
- '-t' | |
- 'eu.gcr.io/$PROJECT_ID/test' |
NewerOlder