<commit_before>#!/bin/bash -ex
DOCKER_REGISTRY="vm-10-100-0-25.ch.bbcarchdev.net"
PROJECT_NAME="quilt"
INTEGRATION="docker/integration.yml"
LOCALINTEGRATION="/tmp/patched-integration.yml"

# Build the project
docker build -t ${PROJECT_NAME} -f docker/Dockerfile-build .

# If successfully built, tag and push to registry
if [ ! "${JENKINS_HOME}" = '' ]
then
	docker tag -f ${PROJECT_NAME} ${DOCKER_REGISTRY}/${PROJECT_NAME}
	docker push ${DOCKER_REGISTRY}/${PROJECT_NAME}
fi

if [ -f "${INTEGRATION}" ]
then
	if [ ! -f "${LOCALINTEGRATION}" ] || [ "${INTEGRATION}" -nt "${LOCALINTEGRATION}" ]
	then
		cp ${INTEGRATION} ${LOCALINTEGRATION}
        if [ ! "${JENKINS_HOME}" = '' ]
        then
            # Change "in-container" mount path to host mount path
            sed -i -e "s|- \./|- ${HOST_DATADIR}jobs/${JOB_NAME}/workspace/docker/|" ${LOCALINTEGRATION}
        fi
	fi

	# Tear down integration from previous run if it was still running
	docker-compose -p ${PROJECT_NAME}-test -f ${LOCALINTEGRATION} stop
	docker-compose -p ${PROJECT_NAME}-test -f ${LOCALINTEGRATION} rm -f

	# Start project integration
	docker-compose -p ${PROJECT_NAME}-test -f ${LOCALINTEGRATION} run cucumber

	# Tear down integration
	docker-compose -p ${PROJECT_NAME}-test -f ${LOCALINTEGRATION} stop
	docker-compose -p ${PROJECT_NAME}-test -f ${LOCALINTEGRATION} rm -f
fi<commit_msg>Use absolute paths for the cucumber directory<commit_after>#!/bin/bash -ex
DOCKER_REGISTRY="vm-10-100-0-25.ch.bbcarchdev.net"
PROJECT_NAME="quilt"
INTEGRATION="docker/integration.yml"
LOCALINTEGRATION="docker/local-integration.yml"
CURRENTDIR=`pwd`

# Build the project
docker build -t ${PROJECT_NAME} -f docker/Dockerfile-build .

# If successfully built, tag and push to registry
if [ ! "${JENKINS_HOME}" = '' ]
then
	docker tag -f ${PROJECT_NAME} ${DOCKER_REGISTRY}/${PROJECT_NAME}
	docker push ${DOCKER_REGISTRY}/${PROJECT_NAME}
fi

if [ -f "${INTEGRATION}" ]
then
	if [ ! -f "${LOCALINTEGRATION}" ] || [ "${INTEGRATION}" -nt "${LOCALINTEGRATION}" ]
	then
		# Copy the generic YML file
		cp ${INTEGRATION} ${LOCALINTEGRATION}
		
		# Turn the local paths into absolute ones
        if [ ! "${JENKINS_HOME}" = '' ]
        then
            # Change "in-container" mount path to host mount path
            sed -i -e "s|- \./|- ${HOST_DATADIR}jobs/${JOB_NAME}/workspace/docker/|" ${LOCALINTEGRATION}
    	else
            sed -i -e "s|- \./|- ${CURRENTDIR}/|" ${LOCALINTEGRATION}
        fi
	fi

	# Tear down integration from previous run if it was still running
	docker-compose -p ${PROJECT_NAME}-test -f ${LOCALINTEGRATION} stop
	docker-compose -p ${PROJECT_NAME}-test -f ${LOCALINTEGRATION} rm -f

	# Start project integration
	docker-compose -p ${PROJECT_NAME}-test -f ${LOCALINTEGRATION} run cucumber

	# Tear down integration
	docker-compose -p ${PROJECT_NAME}-test -f ${LOCALINTEGRATION} stop
	docker-compose -p ${PROJECT_NAME}-test -f ${LOCALINTEGRATION} rm -f
fi
{'fraction_non_alphanumeric': 0.14805990469707284, 'fraction_numerical': 0.005445881552076242, 'mean_word_length': 3.825944170771757, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '574527', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1050, 'n_words': 263}