Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 29 additions & 26 deletions .github/scripts/ci.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#! /usr/bin/env bash
set -euo pipefail

# Keep empty so each component uses its own default repository URL.
readonly DEFAULT_GIT_URL=""

function check_image_existed() {
local img=$1
# skip the check if the image starts with "hub.pingcap.net" which is the internal image.
Expand Down Expand Up @@ -34,7 +37,7 @@ function test_get_builder() {
for os in $operating_systems; do
for ac in $architectures; do
echo -en "[🚢] $cm $os $ac $version $profile:\t"
img=$($script "$cm" "$os" "$ac" "$version" "$profile")
img=$($script "$cm" "$os" "$ac" "$version" "$profile" "" "" "$DEFAULT_GIT_URL")
echo $img
check_image_existed $img
done
Expand All @@ -49,7 +52,7 @@ function test_get_builder() {
for os in $operating_systems; do
for ac in $architectures; do
echo -en "[🚢] $cm $os $ac $version $profile:\t"
img=$($script "$cm" "$os" "$ac" "$version" "$profile")
img=$($script "$cm" "$os" "$ac" "$version" "$profile" "" "" "$DEFAULT_GIT_URL")
echo $img
check_image_existed $img
done
Expand All @@ -63,7 +66,7 @@ function test_get_builder() {
for os in $operating_systems; do
for ac in $architectures; do
echo -en "[🚢] $cm $os $ac $version enterprise:\t"
img=$($script "$cm" "$os" "$ac" "$version" enterprise)
img=$($script "$cm" "$os" "$ac" "$version" enterprise "" "" "$DEFAULT_GIT_URL")
echo $img
check_image_existed $img
done
Expand All @@ -80,7 +83,7 @@ function test_get_builder() {
for os in $operating_systems; do
for ac in $architectures; do
echo -en "[🚢] $cm $os $ac $version $profile:\t"
img=$($script "$cm" "$os" "$ac" "$version" $profile)
img=$($script "$cm" "$os" "$ac" "$version" $profile "" "" "$DEFAULT_GIT_URL")
echo $img
check_image_existed $img
done
Expand All @@ -102,7 +105,7 @@ function test_get_builder_freedom_releasing() {
for ac in $architectures; do
for version in v2.0.0 v1.6.0 v1.5.0; do
echo -en "[🚢] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile
$script "$cm" "$os" "$ac" "$version" $profile "" "" "$DEFAULT_GIT_URL"
done
done

Expand All @@ -113,7 +116,7 @@ function test_get_builder_freedom_releasing() {
for ac in $architectures; do
for version in v6.4.0-20221102-1667359250 v20221018; do
echo -en "[🚢] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile
$script "$cm" "$os" "$ac" "$version" $profile "" "" "$DEFAULT_GIT_URL"
done
done

Expand All @@ -123,7 +126,7 @@ function test_get_builder_freedom_releasing() {
for ac in $architectures; do
for version in v0.5.0 v0.6.0; do
echo -en "[🚢] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile
$script "$cm" "$os" "$ac" "$version" $profile "" "" "$DEFAULT_GIT_URL"
done
done

Expand All @@ -133,7 +136,7 @@ function test_get_builder_freedom_releasing() {
for ac in $architectures; do
for version in v0.1.2 v0.1.3; do
echo -en "[🚢] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile
$script "$cm" "$os" "$ac" "$version" $profile "" "" "$DEFAULT_GIT_URL"
done
done
done
Expand All @@ -144,7 +147,7 @@ function test_get_builder_freedom_releasing() {
for ac in $architectures; do
for version in v0.1.0 v0.2.0; do
echo -en "[🚢] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile
$script "$cm" "$os" "$ac" "$version" $profile "" "" "$DEFAULT_GIT_URL"
done
done
done
Expand All @@ -169,7 +172,7 @@ function test_gen_package_artifacts_script() {
for os in $operating_systems; do
for ac in $architectures; do
echo -en "[📃📦] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-artifacts.sh
done
done
Expand All @@ -184,7 +187,7 @@ function test_gen_package_artifacts_script() {
for os in $operating_systems; do
for ac in $architectures; do
echo -en "[📃📦] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" enterprise branch-xxx 123456789abcdef
$script "$cm" "$os" "$ac" "$version" enterprise branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-artifacts.sh
done
done
Expand All @@ -199,7 +202,7 @@ function test_gen_package_artifacts_script() {
for os in $operating_systems; do
for ac in $architectures; do
echo -en "[📃📦] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" failpoint branch-xxx 123456789abcdef
$script "$cm" "$os" "$ac" "$version" failpoint branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-artifacts.sh
done
done
Expand All @@ -215,7 +218,7 @@ function test_gen_package_artifacts_script() {
for os in $operating_systems; do
for ac in $architectures; do
echo -en "[📃📦] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-artifacts.sh
done
done
Expand All @@ -236,7 +239,7 @@ function test_gen_package_artifacts_script_freedom_releasing() {
for ac in $architectures; do
for version in v2.0.0 v1.6.0 v1.5.0; do
echo -en "[📃📦] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-artifacts.sh
done
done
Expand All @@ -247,7 +250,7 @@ function test_gen_package_artifacts_script_freedom_releasing() {
for ac in $architectures; do
for version in v6.4.0-20221102-1667359250 v20221018; do
echo -en "[📃📦] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-artifacts.sh
done
done
Expand All @@ -258,7 +261,7 @@ function test_gen_package_artifacts_script_freedom_releasing() {
for ac in $architectures; do
for version in v0.5.0 v0.6.0; do
echo -en "[📃📦] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-artifacts.sh
done
done
Expand All @@ -269,7 +272,7 @@ function test_gen_package_artifacts_script_freedom_releasing() {
for ac in $architectures; do
for version in v0.1.2 v0.1.3; do
echo -en "[📃📦] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-artifacts.sh
done
done
Expand All @@ -280,7 +283,7 @@ function test_gen_package_artifacts_script_freedom_releasing() {
for ac in $architectures; do
for version in v0.1.0 v0.2.0; do
echo -en "[📃📦] $cm $os $ac $version $profile:\t"
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef
$script "$cm" "$os" "$ac" "$version" $profile branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-artifacts.sh
done
done
Expand All @@ -304,7 +307,7 @@ function test_gen_package_images_script() {
fi
for ac in $architectures; do
echo -en "[📃💿] $cm $os $ac $version $profile:\t"
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-images.sh
done
done
Expand All @@ -317,7 +320,7 @@ function test_gen_package_images_script() {
for version in $versions; do
for ac in $architectures; do
echo -en "[📃💿] $cm $os $ac $version $profile:\t"
$script $cm $os $ac $version $profile branch-xxx 123456789abcdef
$script $cm $os $ac $version $profile branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-images.sh
done
done
Expand All @@ -331,7 +334,7 @@ function test_gen_package_images_script() {
for version in $versions; do
for ac in $architectures; do
echo -en "[📃💿] $cm $os $ac $version $profile:\t"
$script $cm $os $ac $version $profile branch-xxx 123456789abcdef
$script $cm $os $ac $version $profile branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-images.sh
done
done
Expand All @@ -350,7 +353,7 @@ function test_gen_package_images_script_freedom_releasing() {
for ac in $architectures; do
for version in v2.0.0 v1.6.0 v1.5.0; do
echo -en "[📃💿] $cm $os $ac $version $profile:\t"
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-images.sh
done
done
Expand All @@ -360,7 +363,7 @@ function test_gen_package_images_script_freedom_releasing() {
for ac in $architectures; do
for version in v6.4.0-20221102-1667359250 v20221018; do
echo -en "[📃💿] $cm $os $ac $version $profile:\t"
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-images.sh
done
done
Expand All @@ -370,7 +373,7 @@ function test_gen_package_images_script_freedom_releasing() {
for version in v0.5.0 v0.6.0; do
for ac in $architectures; do
echo -en "[📃💿] $cm $os $ac $version $profile:\t"
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-images.sh
done
done
Expand All @@ -380,7 +383,7 @@ function test_gen_package_images_script_freedom_releasing() {
for ac in $architectures; do
for version in v0.1.2 v0.1.3; do
echo -en "[📃💿] $cm $os $ac $version $profile:\t"
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-images.sh
done
done
Expand All @@ -390,7 +393,7 @@ function test_gen_package_images_script_freedom_releasing() {
for version in v0.1.0 v0.2.0; do
for ac in $architectures; do
echo -en "[📃💿] $cm $os $ac $version $profile:\t"
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef
$script "$cm" linux "$ac" "$version" "$profile" branch-xxx 123456789abcdef "" "" us-docker.pkg.dev/pingcap-testing-account/hub "$DEFAULT_GIT_URL"
shellcheck -S error packages/scripts/build-package-images.sh
done
done
Expand Down
1 change: 1 addition & 0 deletions packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ You can get them by run:
$ grep -oE "{{\s*\..*?}}" packages/packages.yaml.tmpl | grep -oE "\.\w+(\.\w+)*" | sort -u
.Git.ref
.Git.sha
.Git.url
.Release.arch
.Release.os
.Release.version
Expand Down
Loading
Loading