Delete 'Jenkinsfile-push-gitea-dockerhub'
All checks were successful
gitea-lenape/python-jenkins-project/pipeline/head This commit looks good
All checks were successful
gitea-lenape/python-jenkins-project/pipeline/head This commit looks good
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
DOCKERHUB_REPO = 'jacqueskingram/python-jenkins-project'
|
||||
GITEA_REPO = 'http://code.jacquesingram.online:3000/lenape/python-jenkins-project.git'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build Docker Image') {
|
||||
steps {
|
||||
script {
|
||||
def imageName = "${env.DOCKERHUB_REPO}:${BUILD_NUMBER}"
|
||||
docker.build(imageName, '.')
|
||||
env.IMAGE_NAME = imageName
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Push to Gitea') {
|
||||
steps {
|
||||
git credentialsId: 'my-gitea-credentials', url: "${env.GITEA_REPO}"
|
||||
sh 'git push origin master'
|
||||
}
|
||||
}
|
||||
stage('Push to Docker Hub') {
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry('https://index.docker.io/v1/', 'my-dockerhub-credentials') {
|
||||
docker.image(env.IMAGE_NAME).push()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user