diff --git a/apps/prod/tekton/configs/tasks/pingcap-upload-enterprise-plugins.yaml b/apps/prod/tekton/configs/tasks/pingcap-upload-enterprise-plugins.yaml index d6b3d8493..d17d1d7a1 100644 --- a/apps/prod/tekton/configs/tasks/pingcap-upload-enterprise-plugins.yaml +++ b/apps/prod/tekton/configs/tasks/pingcap-upload-enterprise-plugins.yaml @@ -30,11 +30,15 @@ spec: #!/usr/bin/env bash set -e + apk add curl if [ ! -f "$(workspaces.aws-secrets-tencent.path)/credentials" ]; then echo "Error: aws-secrets-tencent workspace is not bound." exit 1 fi - cp -r $(workspaces.aws-secrets-tencent.path) ~/.aws + + mkdir -p ~/.aws + cat $(workspaces.aws-secrets-tencent.path)/credentials > ~/.aws/credentials + cat $(workspaces.aws-secrets-tencent.path)/config > ~/.aws/config aws configure set plugins.cli_legacy_plugin_path $(find /usr/lib -name site-packages -type d | head -1) aws configure set plugins.endpoint awscli_plugin_endpoint @@ -43,7 +47,6 @@ spec: repo="$(params.oci-repo)" dl_svr_url="https://internal-do.pingcap.net/dl" FILE_SERVER_URL="http://fileserver.pingcap.net" - yum install jq -y for platform in linux_amd64 linux_arm64; do tag="$(params.version)-enterprise_${platform}" diff --git a/apps/prod/tekton/configs/tasks/pingcap-upload-offline-package.yaml b/apps/prod/tekton/configs/tasks/pingcap-upload-offline-package.yaml index 226066bd4..875886c63 100644 --- a/apps/prod/tekton/configs/tasks/pingcap-upload-offline-package.yaml +++ b/apps/prod/tekton/configs/tasks/pingcap-upload-offline-package.yaml @@ -40,11 +40,16 @@ spec: #!/usr/bin/env bash set -e + apk add curl + if [ ! -f "$(workspaces.aws-secrets-tencent.path)/credentials" ]; then echo "Error: aws-secrets-tencent workspace is not bound." exit 1 fi - cp -r $(workspaces.aws-secrets-tencent.path) ~/.aws + + mkdir -p ~/.aws + cat $(workspaces.aws-secrets-tencent.path)/credentials > ~/.aws/credentials + cat $(workspaces.aws-secrets-tencent.path)/config > ~/.aws/config aws configure set plugins.cli_legacy_plugin_path $(find /usr/lib -name site-packages -type d | head -1) aws configure set plugins.endpoint awscli_plugin_endpoint @@ -53,7 +58,6 @@ spec: repo="$(params.oci-repo)" dl_svr_url="https://internal-do.pingcap.net/dl" FILE_SERVER_URL="http://fileserver.pingcap.net" - yum install jq -y tag="$(params.version)-$(params.edition)_$(params.os)_$(params.arch)" echo "🚀 uploading for ${tag} ..." @@ -92,17 +96,20 @@ spec: if [ "$(params.edition)" != "dm" ]; then exit 0 fi + + apk add curl if [ ! -f "$(workspaces.aws-secrets.path)/credentials" ]; then echo "Error: aws-secrets workspace is not bound." exit 1 fi - cp -r $(workspaces.aws-secrets.path) ~/.aws + mkdir -p ~/aws + cat $(workspaces.aws-secrets.path)/credentials > ~/.aws/credentials + cat $(workspaces.aws-secrets.path)/config > ~/.aws/config bucket_name=$(cat $(workspaces.aws-secrets.path)/bucket_name) repo="$(params.oci-repo)" dl_svr_url="https://internal-do.pingcap.net/dl" - yum install jq -y tag="$(params.version)-$(params.edition)_$(params.os)_$(params.arch)" echo "🚀 uploading for ${tag} ..."