diff options
| author | mo khan <mo@mokhan.ca> | 2019-08-11 19:08:35 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2019-08-11 19:08:35 -0600 |
| commit | 631a31530bb1c02e8e89d746eb3d363e717c44a3 (patch) | |
| tree | 837aa3a728a471004f0fdd2e939c4e6f93148deb | |
| parent | c81dad47326be5a72e1f594d850cef84d3a1e0a3 (diff) | |
build image and test in that
| -rw-r--r-- | .dockerignore | 7 | ||||
| -rw-r--r-- | .gitlab-ci.yml | 20 | ||||
| -rw-r--r-- | Dockerfile | 12 |
3 files changed, 31 insertions, 8 deletions
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a5348b2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +.git +target +tmp +node_modules +*.pdf +pkg +*.class diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01b5a89..08706cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,30 +1,34 @@ -image: maven +image: alpine:latest stages: + - build - test - release -before_script: - - apt-get update && apt-get install -y locales - - echo "en_US.UTF-8 UTF-8" > /etc/locale.gen - - locale-gen - - export LC_ALL=en_US.UTF-8 +build: + image: docker:stable + stage: build + script: + - docker info + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + - docker build . -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA test: + image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA stage: test script: - mvn verify doc: + image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA stage: test script: - mvn javadoc:javadoc publish: + image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA stage: release script: - - apt-get install -y ruby-full - - gem install bundler:'~> 2.0' - bundle exec rake publish artifacts: paths: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3dfd537 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM alpine:latest +MAINTAINER mo@mokhan.ca + +RUN apk update && \ + apk upgrade && \ + apk add openjdk8 maven ruby nodejs yarn && \ + gem install bundler:'~> 2.0' --no-document && \ + mkdir -p /code + +WORKDIR /code +COPY . /code +RUN bundle install --jobs $(nproc) && yarn install && mvn install |
