Commit bf2b3024 authored by Jan Marchel's avatar Jan Marchel
Browse files

Update .gitlab-ci.yml file

parent ac7d9ffa
Pipeline #20940 passed with stages
in 32 minutes and 32 seconds
# Gitlab CI/CD script for the Melodic Integration project
## Gitlab CI/CD script for the Melodic Integration project
variables:
DOCKER_PUSH: "true"
DOCKER_REPO: "gitlab.ow2.org:4567"
MAVEN_IMAGE: "maven:3.5.2-jdk-8"
DOCKER_DIND_IMAGE: "docker:19.03.1"
......@@ -9,10 +10,14 @@ variables:
LOCAL_REPO: "127.0.0.1:5000"
DOCKER_CLI: "docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $CI_PROJECT_DIR/maven_repo:/root/.m2 -w /usr/src/mymaven -v $CI_PROJECT_DIR:/usr/src/mymaven $MAVEN_IMAGE"
CONNECTORS_CLI: "mvn -DskipTests --batch-mode -U -f connectors/pom.xml"
RAML_TO_JAXRS_CLI: "mvn -DskipTests --batch-mode -f raml-to-jaxrs-7bulls/pom.xml"
INTERFACES_CLI: "mvn -DskipTests --batch-mode -f interfaces/pom.xml"
MULE_ESB_CLI: "mvn -DskipTests --batch-mode -f mule_esb/pom.xml"
IMAGE_TAG: "proactive-dev-2.5"
PROCESS_CLI: "mvn -DskipTests --batch-mode -f process/pom.xml"
DOCKER_DRIVER: overlay
DOCKER_TLS_CERTDIR: "/certs"
IMAGE_TAG: "morphemic-rc2.0"
cache:
paths:
......@@ -36,14 +41,20 @@ after_script:
- echo '=========================================================================='
stages:
- build-connectors
- build-raml
- build-interfaces
- build-connectors
- deploy-connectors
- deploy-raml
- deploy-interfaces
- deploy-connectors
- deploy-rest
build-connectors:connectors:
stage: build-connectors
image: $MAVEN_IMAGE
script:
- $CONNECTORS_CLI clean install
build-raml:raml_to_jaxrs:
stage: build-raml
image: $MAVEN_IMAGE
......@@ -58,13 +69,6 @@ build-interfaces:interfaces:
script:
- $INTERFACES_CLI clean install
build-connectors:connectors:
stage: build-connectors
image: $MAVEN_IMAGE
script:
- $CONNECTORS_CLI clean install
deploy-connectors:connectors:
stage: deploy-connectors
image: $MAVEN_IMAGE
......@@ -109,4 +113,20 @@ deploy-rest:mule_esb:
- $DOCKER_CLI $MULE_ESB_CLI -Ddocker.imagePrefix=melodic/ clean install
- echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin
- docker tag $LOCAL_REPO/melodic/mule $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG
- docker push $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG
\ No newline at end of file
- docker push $DOCKER_REPO/melodic/melodic-integration/mule:$IMAGE_TAG
deploy-rest:process:
stage: deploy-rest
image: $DOCKER_DIND_IMAGE
only:
- proactive-dev-2.5
dependencies:
- deploy-raml:raml_to_jaxrs
- deploy-interfaces:interfaces
services:
- $DOCKER_DIND_SERVICE
script:
- $DOCKER_CLI $PROCESS_CLI -Ddocker.imagePrefix=melodic/ clean install
- echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $DOCKER_REPO -u $K8S_SECRET_DOCKER_USER --password-stdin
- docker tag $LOCAL_REPO/melodic/process $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG
- docker push $DOCKER_REPO/melodic/melodic-integration/process:$IMAGE_TAG
\ No newline at end of file
Supports Markdown
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