Skip to content
Snippets Groups Projects

Add creation of a docker image

Merged Brian Parks requested to merge dev/bparks/ci-linux-docker-image into master
Files
3
+ 37
0
@@ -3,6 +3,8 @@ image : mono:latest
stages:
- build
- test
- package
- clean
build:
stage: build
@@ -28,3 +30,38 @@ test:
- mono $(ls -d *NUnit.ConsoleRunner.*/)tools/nunit3-console.exe Monocle.Web.Tests/bin/Debug/Monocle.Web.Tests.dll
dependencies:
- build
only:
- master
- /^dev\/.*$/
- tags
package:docker-linux:
stage: package
tags:
- dockerizer
before_script:
- mkdir _stage
- cp -r Monocle.Web/* _stage/
- cp Dockerfile _stage/
script:
- docker build -t monocle:${CI_COMMIT_REF_NAME//\//_} _stage/
#- docker save -o docker-image.tar monocle:${CI_COMMIT_REF_NAME//\//_}
#- gzip docker-image.tar
after_script:
- rm -rf _stage
#artifacts:
# paths:
# - docker-image.tar.gz
# expire_in: 2 weeks
only:
- master
- /^dev\/.*$/
- tags
clean:docker-linux:
stage: clean
tags:
- dockerizer
script:
- docker rmi monocle:${CI_COMMIT_REF_NAME//\//_}
when: manual
\ No newline at end of file
Loading