Commit 61bb8661 authored by David Diederich's avatar David Diederich
Browse files

Adding a step to set the CI_COMMIT_BRANCH name to the tag name if it doesn't exist.

Slightly hacky, but it doesn't require flexibility in the fossa-check-for-licensing-issues step, we can configure within the pipeline instead.

(cherry picked from commit f999bb42)
parent 35628e87
...@@ -10,6 +10,11 @@ fossa-analyze: ...@@ -10,6 +10,11 @@ fossa-analyze:
script: script:
# fossa-check-for-licensing-issues needs a CI_COMMIT_BRANCH defined to know how to parse the FOSSA API results
# When building tags, this isn't defined by GitLab. In that case, we use the tag name instead. If that's not defined
# then things will fail and we'll have to make this smarter
- $MAVEN install -DskipTests=true - $MAVEN install -DskipTests=true
- cp "$CI_PROJECT_DIR/.mvn/community-maven.settings.xml" ~/.m2/settings.xml - cp "$CI_PROJECT_DIR/.mvn/community-maven.settings.xml" ~/.m2/settings.xml
- fossa analyze --project "${CI_PROJECT_TITLE}" --project-url "${CI_PROJECT_URL}" --branch "${CI_COMMIT_BRANCH}" - fossa analyze --project "${CI_PROJECT_TITLE}" --project-url "${CI_PROJECT_URL}" --branch "${CI_COMMIT_BRANCH}"
...@@ -38,6 +43,9 @@ fossa-check-notice: ...@@ -38,6 +43,9 @@ fossa-check-notice:
- public - public
script: script:
# See comments about this line from fossa-analyze
- mkdir -p public - mkdir -p public
- fossa report licenses --project "${CI_PROJECT_TITLE}" --branch "${CI_COMMIT_BRANCH}" > public/NOTICE - fossa report licenses --project "${CI_PROJECT_TITLE}" --branch "${CI_COMMIT_BRANCH}" > public/NOTICE
- mkdir committed-NOTICE generated-NOTICE - mkdir committed-NOTICE generated-NOTICE
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