Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
user-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
user-manager
Commits
f94fafd9
Commit
f94fafd9
authored
1 year ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
reactivate Jenkins file for release
parent
230bc78f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Jenkinsfile
+81
-85
81 additions, 85 deletions
Jenkinsfile
with
81 additions
and
85 deletions
Jenkinsfile
+
81
−
85
View file @
f94fafd9
...
@@ -56,9 +56,9 @@ pipeline {
...
@@ -56,9 +56,9 @@ pipeline {
FAILED_STAGE
=
env
.
STAGE_NAME
FAILED_STAGE
=
env
.
STAGE_NAME
}
}
//
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
//
sh './mvnw -pl user-manager-interface -s $MAVEN_SETTINGS clean deploy -Dmaven.wagon.http.retryHandler.count=3'
sh
'./mvnw -pl user-manager-interface -s $MAVEN_SETTINGS clean deploy -Dmaven.wagon.http.retryHandler.count=3'
//
}
}
}
}
}
}
...
@@ -67,10 +67,10 @@ pipeline {
...
@@ -67,10 +67,10 @@ pipeline {
script
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
FAILED_STAGE
=
env
.
STAGE_NAME
//
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
//
sh './mvnw -pl user-manager-server -s $MAVEN_SETTINGS clean deploy -Dmaven.wagon.http.retryHandler.count=3'
sh
'./mvnw -pl user-manager-server -s $MAVEN_SETTINGS clean deploy -Dmaven.wagon.http.retryHandler.count=3'
//
junit testResults: '**/target/surefire-reports/*.xml', skipPublishingChecks: true
junit
testResults:
'**/target/surefire-reports/*.xml'
,
skipPublishingChecks:
true
//
}
}
}
}
}
}
}
}
...
@@ -80,32 +80,28 @@ pipeline {
...
@@ -80,32 +80,28 @@ pipeline {
script
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
FAILED_STAGE
=
env
.
STAGE_NAME
//
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
withCredentials
([
usernamePassword
(
credentialsId:
'jenkins-nexus-login'
,
usernameVariable:
'USER'
,
passwordVariable:
'PASSWORD'
)])
{
//
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
//
sh './mvnw -pl user-manager-server -s $MAVEN_SETTINGS clean verify -Pnative -Dquarkus.container-image.registry=docker.ozg-sh.de -Dquarkus.container-image.username=${USER} -Dquarkus.container-image.password=${PASSWORD} -Dquarkus.container-image.push=true -Dquarkus.container-image.build=true -Dquarkus.native.remote-container-build=true -Dmaven.wagon.http.retryHandler.count=3'
sh
'./mvnw -pl user-manager-server -s $MAVEN_SETTINGS clean verify -Pnative -Dquarkus.container-image.registry=docker.ozg-sh.de -Dquarkus.container-image.username=${USER} -Dquarkus.container-image.password=${PASSWORD} -Dquarkus.container-image.push=true -Dquarkus.container-image.build=true -Dquarkus.native.remote-container-build=true -Dmaven.wagon.http.retryHandler.count=3'
//
}
}
//
}
}
}
}
}
}
}
}
stage
(
'OWASP Dependency-Check Vulnerabilities'
)
{
stage
(
'OWASP Dependency-Check Vulnerabilities'
)
{
steps
{
steps
{
script
{
dependencyCheck
additionalArguments:
'''
FAILED_STAGE
=
env
.
STAGE_NAME
-o "./"
}
-s "./"
-f "ALL"
// dependencyCheck additionalArguments: '''
-d /dependency-check-data
// -o "./"
--suppression dependency-check-supressions.xml
// -s "./"
--disableKnownExploited
// -f "ALL"
--disableArchive
// -d /dependency-check-data
--prettyPrint'''
,
odcInstallation:
'dependency-check-owasp'
// --suppression dependency-check-supressions.xml
// --disableKnownExploited
// --disableArchive
// --prettyPrint''', odcInstallation: 'dependency-check-owasp'
//
dependencyCheckPublisher pattern: 'dependency-check-report.xml'
dependencyCheckPublisher
pattern:
'dependency-check-report.xml'
}
}
}
}
...
@@ -117,17 +113,17 @@ pipeline {
...
@@ -117,17 +113,17 @@ pipeline {
script
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
FAILED_STAGE
=
env
.
STAGE_NAME
//
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
//
dir('user-manager-server') {
dir
(
'user-manager-server'
)
{
//
try {
try
{
//
withSonarQubeEnv('sonarqube-ozg-sh'){
withSonarQubeEnv
(
'sonarqube-ozg-sh'
){
//
sh "./mvnw -s $MAVEN_SETTINGS package sonar:sonar -Dsonar.coverage.jacoco.xmlReportPaths=${env.WORKSPACE}/user-manager-server/target/jacoco-report/jacoco.xml"
sh
"./mvnw -s $MAVEN_SETTINGS package sonar:sonar -Dsonar.coverage.jacoco.xmlReportPaths=${env.WORKSPACE}/user-manager-server/target/jacoco-report/jacoco.xml"
//
}
}
//
} catch (Exception e) {
}
catch
(
Exception
e
)
{
//
unstable("SonarQube failed")
unstable
(
"SonarQube failed"
)
//
}
}
//
}
}
//
}
}
}
}
}
}
}
}
...
@@ -136,16 +132,16 @@ pipeline {
...
@@ -136,16 +132,16 @@ pipeline {
steps
{
steps
{
script
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
FAILED_STAGE
=
env
.
STAGE_NAME
//
IMAGE_TAG = generateImageTag()
IMAGE_TAG
=
generateImageTag
()
//
tagAndPushDockerImage(IMAGE_TAG)
tagAndPushDockerImage
(
IMAGE_TAG
)
//
if (env.BRANCH_NAME == 'master') {
if
(
env
.
BRANCH_NAME
==
'master'
)
{
//
tagAndPushDockerImage('snapshot-latest')
tagAndPushDockerImage
(
'snapshot-latest'
)
//
}
}
//
else if (env.BRANCH_NAME == 'release') {
else
if
(
env
.
BRANCH_NAME
==
'release'
)
{
//
tagAndPushDockerImage('latest')
tagAndPushDockerImage
(
'latest'
)
//
}
}
}
}
}
}
}
}
...
@@ -159,11 +155,11 @@ pipeline {
...
@@ -159,11 +155,11 @@ pipeline {
dir
(
'src/main/helm'
)
{
dir
(
'src/main/helm'
)
{
sh
"helm lint -f ../../test/unit-values.yaml"
sh
"helm lint -f ../../test/unit-values.yaml"
sh
"helm unittest
--helm3
-f '../../test/helm/*.yaml' -v '../../test/unit-values.yaml' ."
sh
"helm unittest -f '../../test/helm/*.yaml' -v '../../test/unit-values.yaml' ."
sh
"helm package --version=${HELM_CHART_VERSION} ."
sh
"helm package --version=${HELM_CHART_VERSION} ."
//
deployHelmChart(HELM_CHART_VERSION)
deployHelmChart
(
HELM_CHART_VERSION
)
}
}
}
}
}
}
...
@@ -195,11 +191,11 @@ pipeline {
...
@@ -195,11 +191,11 @@ pipeline {
script
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
FAILED_STAGE
=
env
.
STAGE_NAME
//
cloneGitopsRepo()
cloneGitopsRepo
()
//
setNewTestUserManagerVersion()
setNewTestUserManagerVersion
()
//
pushTestGitopsRepo()
pushTestGitopsRepo
()
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment