Skip to content

Instantly share code, notes, and snippets.

@tsubakimoto
Last active February 24, 2018 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubakimoto/05bc7ee0ec1fc6b8ce5095bcd72eec91 to your computer and use it in GitHub Desktop.
Save tsubakimoto/05bc7ee0ec1fc6b8ce5095bcd72eec91 to your computer and use it in GitHub Desktop.
GitLabで.NET Coreアプリケーションの継続的インテグレーションを行う
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