Skip to content

Instantly share code, notes, and snippets.

@qyf404
Created March 3, 2018 14:09
Show Gist options
  • Save qyf404/fd5866e107effb6d19c4e1dbd9dc2df3 to your computer and use it in GitHub Desktop.
Save qyf404/fd5866e107effb6d19c4e1dbd9dc2df3 to your computer and use it in GitHub Desktop.
Build the docker image by the gitlab ci
build_images:
stage: build_images
image: docker
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
before_script:
- docker info
script:
- tar -xvf target/universal/wzg-*.tgz -C ./target
- docker build -t wzg:$CI_COMMIT_REF_NAME .
- docker save wzg:$CI_COMMIT_REF_NAME > wzg-$CI_COMMIT_REF_NAME.tar
artifacts:
paths:
- wzg-$CI_COMMIT_REF_NAME.tar
expire_in: 1 week
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment