Skip to content
Snippets Groups Projects
Commit 2b999125 authored by Lukasz Lopatowski's avatar Lukasz Lopatowski
Browse files

Added Mend scanning CI job

parent 99785af8
No related branches found
No related tags found
3 merge requests!184Develop,!119Develop,!116Develop
......@@ -2,6 +2,7 @@ stages:
- test
- sonar
- build
- mend
test:
stage: test
......@@ -64,4 +65,25 @@ build_and_push_release_image:
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REPOSITORY
docker build -t $DOCKER_REPOSITORY_LOCAL:$IMAGE_TAG .
docker push $DOCKER_REPOSITORY_LOCAL:$IMAGE_TAG
docker logout $DOCKER_REPOSITORY
\ No newline at end of file
docker logout $DOCKER_REPOSITORY
mend:
stage: mend
image: openjdk:17-jdk-slim
only:
- /^release/
variables:
PRODUCT_NAME: "nmaas"
PROJECT_NAME: "nmaas-portal"
script:
- |
export PRODUCT_VERSION=$(echo $CI_COMMIT_BRANCH | cut -c 9-)
export PROJECT_VERSION=$PRODUCT_VERSION
apt-get update && apt-get install -y curl gnupg
curl -sL https://deb.nodesource.com/setup_11.x | bash -
apt-get -y install nodejs
npm install -g @angular/cli
npm ci
chmod +x ./gradlew
curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
java -jar wss-unified-agent.jar -userKey ${MEND_USER_KEY} -apiKey ${MEND_API_KEY} -projectVersion ${PROJECT_VERSION} -project ${PROJECT_NAME} -productVersion ${PRODUCT_VERSION} -product ${PRODUCT_NAME} -c ./ws/ws.config -d ./
\ No newline at end of file
#!/bin/sh
echo "Downloading WhiteSource agent..."
curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
echo "Running WhiteSource scan..."
java -jar wss-unified-agent.jar -userKey ${USER_KEY} -apiKey ${API_KEY} -projectVersion ${PROJECT_VERSION} -projectToken ${PROJECT_TOKEN} -productVersion ${PRODUCT_VERSION} -productToken ${PRODUCT_TOKEN} -c ws.config -d ../
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment