Commit ba448173 authored by Matija Obreza's avatar Matija Obreza
Browse files

Always compile and test, package tags, master, staging

Dockerize manual, deploy manual
parent f4f06232
......@@ -3,16 +3,44 @@ variables:
DOCKER_HOST: "genesys1.swarm.genesys-pgr.org"
stages:
- compile
- package
- dockerize
- deploy
compile and test:
stage: compile
image: dockerhub.genesys-pgr.org/maven-with-compass:3-jdk-8
script:
- MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" mvn compile test -B -DskipTests=true
package genesys:
stage: package
image: dockerhub.genesys-pgr.org/maven-with-compass:3-jdk-8
dependencies:
- compile and test
only:
- master
- staging
- tags
except:
- branches
script:
- MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" mvn package -B -DskipTests=true
artifacts:
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}"
expire_in: 1 day
paths:
- target/*.war
package genesys branch:
stage: package
image: dockerhub.genesys-pgr.org/maven-with-compass:3-jdk-8
when: manual
dependencies:
- compile and test
script:
# - echo "Project name ${CI_PROJECT_NAME} commit slug=${CI_COMMIT_REF_SLUG} ref=${CI_COMMIT_REF_NAME}"
# - echo "Project namespace ${CI_PROJECT_NAMESPACE}"
- MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" mvn package -B -DskipTests=true
artifacts:
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}"
......@@ -23,8 +51,10 @@ package genesys:
docker image:
stage: dockerize
image: docker:latest
when: manual
dependencies:
- package genesys
- compile and test
- package genesys branch
before_script:
- echo Building docker image ${CI_REGISTRY_IMAGE} on ${DOCKER_HOST}
- echo Registry ${CI_REGISTRY} user=${CI_REGISTRY_USER} ${CI_REGISTRY_PASSWORD}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment