image: docker:1.12
services:
- docker:dind
stages:
- build
variables:
CONTAINER_TEST_IMAGE: registry.gitlab.com/company/project:$CI_BUILD_REF_NAME
before_script:
- docker info
build_image_job:
stage: build
script:
- docker build -t $CONTAINER_TEST_IMAGE .
- docker run $CONTAINER_TEST_IMAGE npm run test