You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.3 KiB
YAML
83 lines
2.3 KiB
YAML
apiVersion: tekton.dev/v1beta1
|
|
kind: Pipeline
|
|
metadata:
|
|
name: build-and-deploy-sakal-us
|
|
namespace: sakal-us
|
|
spec:
|
|
params:
|
|
- name: gitrevision
|
|
type: string
|
|
- name: gitrepositoryurl
|
|
type: string
|
|
workspaces:
|
|
- name: repo
|
|
tasks:
|
|
#- name: git-clone
|
|
# workspaces:
|
|
# - name: repo
|
|
# workspace: repo
|
|
# params:
|
|
# - name: gitrepositoryurl
|
|
# value: "$(params.gitrepositoryurl)"
|
|
# - name: gitrevision
|
|
# value: "$(params.gitrevision)"
|
|
# taskSpec:
|
|
# workspaces:
|
|
# - name: repo
|
|
# params:
|
|
# - name: gitrepositoryurl
|
|
# type: string
|
|
# - name: gitrevision
|
|
# type: string
|
|
# steps:
|
|
# - name: git-clone
|
|
# image: bitnami/git
|
|
# workingDir: $(workspaces.repo.path)
|
|
# script: |
|
|
# #!/bin/sh
|
|
# git fetch --all --tags
|
|
# git checkout $(params.gitrevision)
|
|
#- name: npm-build
|
|
# runAfter:
|
|
# - git-clone
|
|
# workspaces:
|
|
# - name: repo
|
|
# workspace: repo
|
|
# taskSpec:
|
|
# workspaces:
|
|
# - name: repo
|
|
# steps:
|
|
# - name: build
|
|
# image: node:20
|
|
# workingDir: $(workspaces.repo.path)
|
|
# script: npm install && npm run build
|
|
- name: deploy-to-s3
|
|
# runAfter:
|
|
# - npm-build
|
|
workspaces:
|
|
- name: repo
|
|
workspace: repo
|
|
taskSpec:
|
|
workspaces:
|
|
- name: repo
|
|
steps:
|
|
- name: deploy-to-s3
|
|
image: bitnami/minio-client
|
|
workingDir: $(workspaces.repo.path)
|
|
env:
|
|
- name: MINIO_SERVER_HOST
|
|
value: minio.minio-dev.svc.cluster.local
|
|
- name: MINIO_SERVER_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: minio-dev
|
|
key: accessKey
|
|
- name: MINIO_SERVER_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: minio-dev
|
|
key: secretKey
|
|
script: |
|
|
mc alias set minio http://${MINIO_SERVER_HOST}:9000 "${MINIO_SERVER_ACCESS_KEY}" "${MINIO_SERVER_SECRET_KEY}"
|
|
mc alias list
|
|
#mc cp --recursive ./dist/ minio/sakal-us/ |