Skip to content

Commit

Permalink
fix(apps/prod/tekton/configs/tasks): fix upload tasks (#1407)
Browse files Browse the repository at this point in the history
remove the `yum install` step, the new image is based on alpine.

Signed-off-by: wuhuizuo <[email protected]>
  • Loading branch information
wuhuizuo committed Jan 17, 2025
1 parent dfd87cb commit 10a5805
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
Expand Down
15 changes: 11 additions & 4 deletions apps/prod/tekton/configs/tasks/pingcap-upload-offline-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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} ..."
Expand Down Expand Up @@ -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} ..."
Expand Down

0 comments on commit 10a5805

Please sign in to comment.