diff --git a/script/cibuild-entitlements-app-acceptance b/script/cibuild-entitlements-app-acceptance index 23f9493..5f83393 100755 --- a/script/cibuild-entitlements-app-acceptance +++ b/script/cibuild-entitlements-app-acceptance @@ -5,8 +5,16 @@ export APP_NAME="entitlements-app" export GIT_SERVER_NAME="git-server" export LDAP_SERVER_NAME="ldap-server" -if [ ! -f "${DIR}/spec/acceptance/Dockerfile.${APP_NAME}" ]; then - echo "No Dockerfile.${APP_NAME} was found" +export RUBY_MAJOR_VERSION=$(ruby --version | awk '{print $2}' | awk -F. '{print $1}') + +if [ $RUBY_MAJOR_VERSION -eq 2 ]; then + export DOCKERFILE="Dockerfile.${APP_NAME}-ruby2" +else + export DOCKERFILE="Dockerfile.${APP_NAME}" +fi + +if [ ! -f "${DIR}/spec/acceptance/${DOCKERFILE}" ]; then + echo "No ${DOCKERFILE} was found" exit 255 fi diff --git a/spec/acceptance/docker-compose.yml b/spec/acceptance/docker-compose.yml index 5ca6da2..edfd915 100644 --- a/spec/acceptance/docker-compose.yml +++ b/spec/acceptance/docker-compose.yml @@ -8,7 +8,7 @@ services: entitlements-app: build: context: "${DIR}" - dockerfile: "spec/acceptance/Dockerfile.entitlements-app" + dockerfile: "spec/acceptance/${DOCKERFILE}" networks: ldap-network: aliases: