From 6fa83d03db483698c7742efb7f4e4e584d5d496f Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Tue, 5 Dec 2023 14:50:49 +0800 Subject: [PATCH] feature(apps/prod/tekton/configs): git clone with git-cdn (#822) git url instead is configurated in `.gitconfig` file of the secret. Signed-off-by: wuhuizuo Signed-off-by: wuhuizuo --- .gitignore | 2 +- .../pipelines/pingcap-build-package-darwin.yaml | 8 ++++---- .../configs/pipelines/pingcap-build-package.yaml | 8 ++++---- .../triggers/templates/pingcap/tidb/build.yaml | 16 ++++++++-------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 311e44ec8..6b0f03a30 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,4 @@ Chart.lock /charts/**/*.tgz # IDEs -/.vscode +.vscode diff --git a/apps/prod/tekton/configs/pipelines/pingcap-build-package-darwin.yaml b/apps/prod/tekton/configs/pipelines/pingcap-build-package-darwin.yaml index bdba53f2f..c6238245b 100644 --- a/apps/prod/tekton/configs/pipelines/pingcap-build-package-darwin.yaml +++ b/apps/prod/tekton/configs/pipelines/pingcap-build-package-darwin.yaml @@ -39,8 +39,8 @@ spec: description: The workspace where the git repo will be cloned. - name: dockerconfig description: Includes a docker `config.json` - - name: git-credentials - description: secret contains ssh private key in `id_rsa` key. + - name: git-basic-auth + description: secret containing a .gitconfig and .git-credentials file. optional: true - name: mac-ssh-credentials description: secret contains ssh private key in `id_rsa` key for login mac @@ -62,8 +62,8 @@ spec: workspaces: - name: output workspace: source - - name: ssh-directory - workspace: git-credentials + - name: basic-auth + workspace: git-basic-auth - name: get-release-ver taskSpec: results: diff --git a/apps/prod/tekton/configs/pipelines/pingcap-build-package.yaml b/apps/prod/tekton/configs/pipelines/pingcap-build-package.yaml index 6adc54072..dc778d3e1 100644 --- a/apps/prod/tekton/configs/pipelines/pingcap-build-package.yaml +++ b/apps/prod/tekton/configs/pipelines/pingcap-build-package.yaml @@ -41,8 +41,8 @@ spec: description: The workspace where the git repo will be cloned. - name: dockerconfig description: Includes a docker `config.json` - - name: git-credentials - description: secret contains ssh private key in `id_rsa` key. + - name: git-basic-auth + description: secret containing a .gitconfig and .git-credentials file. optional: true - name: mac-ssh-credentials description: secret contains ssh private key in `id_rsa` key for login mac @@ -64,8 +64,8 @@ spec: workspaces: - name: output workspace: source - - name: ssh-directory - workspace: git-credentials + - name: basic-auth + workspace: git-basic-auth - name: get-release-ver taskSpec: results: diff --git a/apps/prod/tekton/configs/triggers/templates/pingcap/tidb/build.yaml b/apps/prod/tekton/configs/triggers/templates/pingcap/tidb/build.yaml index 58cf9b250..5e8c388ca 100644 --- a/apps/prod/tekton/configs/triggers/templates/pingcap/tidb/build.yaml +++ b/apps/prod/tekton/configs/triggers/templates/pingcap/tidb/build.yaml @@ -62,9 +62,9 @@ spec: resources: requests: storage: 10Gi - - name: git-credentials # need to fetch some private repositories. + - name: git-basic-auth # need to fetch some private repositories. secret: - secretName: git-credentials + secretName: git-credentials-basic - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: @@ -116,9 +116,9 @@ spec: resources: requests: storage: 10Gi - - name: git-credentials # need to fetch some private repositories. + - name: git-basic-auth # need to fetch some private repositories. secret: - secretName: git-credentials + secretName: git-credentials-basic - apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: @@ -162,9 +162,9 @@ spec: - name: mac-ssh-credentials secret: secretName: mac-ssh-credentials - - name: git-credentials # need to fetch some private repositories. + - name: git-basic-auth # need to fetch some private repositories. secret: - secretName: git-credentials + secretName: git-credentials-basic - name: source volumeClaimTemplate: spec: @@ -215,9 +215,9 @@ spec: resources: requests: storage: 10Gi - - name: git-credentials # need to fetch some private repositories. + - name: git-basic-auth # need to fetch some private repositories. secret: - secretName: git-credentials + secretName: git-credentials-basic timeouts: pipeline: 1h taskRunSpecs: