Delete Jenkinsfile
This commit is contained in:
41
Jenkinsfile
vendored
41
Jenkinsfile
vendored
@@ -1,41 +0,0 @@
|
|||||||
pipeline {
|
|
||||||
agent any
|
|
||||||
|
|
||||||
triggers {
|
|
||||||
// Verwijder pollSCM; we gebruiken webhook trigger
|
|
||||||
// Generic Webhook Trigger handled by Jenkins job config
|
|
||||||
}
|
|
||||||
|
|
||||||
parameters {
|
|
||||||
// Parameter om de branch te ontvangen van Gitea webhook
|
|
||||||
string(name: 'ref', defaultValue: 'refs/heads/main', description: 'Git ref from webhook')
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
|
||||||
stage('Checkout') {
|
|
||||||
steps {
|
|
||||||
checkout([$class: 'GitSCM',
|
|
||||||
branches: [[name: "${params.ref}"]],
|
|
||||||
userRemoteConfigs: [[
|
|
||||||
url: 'https://git.de-roo.org/ben/ben.de-roo.org.git',
|
|
||||||
credentialsId: 'Gitea-PAT-Ben'
|
|
||||||
]]
|
|
||||||
])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Deploy to web14') {
|
|
||||||
steps {
|
|
||||||
sshagent(credentials: ['ben.de-roo.org']) {
|
|
||||||
sh '''
|
|
||||||
rsync -avz --delete \
|
|
||||||
--exclude .git \
|
|
||||||
--exclude Jenkinsfile \
|
|
||||||
-e "ssh -o StrictHostKeyChecking=no" \
|
|
||||||
./ www-data@web14:/var/www/html/
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user