machine:
  java:
    version: openjdk8
  services:
    - docker

test:
  override:
    - mvn -P test-leave-running integration-test
  post:
    - if [[ $GIT_USER_EMAIL ]]; then git config --global user.email "$GIT_USER_EMAIL" ; fi
    - if [[ $GIT_USER_NAME ]]; then git config --global user.name "$GIT_USER_NAME" ; fi
    - if [[ $RELEASE ]]; then mvn -B release:prepare -DreleaseVersion=$RELEASE -DdevelopmentVersion=$NEXT "-Darguments=-P test-leave-running" ; fi

deployment:
  deploy:
    tag: /v.*/
    owner: itzg
    commands:
      - mvn -P test-leave-running -DskipTests -s settings.xml deploy

# To initiate a maven release:
#
# In CircleCI project settings > Checkout SSH Keys
#   Make sure you have a user key allocated
#
# curl -X POST -H "Content-Type: application/json" -d '{
#    "build_parameters": {
#    	 "TAG": "v1.0.1",
#        "RELEASE": "1.0.1",
#        "NEXT": "1.1-SNAPSHOT",
#        "GIT_USER_EMAIL": "itzgeoff@gmail.com",
#        "GIT_USER_NAME": "Via CircleCI"
#    }
#  }' "https://circleci.com/api/v1.1/project/github/itzg/junit-rule-docker/tree/master?circle-token=$CIRCLECI_API_TOKEN"
machine:
  java:
    version: openjdk8
  services:
    - docker
  post:
    - sudo sysctl -w vm.max_map_count=262144

test:
  override:
    - mvn -P test-leave-running integration-test
  post:
    - if [[ $GIT_USER_EMAIL ]]; then git config --global user.email "$GIT_USER_EMAIL" ; fi
    - if [[ $GIT_USER_NAME ]]; then git config --global user.name "$GIT_USER_NAME" ; fi
    - if [[ $RELEASE ]]; then mvn -B release:prepare -DreleaseVersion=$RELEASE -DdevelopmentVersion=$NEXT "-Darguments=-P test-leave-running" ; fi

deployment:
  deploy:
    tag: /v.*/
    owner: itzg
    commands:
      - mvn -P test-leave-running -DskipTests -s settings.xml deploy

# To initiate a maven release:
#
# In CircleCI project settings > Checkout SSH Keys
#   Make sure you have a user key allocated
#
# curl -X POST -H "Content-Type: application/json" -d '{
#    "build_parameters": {
#    	 "TAG": "v1.0.1",
#        "RELEASE": "1.0.1",
#        "NEXT": "1.1-SNAPSHOT",
#        "GIT_USER_EMAIL": "itzgeoff@gmail.com",
#        "GIT_USER_NAME": "Via CircleCI"
#    }
#  }' "https://circleci.com/api/v1.1/project/github/itzg/junit-rule-docker/tree/master?circle-token=$CIRCLECI_API_TOKEN"
Adjust mmap count for ES container testing
Adjust mmap count for ES container testing
