Last active
February 24, 2018 16:47
-
-
Save tsubakimoto/05bc7ee0ec1fc6b8ce5095bcd72eec91 to your computer and use it in GitHub Desktop.
GitLabで.NET Coreアプリケーションの継続的インテグレーションを行う
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: microsoft/dotnet:2.0.0-sdk | |
services: | |
- docker:dind | |
stages: | |
- build | |
- test | |
- push | |
job1: | |
stage: build | |
script: | |
- cd src | |
- dotnet restore | |
- dotnet build | |
only: | |
- master | |
job2: | |
stage: test | |
script: | |
- cd test | |
- dotnet restore | |
- dotnet test | |
only: | |
- master | |
job3: | |
stage: push | |
image: docker:latest | |
before_script: | |
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY | |
script: | |
- cd src | |
- docker build --pull -t "$CI_REGISTRY_IMAGE" . | |
- docker push "$CI_REGISTRY_IMAGE" | |
only: | |
- master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment