update pipeline
This commit is contained in:
80
.drone.yml
80
.drone.yml
@@ -1,73 +1,13 @@
|
|||||||
kind: pipeline
|
kind: template
|
||||||
type: docker
|
load: java-build-deploy.yaml
|
||||||
name: build
|
data:
|
||||||
|
arch: arm64
|
||||||
trigger:
|
os: linux
|
||||||
branch:
|
build_branches:
|
||||||
- main
|
- main
|
||||||
event:
|
build_events:
|
||||||
- push
|
- push
|
||||||
- pull_request
|
- pull_request
|
||||||
|
sonar_project_key: HidekoBot
|
||||||
steps:
|
deploy_targets:
|
||||||
# test if it compiles correctly
|
- production
|
||||||
- name: build
|
|
||||||
image: maven:3-eclipse-temurin-21
|
|
||||||
commands:
|
|
||||||
- mvn verify --no-transfer-progress -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
|
||||||
|
|
||||||
# run unit tests
|
|
||||||
- name: test
|
|
||||||
image: maven:3-eclipse-temurin-21
|
|
||||||
commands:
|
|
||||||
- mvn test --no-transfer-progress -B -V
|
|
||||||
|
|
||||||
# check maven dependencies
|
|
||||||
- name: dependency-check
|
|
||||||
image: maven:3-eclipse-temurin-21
|
|
||||||
commands:
|
|
||||||
- mvn dependency-check:check --no-transfer-progress -B -V -DnvdApiKey=$NVD_API_KEY
|
|
||||||
environment:
|
|
||||||
NVD_API_KEY:
|
|
||||||
from_secret: nvd_api_key
|
|
||||||
|
|
||||||
# run code analysis
|
|
||||||
- name: code-analysis
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
image: maven:3-eclipse-temurin-21
|
|
||||||
commands:
|
|
||||||
- mvn sonar:sonar --no-transfer-progress -Dsonar.projectKey=$SONAR_PROJECT_KEY -Dsonar.host.url=$SONAR_INSTANCE_URL -Dsonar.token=$SONAR_LOGIN_KEY -B -V
|
|
||||||
environment:
|
|
||||||
SONAR_PROJECT_KEY:
|
|
||||||
from_secret: sonar_project_key
|
|
||||||
SONAR_INSTANCE_URL:
|
|
||||||
from_secret: sonar_instance_url
|
|
||||||
SONAR_LOGIN_KEY:
|
|
||||||
from_secret: sonar_login_key
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: deploy
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- promote
|
|
||||||
target:
|
|
||||||
- production
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# skip all previous steps because they were already ran in the "build" phase; we don't need to re-analyze the code.
|
|
||||||
|
|
||||||
# upload to maven repository
|
|
||||||
- name: maven-deploy
|
|
||||||
image: maven:3-eclipse-temurin-21
|
|
||||||
commands:
|
|
||||||
- mvn deploy --no-transfer-progress -DskipTests=true -Dmaven.javadoc.skip=true -B -V -gs settings.xml -Dmaven.repo.username=$MAVEN_REPO_USERNAME -Dmaven.repo.password=$MAVEN_REPO_PASSWORD
|
|
||||||
environment:
|
|
||||||
MAVEN_REPO_USERNAME:
|
|
||||||
from_secret: maven_repo_username
|
|
||||||
MAVEN_REPO_PASSWORD:
|
|
||||||
from_secret: maven_repo_password
|
|
@@ -1,9 +1,9 @@
|
|||||||
# HidekoBot
|
# HidekoBot
|
||||||
[](https://sonar.beatrice.wtf/dashboard?id=HidekoBot_AYWyYHsvX-1Ma0D4pJ59)
|
[](https://sonar.beatrice.wtf/dashboard?id=HidekoBot)
|
||||||
[](https://sonar.beatrice.wtf/dashboard?id=HidekoBot_AYWyYHsvX-1Ma0D4pJ59)
|
[](https://sonar.beatrice.wtf/dashboard?id=HidekoBot)
|
||||||
[](https://sonar.beatrice.wtf/dashboard?id=HidekoBot_AYWyYHsvX-1Ma0D4pJ59)
|
[](https://sonar.beatrice.wtf/dashboard?id=HidekoBot)
|
||||||
[](https://drone.beatrice.wtf/bea/HidekoBot)
|
[](https://drone.beatrice.wtf/bea/HidekoBot)
|
||||||
[](https://sonar.beatrice.wtf/dashboard?id=HidekoBot_AYWyYHsvX-1Ma0D4pJ59)
|
[](https://sonar.beatrice.wtf/dashboard?id=HidekoBot)
|
||||||
|
|
||||||
Hideko is a general-purpose Discord bot.
|
Hideko is a general-purpose Discord bot.
|
||||||
|
|
||||||
|
1
pom.xml
1
pom.xml
@@ -160,6 +160,7 @@
|
|||||||
<failBuildOnCVSS>8</failBuildOnCVSS>
|
<failBuildOnCVSS>8</failBuildOnCVSS>
|
||||||
<!--suppress UnresolvedMavenProperty -->
|
<!--suppress UnresolvedMavenProperty -->
|
||||||
<nvdApiKey>${nvdApiKey}</nvdApiKey>
|
<nvdApiKey>${nvdApiKey}</nvdApiKey>
|
||||||
|
<knownExploitedUrl>https://raw.githubusercontent.com/EugenMayer/cisa-known-exploited-mirror/main/known_exploited_vulnerabilities.json</knownExploitedUrl>
|
||||||
<formats>
|
<formats>
|
||||||
<format>html</format>
|
<format>html</format>
|
||||||
<format>json</format>
|
<format>json</format>
|
||||||
|
@@ -1,31 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
|
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
|
||||||
|
<!--
|
||||||
<suppress>
|
<suppress>
|
||||||
<notes><![CDATA[
|
<notes><![CDATA[
|
||||||
file name: snakeyaml-1.33.jar
|
file name: snakeyaml-1.33.jar
|
||||||
]]></notes>
|
]]></notes>
|
||||||
<packageUrl regex="true">^pkg:maven/org\.yaml/snakeyaml@.*$</packageUrl>
|
<packageUrl regex="true">^pkg:maven/org\.yaml/snakeyaml@.*$</packageUrl>
|
||||||
<cve>CVE-2021-4235</cve>
|
<cve>CVE-2021-4235</cve>
|
||||||
</suppress>
|
</suppress>
|
||||||
<suppress>
|
-->
|
||||||
<notes><![CDATA[
|
|
||||||
file name: snakeyaml-1.33.jar
|
|
||||||
]]></notes>
|
|
||||||
<packageUrl regex="true">^pkg:maven/org\.yaml/snakeyaml@.*$</packageUrl>
|
|
||||||
<cve>CVE-2022-3064</cve>
|
|
||||||
</suppress>
|
|
||||||
<suppress>
|
|
||||||
<notes><![CDATA[
|
|
||||||
file name: snakeyaml-1.33.jar
|
|
||||||
]]></notes>
|
|
||||||
<packageUrl regex="true">^pkg:maven/org\.yaml/snakeyaml@.*$</packageUrl>
|
|
||||||
<vulnerabilityName>CVE-2022-1471</vulnerabilityName>
|
|
||||||
</suppress>
|
|
||||||
<suppress>
|
|
||||||
<notes><![CDATA[
|
|
||||||
file name: json-20220924.jar
|
|
||||||
]]></notes>
|
|
||||||
<packageUrl regex="true">^pkg:maven/org\.json/json@.*$</packageUrl>
|
|
||||||
<vulnerabilityName>CVE-2022-45688</vulnerabilityName>
|
|
||||||
</suppress>
|
|
||||||
</suppressions>
|
</suppressions>
|
Reference in New Issue
Block a user