Commit 58085ab8 authored by Radek Ošlejšek's avatar Radek Ošlejšek
Browse files

Update .gitlab-ci.yml

parent 3fee106b
Loading
Loading
Loading
Loading
+4 −23
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ variables:
  POSTGRES_PASSWORD: "postgres"
  POSTGRES_HOST_AUTH_METHOD: trust
  MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -Dcheckstyle.fail=false"
  MAVEN_JAVADOC_OPTS: "-Dauthor=false -DskipTests -DadditionalJOption=-Xdoclint:none"

stages:
    - build
@@ -22,12 +23,14 @@ stages:

#
# Build and test whenever the code is pushed to the the gitlab.
# Also, generate Javadoc.
# The -Ptest option sets the usage profile of the Web module.
# Use the -DadditionalJOption=-Xdoclint:none option to avoid strict control when generatig Javadoc.
#
build-and-test-job:
  stage: build
  script:
    - mvn clean install $MAVEN_CLI_OPTS -Ptest;
    - mvn clean install javadoc:javadoc javadoc:aggregate $MAVEN_CLI_OPTS MAVEN_JAVADOC_OPTS -Ptest;
  tags:
    - shared-fi
  rules:
@@ -35,28 +38,6 @@ build-and-test-job:
  artifacts:
    paths:
    - application/target/$PROJECT_ARTIFACT_ID-*.zip
    expire_in: 1 hour
    when: on_success

#
# Generate API documentation whenever the code is pushed to the the main branch.
# Use the -DadditionalJOption=-Xdoclint:none option to avoid strict control.
#
javadoc-job:
  stage: build
  script:
    - mvn javadoc:javadoc javadoc:aggregate $MAVEN_CLI_OPTS -Dauthor=false -DskipTests
#    - >
#      if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
#        mvn javadoc:javadoc javadoc:aggregate $MAVEN_CLI_OPTS -Dauthor=false -DskipTests
#      fi
  tags:
    - shared-fi
  rules:
#    - if: '$CI_COMMIT_BRANCH'
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
  artifacts:
    paths:
    - MeshModel/target/site/apidocs/
    - SpacePartitioning/target/site/apidocs/
    - MeshAlgorithms/target/site/apidocs/