Skip to content

Instantly share code, notes, and snippets.

@helpermethod
Last active July 25, 2019 13:12
Show Gist options
  • Save helpermethod/a00c8dfff637ee5c87ba5767c3f2b02c to your computer and use it in GitHub Desktop.
Save helpermethod/a00c8dfff637ee5c87ba5767c3f2b02c to your computer and use it in GitHub Desktop.
Kick ass CD with Maven CI friendly versions and GitLab CI

Maven CI friendly versions

Speed up initial checkouts with shallow cloning

❓ Does GitLabCI skip shallow clones on merge requests?

variables:
  DEPTH: 1

Split unit and integration tests

❗ Explain batch mode.

mvn -B deploy

GitLab CI

variables:
  DEPTH: 1

cache:
  paths:
    - .m2/

build:
  stage: build
  script: mvn -B install

integration test:
  stage: test
  script: mvn surefire:test

deploy:
  stage: deploy
  script: mvn jar:jar deploy:deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment