Skip to content

Commit 4aa7a78

Browse files
author
Piotr Obrzut
committed
BUG#31627536 Expose GR port for server 8.0
Change-Id: I4d863e9226b2ea618f90e4717d7f38124e2f1bff
1 parent fe80e8b commit 4aa7a78

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

gen_dockerfiles.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ declare -A PORTS
2828
PORTS["5.5"]="3306"
2929
PORTS["5.6"]="3306"
3030
PORTS["5.7"]="3306 33060"
31-
PORTS["8.0"]="3306 33060"
31+
PORTS["8.0"]="3306 33060 33061"
3232

3333
declare -A PASSWORDSET
3434
PASSWORDSET["5.5"]="SET PASSWORD FOR 'root'@'localhost'=PASSWORD('\${MYSQL_ROOT_PASSWORD}');"
@@ -116,6 +116,11 @@ do
116116
if [ "${VERSION}" == "5.7" ] || [ "${VERSION}" == "8.0" ]; then
117117
sed 's#%%MYSQL_SERVER_VERSION%%#'"${MYSQL_SERVER_VERSIONS[${VERSION}]}"'#g' template/control.rb > tmpFile
118118
sed -i 's#%%MYSQL_SHELL_VERSION%%#'"${MYSQL_SHELL_VERSIONS[${VERSION}]}"'#g' tmpFile
119+
if [ "${VERSION}" == "5.7" ]; then
120+
sed -i 's#%%PORTS%%#'"3306/tcp, 33060/tcp"'#g' tmpFile
121+
else
122+
sed -i 's#%%PORTS%%#'"3306/tcp, 33060-33061/tcp"'#g' tmpFile
123+
fi
119124
mv tmpFile "${VERSION}/inspec/control.rb"
120125
else
121126
sed 's#%%MYSQL_SERVER_VERSION%%#'"${MYSQL_SERVER_VERSIONS[${VERSION}]}"'#g' template/control_pre57.rb > tmpFile

template/control.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
it { should exist }
55
it { should be_running }
66
its('repo') { should eq 'mysql/mysql-server' }
7-
its('ports') { should eq '3306/tcp, 33060/tcp' }
7+
its('ports') { should eq '%%PORTS%%' }
88
its('command') { should match '/entrypoint.sh mysqld' }
99
end
1010
end

0 commit comments

Comments
 (0)