|
|
@ -51,7 +51,7 @@ spec:
|
|
|
|
image: node:20
|
|
|
|
image: node:20
|
|
|
|
workingDir: $(workspaces.repo.path)
|
|
|
|
workingDir: $(workspaces.repo.path)
|
|
|
|
script: npm install && npm run build
|
|
|
|
script: npm install && npm run build
|
|
|
|
- name: deploy-to-s3
|
|
|
|
- name: save-to-s3
|
|
|
|
runAfter:
|
|
|
|
runAfter:
|
|
|
|
- npm-build
|
|
|
|
- npm-build
|
|
|
|
workspaces:
|
|
|
|
workspaces:
|
|
|
@ -61,7 +61,7 @@ spec:
|
|
|
|
workspaces:
|
|
|
|
workspaces:
|
|
|
|
- name: repo
|
|
|
|
- name: repo
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- name: deploy-to-s3
|
|
|
|
- name: save-to-s3
|
|
|
|
image: bitnami/minio-client
|
|
|
|
image: bitnami/minio-client
|
|
|
|
workingDir: $(workspaces.repo.path)
|
|
|
|
workingDir: $(workspaces.repo.path)
|
|
|
|
env:
|
|
|
|
env:
|
|
|
@ -81,3 +81,31 @@ spec:
|
|
|
|
mc alias set minio http://${MINIO_SERVER_HOST}:9000 "${MINIO_SERVER_ACCESS_KEY}" "${MINIO_SERVER_SECRET_KEY}"
|
|
|
|
mc alias set minio http://${MINIO_SERVER_HOST}:9000 "${MINIO_SERVER_ACCESS_KEY}" "${MINIO_SERVER_SECRET_KEY}"
|
|
|
|
mc alias list
|
|
|
|
mc alias list
|
|
|
|
mc cp --recursive ./dist/ minio/sakal-us/
|
|
|
|
mc cp --recursive ./dist/ minio/sakal-us/
|
|
|
|
|
|
|
|
- name: build-image
|
|
|
|
|
|
|
|
runAfter:
|
|
|
|
|
|
|
|
- npm-build
|
|
|
|
|
|
|
|
workspaces:
|
|
|
|
|
|
|
|
- name: repo
|
|
|
|
|
|
|
|
workspace: repo
|
|
|
|
|
|
|
|
params:
|
|
|
|
|
|
|
|
- name: gitrevision
|
|
|
|
|
|
|
|
value: "$(params.gitrevision)"
|
|
|
|
|
|
|
|
taskSpec:
|
|
|
|
|
|
|
|
params:
|
|
|
|
|
|
|
|
- name: gitrevision
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
workspaces:
|
|
|
|
|
|
|
|
- name: repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: build-image
|
|
|
|
|
|
|
|
image: gcr.io/kaniko-project/executor:v1.9.0-debug
|
|
|
|
|
|
|
|
workingDir: $(workspaces.repo.path)
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
|
|
|
- name: REGISTRY_HOST
|
|
|
|
|
|
|
|
value: registry.docker-registry.svc.cluster.local
|
|
|
|
|
|
|
|
script: |
|
|
|
|
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
/kaniko/executor \
|
|
|
|
|
|
|
|
--context "./dist" \
|
|
|
|
|
|
|
|
--dockerfile "./Dockerfile" \
|
|
|
|
|
|
|
|
--destination "${REGISTRY_HOST}:5000/sakal-us:$(params.gitrevision)" \
|