Skip to content

Commit ed09685

Browse files
committed
Add parameters to build and test scripts
1 parent b953052 commit ed09685

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1616
set -e
1717
source VERSION
18-
for MAJOR_VERSION in "${!MYSQL_CLUSTER_VERSIONS[@]}"; do
18+
19+
MAJOR_VERSIONS=("${!MYSQL_CLUSTER_VERSIONS[@]}"); [ -n "$1" ] && MAJOR_VERSIONS=("${@:1}")
20+
21+
for MAJOR_VERSION in "${MAJOR_VERSIONS[@]}"; do
1922
docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$http_proxy --build-arg no_proxy=$no_proxy -t mysql/mysql-cluster:$MAJOR_VERSION $MAJOR_VERSION
2023
done

test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
set -e
2121
source VERSION
2222

23-
for MAJOR_VERSION in "${!MYSQL_CLUSTER_VERSIONS[@]}"
24-
do
23+
MAJOR_VERSIONS=("${!MYSQL_CLUSTER_VERSIONS[@]}"); [ -n "$1" ] && MAJOR_VERSIONS=("${@:1}")
24+
25+
for MAJOR_VERSION in "${MAJOR_VERSIONS[@]}"; do
2526
docker run -d -e MYSQL_RANDOM_ROOT_PASSWORD=true --name mysql-cluster mysql/mysql-cluster:$MAJOR_VERSION --log-error
2627
inspec exec $MAJOR_VERSION/inspec/control.rb --controls container
2728
inspec exec $MAJOR_VERSION/inspec/control.rb -t docker://mysql-cluster --controls packages

0 commit comments

Comments
 (0)