Skip to content

Instantly share code, notes, and snippets.

@RoyLDD
Last active November 4, 2019 17:15
Show Gist options
  • Save RoyLDD/b97bda495805d5e603c3da3b619ef944 to your computer and use it in GitHub Desktop.
Save RoyLDD/b97bda495805d5e603c3da3b619ef944 to your computer and use it in GitHub Desktop.
Gitlab-pipepline-example
# Pipeline steps list
stages:
- test
- build
- deploy
# Lint and unit tests
lint-test:
stage: test
image:
name: node:11.10.1
script:
- npm install
- npm run lint && npm run test
# Build step
build-push:
stage: build
image:
name: docker:stable
services:
- docker:stable-dind
script:
- docker build --build-arg NPM_TOKEN=$NPM_RO_TOKEN -t $REPO_NAME .
- docker tag $REPO_NAME $REPO_REGISTRY_URL:$TAG
- docker push $REPO_REGISTRY_URL:$TAG
- docker rmi $REPO_NAME $REPO_REGISTRY_URL:$TAG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment