[maven-release-plugin] prepare for next development iteration
[drat.git] / .gitlab-ci.yml
index f19cb45808d045a777e5e3741b6351a643a08d63..7d494ba5b14c55abad3e471bab4a8a239d0adf4b 100644 (file)
@@ -1,4 +1,4 @@
-image: maven:3.3.9-jdk-8
+image: maven:3.6.0-jdk-8
 
 stages:
   - build
@@ -9,10 +9,25 @@ cache:
     - .m2/repository
     - target/
 
-build:
+before_script:
+  - apt-get update && curl -sL https://deb.nodesource.com/setup_10.x | bash - && apt install nodejs npm
+
+build_artifact:
   stage: build
   script:
      - mvn clean install -DskipTests
   artifacts:
     paths:
     - "distribution/target/dms-distribution-0.1-bin.tar.gz"
+
+publish_docker:
+  stage: publish
+  image: docker:1.11
+  dependencies: 
+    - build_artifact
+  services:
+    - docker:dind
+  script:
+    - docker build -t $CI_REPO:${CI_COMMIT_REF_NAME/\//_} .
+    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
+    - docker push $CI_REPO:${CI_COMMIT_REF_NAME/\//_}