Created
February 12, 2018 21:30
-
-
Save Philmod/a4d98add45d66238f2d78758e06064ae to your computer and use it in GitHub Desktop.
Build a nodejs app with 2 different nodejs versions
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}'] | |
substitutions: # default versions | |
_NODE_VERSION_1: v6.9.5 | |
_NODE_VERSION_2: v7.7.3 | |
options: | |
substitution_option: 'ALLOW_LOOSE' # meaning the build won't return an error if there is a missing substitution variable, or a missing substitution |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment