All Downloads are FREE. Search and download functionalities are using the official Maven repository.

archetype-resources..gitlab-ci.yml Maven / Gradle / Ivy

Go to download

This module defines a standard parent POM to use for various Incode applications and modules. Its primary purpose is to make it easy to use a set up maven mixins (https://github.com/odavid/maven-plugins) within child POMs. Specifically this means locking down the versions of plugins using pluginManagement. It does NOT define any mixins for Apache Isis.

There is a newer version: 2.0.0-M2
Show newest version
#
# requires the following gitlab secret variables
# - DOCKER_REGISTRY_USERNAME
# - DOCKER_REGISTRY_PASSWORD
# - DOCKER_REGISTRY_EMAIL
# - DOCKER_REGISTRY_NAME        # eg "registry-1.docker.io" (for docker hub)
                                # or "docker-dev.incode.cloud" (eg a cloud-based nexus)
# - DOCKER_REGISTRY_URL         # eg "https://index.docker.io/v1/" (for docker hub)
                                # or "https://repo.incode.cloud/repository/docker-dev/" (eg a cloud-based nexus)
#

image: maven:3.5.3-jdk-8

before_script:
  - export REVISION=$(date +%Y%m%d.%H%M).$CI_COMMIT_REF_SLUG.$(echo $CI_COMMIT_SHA | cut -c1-8)

services:
  - docker:dind

variables:
  DOCKER_HOST: tcp://docker:2375
  DOCKER_DRIVER: overlay2
  MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dskip.cloudbees-estatio-repositories -Dskip.sonatype-snapshots -Dskip.apache-snapshots"
  APP_NAME: "simpleapp"

stages:
  - build-package-push

build-package-push:
  stage: build-package-push
  script:
    - echo "REVISION=$REVISION"
    - >
      mvn --batch-mode \
           install \
          -Drevision=$REVISION \
          -Dmavenmixin-docker \
          -Ddocker-plugin.imageName=$DOCKER_REGISTRY_NAME/$DOCKER_REGISTRY_USERNAME/$APP_NAME
    - >
      mvn -s .m2/settings.xml \
          --batch-mode \
          docker:push@push-image-tagged \
          -pl webapp \
          -Drevision=$REVISION \
          -DskipTests \
          -Dskip.isis-swagger \
          -Dmavenmixin-docker \
          -Ddocker-plugin.imageName=$DOCKER_REGISTRY_USERNAME/$DOCKER_REGISTRY_REPOSITORY \
          -Ddocker-plugin.serverId=docker-registry \
          -Ddocker.registryUrl=$DOCKER_REGISTRY_URL





© 2015 - 2024 Weber Informatics LLC | Privacy Policy