Skip to content

Instantly share code, notes, and snippets.

@hamiltont
Created July 26, 2019 22:54
Show Gist options
  • Save hamiltont/89ce8e50cad5f204465f78487870808a to your computer and use it in GitHub Desktop.
Save hamiltont/89ce8e50cad5f204465f78487870808a to your computer and use it in GitHub Desktop.
stages:
- build
- test
- push
- deploy
default:
image: docker:19.03
variables:
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER: overlay2
# TODO uncomment this once Janus has time to fix. See https://gitlab.com/gitlab-org/gitlab-runner/issues/4501
# Specify to Docker where to create the certificates, Docker will
# create them automatically on boot, and will create
# `/certs/client` that will be shared between the service and
# build container.
# DOCKER_TLS_CERTDIR: "/certs"
DOCKER_TLS_CERTDIR: ""
services:
- docker:19.03-dind
before_script:
- docker info
run_frontend_tests:
stage: test
script:
- cd mydesign && docker build -t mydesign:${CI_COMMIT_SHA::8} .
- docker run -t mydesign:${CI_COMMIT_SHA::8} npm test
- docker run -t mydesign:${CI_COMMIT_SHA::8} npm audit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment