Skip to content

Commit

Permalink
feat(apps/prod/tekton/configs): add cache for cypress installation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhuizuo committed Sep 9, 2024
1 parent ade37be commit 2d8ae4e
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 15 deletions.
6 changes: 3 additions & 3 deletions apps/prod/tekton/configs/pipelines/pingcap-build-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ spec:
description: secret containing a .gitconfig and .git-credentials file.
optional: true
- name: cargo-home
description: cache for cargo pacakges when build binaries
description: cache for cargo packages when build binaries
optional: true
- name: cypress-cache
description: cache for cypress installation files when building frontend projects.
Expand Down Expand Up @@ -164,8 +164,8 @@ spec:
workspace: dockerconfig
- name: cargo-home
workspace: cargo-home
- name: crypress-cache
workspace: crypress-cache
- name: cypress-cache
workspace: cypress-cache
- name: build-images
when:
- input: "$(params.push)"
Expand Down
12 changes: 6 additions & 6 deletions apps/prod/tekton/configs/pipelines/pingcap-release-ga.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ spec:
runAfter:
- "compose-offline-pkgs-amd64-community"
taskRef:
name: pingcap-upload-offline-pacakges
name: pingcap-upload-offline-package
params:
- { name: version, value: "$(params.version)" }
- { name: edition, value: community }
Expand All @@ -141,7 +141,7 @@ spec:
runAfter:
- "compose-offline-pkgs-amd64-enterprise"
taskRef:
name: pingcap-upload-offline-pacakges
name: pingcap-upload-offline-package
params:
- { name: version, value: "$(params.version)" }
- { name: edition, value: enterprise }
Expand All @@ -162,7 +162,7 @@ spec:
runAfter:
- "compose-offline-pkgs-amd64-dm"
taskRef:
name: pingcap-upload-offline-pacakges
name: pingcap-upload-offline-package
workspaces:
- { name: aws-secrets, workspace: aws-secrets }
params:
Expand All @@ -185,7 +185,7 @@ spec:
runAfter:
- "compose-offline-pkgs-arm64-community"
taskRef:
name: pingcap-upload-offline-pacakges
name: pingcap-upload-offline-package
params:
- { name: version, value: "$(params.version)" }
- { name: edition, value: community }
Expand All @@ -206,7 +206,7 @@ spec:
runAfter:
- "compose-offline-pkgs-arm64-enterprise"
taskRef:
name: pingcap-upload-offline-pacakges
name: pingcap-upload-offline-package
params:
- { name: version, value: "$(params.version)" }
- { name: edition, value: enterprise }
Expand All @@ -227,7 +227,7 @@ spec:
runAfter:
- "compose-offline-pkgs-arm64-dm"
taskRef:
name: pingcap-upload-offline-pacakges
name: pingcap-upload-offline-package
workspaces:
- { name: aws-secrets, workspace: aws-secrets }
params:
Expand Down
11 changes: 11 additions & 0 deletions apps/prod/tekton/configs/pvcs/cypress-cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cypress-cache
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 20Gi
storageClassName: nfs
2 changes: 1 addition & 1 deletion apps/prod/tekton/configs/pvcs/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cargo-home.yaml
- crypress-cache.yaml
- cypress-cache.yaml
- tiup-locks.yaml
2 changes: 1 addition & 1 deletion apps/prod/tekton/configs/tasks/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resources:
- pingcap-get-set-release-version.yaml
- pingcap-git-clone-ext.yaml
- pingcap-upload-enterprise-plugins.yaml
- pingcap-upload-offline-packages.yaml
- pingcap-upload-offline-package.yaml
- publish-tiup-from-oci-artifact.yaml
- release/create-pr-to-add-release-anchor-commit.yaml
- release/create-pr-to-bump-tikv-version.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: pingcap-upload-offline-pacakges
name: pingcap-upload-offline-package
labels:
app.kubernetes.io/version: "0.2"
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
set -exo pipefail
if [ ! -f /workspace/publish.sh ]; then
echo "No tiup pacakges are need to published."
echo "No tiup packages are need to published."
exit 0
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
'pingcap/tiflow/package',
'pingcap/tidb-binlog/package',
'pingcap/tidb-ctl/package',
'tikv/pd/pacakge',
'tikv/pd/package',
'tikv/tikv/package'
] &&
body.event_data.resources[0].tag.matches('^(master|main)(-[0-9a-f]{7,10})_(darwin|linux)_(amd64|arm64)$')
Expand Down Expand Up @@ -66,7 +66,7 @@ spec:
'pingcap/tiflow/package',
'pingcap/tidb-binlog/package',
'pingcap/tidb-ctl/package',
'tikv/pd/pacakge',
'tikv/pd/package',
'tikv/tikv/package'
] &&
body.event_data.resources[0].tag.matches('^release-[0-9]+[.][0-9]+(-[0-9a-f]{7,10})_(darwin|linux)_(amd64|arm64)$')
Expand Down

0 comments on commit 2d8ae4e

Please sign in to comment.