diff --git a/.circleci/template.yml b/.circleci/template.yml index 218220ae9e0..1b5703220df 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -76,7 +76,7 @@ containers: - ENV_FILE_DHSERVER_DATA: "__MIM_DHSERVER__" entrypoint: *ENTRYPOINT - &mssql_container - image: mcr.microsoft.com/mssql/server + image: mcr.microsoft.com/mssql/server:__MSSQL_VERSION__ environment: - ACCEPT_EULA: Y - SA_PASSWORD: "mongooseim_secret+ESL123" diff --git a/tools/circle-generate-config.sh b/tools/circle-generate-config.sh index ed1b0a42162..d27a726056b 100755 --- a/tools/circle-generate-config.sh +++ b/tools/circle-generate-config.sh @@ -46,6 +46,7 @@ sed -e "s/__MYSQL_CNF__/${MYSQL_CNF}/" \ -e "s/__PGSQL_VERSION__/${PGSQL_VERSION}/g" \ -e "s/__MSSQL_SQL__/${MSSQL_SQL}/" \ -e "s/__MSSQL_SETUP__/${MSSQL_SETUP}/" \ + -e "s/__MSSQL_VERSION__/${MSSQL_VERSION}/" \ -e "s/__REDIS_VERSION__/${REDIS_VERSION}/" \ -e "s/__LDAP_SCHEMA__/${LDAP_SCHEMA}/" \ -e "s/__LDAP_SETUP__/${LDAP_SETUP}/" \ diff --git a/tools/db-versions.sh b/tools/db-versions.sh index 7aa405b100a..288a3d8f7cc 100644 --- a/tools/db-versions.sh +++ b/tools/db-versions.sh @@ -7,6 +7,8 @@ MYSQL_VERSION_DEFAULT="8.0.30" PGSQL_VERSION_DEFAULT=latest +MSSQL_VERSION_DEFAULT="2022-CU12-ubuntu-22.04" + LDAP_VERSION_DEFAULT="1.5.0" REDIS_VERSION_DEFAULT="7.2.1" @@ -25,6 +27,8 @@ MYSQL_VERSION=${MYSQL_VERSION:-$MYSQL_VERSION_DEFAULT} PGSQL_VERSION=${PGSQL_VERSION:-$PGSQL_VERSION_DEFAULT} +MSSQL_VERSION=${MSSQL_VERSION:-$MSSQL_VERSION_DEFAULT} + LDAP_VERSION=${LDAP_VERSION:-$LDAP_VERSION_DEFAULT} REDIS_VERSION=${REDIS_VERSION:-$REDIS_VERSION_DEFAULT} diff --git a/tools/setup-db.sh b/tools/setup-db.sh index 51198e52f60..16b2f916ae4 100755 --- a/tools/setup-db.sh +++ b/tools/setup-db.sh @@ -234,7 +234,7 @@ function setup_db(){ # Error 87(The parameter is incorrect.) occurred while opening file '/var/opt/mssql/data/master.mdf' MSSQL_SQL=$(cat32 priv/mssql2012.sql) MSSQL_SETUP=$(cat32 tools/docker-setup-mssql.sh) - IMAGE=mcr.microsoft.com/mssql/server + IMAGE=mcr.microsoft.com/mssql/server:$MSSQL_VERSION $DOCKER run -d --name=$NAME \ -p $MSSQL_PORT:1433 \ --user root \