kubernetes-custom-sample/nodejs/skaffold.yaml (30 lines of code) (raw):
# To learn more about the skaffold.yaml schema visit
# https://skaffold.dev/docs/references/yaml/
apiVersion: skaffold/v2beta4
kind: Config
build:
tagPolicy:
sha256: {}
# define where to find the code at build time and where to push the resulting image
artifacts:
- image: nodejs-sample-backend
context: src/backend
- image: nodejs-sample-frontend
context: src/frontend
# define the Kubernetes manifests to deploy on each run
deploy:
kubectl:
manifests:
- ./kubernetes-manifests/*.service.yaml
- ./kubernetes-manifests/*.deployment.yaml
profiles:
# use the cloudbuild profile to build images using Google Cloud Build
- name: cloudbuild
build:
googleCloudBuild: {}
- name: buildpacks
build:
artifacts:
- image: nodejs-sample-backend
context: src/backend
buildpack:
builder: "gcr.io/buildpacks/builder:v1"
- image: nodejs-sample-frontend
context: src/frontend
buildpack:
builder: "gcr.io/buildpacks/builder:v1"