Commit b27ec655 authored by David Diederich's avatar David Diederich
Browse files

Split out several different kinds of jobs to make composition easier

parent 935b5993
fossa:
tags: ['docker-runner']
variables:
FOSSA_REPORT_URL: https://app.fossa.com/api/revisions/custom%2B12773%2F${CI_PROJECT_NAME}%24${CI_COMMIT_SHA}/attribution?access=$FOSSA_ACCESS&download=true&format=HTML
artifacts:
paths:
- public
script:
- curl https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash
- fossa analyze
- sleep 2m # Temporary hack until I can figure out a way to ask FOSSA when it is ready
- mkdir -p public
- wget $FOSSA_REPORT_URL -O public/fossa-notice.html
include:
- template: SAST.gitlab-ci.yml
- template: Dependency-Scanning.gitlab-ci.yml
- template: Container-Scanning.gitlab-ci.yml
- template: License-Management.gitlab-ci.yml
dependency_scanning:
stage: test
tags: ['docker-dind-runner']
sast:
stage: test
tags: ['docker-dind-runner']
variables:
MAVEN_CLI_OPTS: "--batch-mode --settings=/tmp/app/.mvn/gitlab-maven.settings.xml"
MAVEN_REPO_PATH: "/tmp/app/.m2/repository"
license_management:
stage: test
tags: ['docker-dind-runner']
container_scanning:
stage: verify
tags: ['docker-dind-runner']
include:
- local: 'maven-jobs.gitlab-ci.yml'
- local: 'gitlab-ultimate.gitlab-ci.yml'
- local: 'fossa.gitlab-ci.yml'
# --------------------------------------------------------------------------------
# Template
.maven:
image: maven:3.3.9-jdk-8
tags: ['docker-runner']
variables:
MAVEN_CLI_OPTS: "--batch-mode --settings=$CI_PROJECT_DIR/.mvn/gitlab-maven.settings.xml"
MAVEN_REPO_PATH: "$CI_PROJECT_DIR/.m2/repository"
cache:
paths:
- .m2/repository
- ./*/target
# --------------------------------------------------------------------------------
# Specific Jobs
compile:
extends: .maven
stage: build
script:
- mvn $MAVEN_CLI_OPTS compile
unit_tests:
extends: .maven
stage: test
script:
- mvn $MAVEN_CLI_OPTS test
maven:
extends: .maven
stage: deploy
script:
- mvn $MAVEN_CLI_OPTS deploy -DskipTests=true
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