Skip to content

Commit

Permalink
chore(dockerfiles/cd/utils/release): pretty output for offline packag…
Browse files Browse the repository at this point in the history
…e steps

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
wuhuizuo committed Jul 9, 2024
1 parent 31fb32c commit 609c035
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions packages/offline-packages.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ editions:
if: {{ semver.CheckConstraint ">=7.6.0-0" .Release.version }}
os: [linux]
arch: [amd64, arm64]
profile: [enterprise]
artifacts:
- name: "tidb-enterprise-server-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}"
desc: enterprise offline server package
Expand Down Expand Up @@ -498,7 +497,6 @@ editions:
if: {{ semver.CheckConstraint ">=7.5.0-0, <7.6.0-0" .Release.version }}
os: [linux]
arch: [amd64, arm64]
profile: [enterprise]
artifacts:
- name: "tidb-enterprise-server-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}"
desc: enterprise offline server package
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/build-package-artifacts.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function fetch_file_from_oci_artifact() {
local repo="$(echo $destination | cut -d ':' -f 1)"

# get the file blob digest.
oras manifest fetch $destination | yq -e --prettyPrint ".layers | filter(.annotations[\"org.opencontainers.image.title\"] | test \"$to_match_file\") | .[0]" >blob.yaml
oras manifest fetch $destination | yq -e --prettyPrint -oy ".layers | filter(.annotations[\"org.opencontainers.image.title\"] | test \"$to_match_file\") | .[0]" >blob.yaml

# download file
file="$(yq .annotations[\"org.opencontainers.image.title\"] blob.yaml)"
Expand Down
4 changes: 2 additions & 2 deletions packages/scripts/compose-offline-packages-artifacts.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function fetch_file_from_oci_artifact() {
local repo="$(echo $destination | cut -d ':' -f 1)"

# get the file blob digest.
oras manifest fetch $destination | yq --prettyPrint ".layers | filter(.annotations[\"org.opencontainers.image.title\"] | test \"$to_match_file\") | .[0]" >blob.yaml
oras manifest fetch $destination | yq --prettyPrint -oy ".layers | filter(.annotations[\"org.opencontainers.image.title\"] | test \"$to_match_file\") | .[0]" >blob.yaml

# download file
file="$(yq .annotations[\"org.opencontainers.image.title\"] blob.yaml)"
Expand All @@ -92,7 +92,7 @@ function check_file_in_oci_artifact() {
oras manifest fetch -o oci_manifest.json $destination

# get the file blob digest.
yq -e --prettyPrint ".layers | filter(.annotations[\"org.opencontainers.image.title\"] | test \"$to_match_file\") | length > 0" oci_manifest.json
yq -e --prettyPrint -oy ".layers | filter(.annotations[\"org.opencontainers.image.title\"] | test \"$to_match_file\") | length > 0" oci_manifest.json > /dev/null
}

function pre_check() {
Expand Down

0 comments on commit 609c035

Please sign in to comment.