Public Cloud

Artifactory, CircleCI 2 and PWS are on the public cloud, and you don't need to install them.

Deployment Pipelines

Each maven project/repository defines its own pipeline/workflow in a .circleci/config.yml file. Pipeline is using maven tool, and maven settings file (.circleci/maven.settings.xml) is included. Make sure that your environment variables (MAVEN_PASSWORD, CF_PASSWORD) are configured in every 'build' project on CircleCI.

Any project that has .circleci/config.yml configured will be build automatically by CircleCI:

Artifacts are deployed on Artifactory instance in the cloud (AWS hosted). Parent maven pom file is configured to use this instance with maven profile 'idugalic-cloud'. Make sure that your parent maven pom file is configured by your needs.

Adopt it

For open projects

CircleCI offer a total of four free linux containers ($2400 annual value) for open-source projects. Simply keeping your project public will enable this for you! You can consider Travis CI, it is free for open source as well.

For private projects

You can use:

  • CircleCI and Travis for private projects
  • Bitbucket and Bitbucket Pipelines. Atlassian products are mature and very good integrated.
  • Gitlab unifies issues, code review, CI and CD into a single UI. GitLab provides efficient platform for software development and delivery, covering the entire lifecycle from idea to production.


The Gitlab has proven as best option by my opinion (the best value for the price - for closed projects in the public cloud).

  • I have cloned Github organization to Gitlab group (all repos included)
  • I added CI pipeline (.gitlab-ci.yml) for every project/repo (used shared runners and created my specific runners as well)
  • Configured secret (env) variables (MAVEN_PASSWORD, CF_PASSWORD) for every build in Gitlab CI settings
  • All green in 1 hour.

Example of my-company-monolith pipeline (.gitlab-ci.yml):

image: docker:latest
  - docker:dind

# Stages is used to define stages that can be used by jobs. The specification of stages allows for having flexible multi stage pipelines.
# The ordering of elements in stages defines the ordering of jobs' execution:
# -Jobs of the same stage are run in parallel.
# -Jobs of the next stage are run after the jobs from the previous stage complete successfully.
  - build
  - staging
  - test-staging
  - production

  image: maven:3-jdk-8
  stage: build
    - "mvn package -s .gitlab-ci.settings.xml -B"
      - target/*.jar
      - target/surefire-reports/*

  image: maven:3-jdk-8
  stage: staging
  script: "mvn -s .gitlab-ci.settings.xml -DskipTests deploy -P idugalic-cloud"
    - master

# Master branch will be deployed to PWS(CloudFoundry) on "Stage" env. Deployment will be triggered on every push to master branch.
# It is required to have
#   - organzation 'idugalic' created on PWS
#   - space 'Stage' created within 'idugalic' organization on PWS
# NOTE: CF_PASSWORD is a secret variable. You have to set it on Gitlab (Settings->CI/CD Pipelines->Secret Variables->Add Variable)
  image: governmentpaas/cf-cli:latest
  stage: staging
    - cf api
    - cf auth $CF_PASSWORD
    - cf target -o idugalic -s Stage
    - cf push stage-my-company-monolith -p target/*.jar --no-start
    - cf bind-service stage-my-company-monolith mysql-stage
    - cf restart stage-my-company-monolith
    name: staging
    - master

# End-to-end testing on Staging env.
  image: tutum/curl:latest
  stage: test-staging
    -  curl -i
    - master

# The 'when': manual action exposes a play button in GitLab's UI and the cf-deploy-prod job will only be triggered if and when we click that play button.
# The requirement is that all jobs (cf-end-to-end-test-stage, cf-load-test-stage, cf-deploy-stage, maven-deploy) from stage 'staging' are passing.
  image: governmentpaas/cf-cli:latest
  stage: production
    - cf api
    - cf auth $CF_PASSWORD
    - cf target -o idugalic -s Prod
    - cf push prod-my-company-monolith -p target/*.jar --no-start
    - cf bind-service prod-my-company-monolith mysql-prod
    - cf restart prod-my-company-monolith
    name: production
  when: manual
    - master

results matching ""

    No results matching ""