change https to gitea
This commit is contained in:
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@@ -36,7 +36,7 @@ pipeline {
|
||||
// Auschecken der Sourcen zum App Projekt
|
||||
stage('Checkout Source') {
|
||||
steps {
|
||||
git url: 'http://130.61.26.230:30080/dev-master/secdevops-csharp-app.git',
|
||||
git url: 'https://gitea.dagobert84.duckdns.org/dev-master/secdevops-csharp-app.git',
|
||||
branch: 'master'
|
||||
}
|
||||
}
|
||||
@@ -115,21 +115,20 @@ pipeline {
|
||||
passwordVariable: 'GITEA_TOKEN')]) {
|
||||
sh '''
|
||||
# WORKAROUND: Dem Container beibringen, wer git.example.com ist, ansonsten funktioniert das Übertragen des Images an Git nicht!!!
|
||||
echo "130.61.26.230 git.example.com" >> /etc/hosts
|
||||
#echo "130.61.26.230 git.example.com" >> /etc/hosts
|
||||
|
||||
# Erstellt die Docker-Konfiguration für Kaniko
|
||||
# Das $(echo ...) Kommando kombiniert User und Token für den Login
|
||||
echo "{\\"auths\\":{\\"130.61.26.230:30080\\":{\\"auth\\":\\"\$(echo -n \${GITEA_USER}:\${GITEA_TOKEN} | base64)\\"}}}" > /kaniko/.docker/config.json
|
||||
echo "{\\"auths\\":{\\"https://gitea.dagobert84.duckdns.org\\":{\\"auth\\":\\"\$(echo -n \${GITEA_USER}:\${GITEA_TOKEN} | base64)\\"}}}" > /kaniko/.docker/config.json
|
||||
|
||||
# Der Bau- und Push-Befehl
|
||||
# Wir taggen das Image mit 'latest' UND der Build-Nummer zur Sicherheit
|
||||
/kaniko/executor --context `pwd` \
|
||||
--dockerfile `pwd`/Dockerfile \
|
||||
--insecure \
|
||||
--skip-tls-verify \
|
||||
--build-arg JENKINS_BUILD=${BUILD_NUMBER} \
|
||||
--destination 130.61.26.230:30080/dev-master/secdevops-csharp-app:latest \
|
||||
--destination 130.61.26.230:30080/dev-master/secdevops-csharp-app:${BUILD_NUMBER}
|
||||
--destination https://gitea.dagobert84.duckdns.org/dev-master/secdevops-csharp-app:latest \
|
||||
--destination https://gitea.dagobert84.duckdns.org/dev-master/secdevops-csharp-app:${BUILD_NUMBER}
|
||||
'''
|
||||
}
|
||||
}
|
||||
@@ -152,7 +151,7 @@ pipeline {
|
||||
--template "@/contrib/html.tpl" \
|
||||
--exit-code 1 \
|
||||
-o reports/trivy-image-report.html \
|
||||
130.61.26.230:30080/dev-master/secdevops-csharp-app:latest
|
||||
https://gitea.dagobert84.duckdns.org/dev-master/secdevops-csharp-app:latest
|
||||
'''
|
||||
|
||||
// Den Scan ein zweites Mal kurz ohne Report ausführen, damit die Pipeline bei Lücken blockiert
|
||||
|
||||
Reference in New Issue
Block a user