diff options
| author | mo khan <mo.khan@gmail.com> | 2019-09-02 15:01:53 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2019-09-02 15:01:53 -0600 |
| commit | 659d82d70f3bd9d80327e3b03c53e755410efec0 (patch) | |
| tree | 12c5bee7e910ecb0482699e45b66819cae983baf /.gitlab/ci | |
| parent | 62b9c3dd0b81871bd36b59af96520d1edfcde926 (diff) | |
split into separate stage files
Diffstat (limited to '.gitlab/ci')
| -rw-r--r-- | .gitlab/ci/build.gitlab-ci.yml | 7 | ||||
| -rw-r--r-- | .gitlab/ci/release.gitlab-ci.yml | 28 | ||||
| -rw-r--r-- | .gitlab/ci/test.gitlab-ci.yml | 15 |
3 files changed, 50 insertions, 0 deletions
diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml new file mode 100644 index 0000000..dac1d34 --- /dev/null +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -0,0 +1,7 @@ +build-image: + image: docker:stable + stage: build + script: + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + - docker build . -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA diff --git a/.gitlab/ci/release.gitlab-ci.yml b/.gitlab/ci/release.gitlab-ci.yml new file mode 100644 index 0000000..78ae765 --- /dev/null +++ b/.gitlab/ci/release.gitlab-ci.yml @@ -0,0 +1,28 @@ +tarball: + image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA + variables: + GIT_STRATEGY: none + stage: release + script: + - cd /code + - bundle exec rake clean pdf repackage + after_script: + - mv /code/pkg $CI_PROJECT_DIR + artifacts: + paths: + - pkg/*.tar.gz + only: + - master + +publish-image: + image: docker:stable + variables: + GIT_STRATEGY: none + stage: release + script: + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA + - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest + - docker push $CI_REGISTRY_IMAGE:latest + only: + - master diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml new file mode 100644 index 0000000..acf7d10 --- /dev/null +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -0,0 +1,15 @@ +verify: + image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA + stage: test + script: + - mvn verify + artifacts: + reports: + junit: target/surefire-reports/TEST-*.xml + +javadoc: + image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA + stage: test + script: + - mvn javadoc:javadoc + |
