Skip to content

Commit

Permalink
Merge branch 'main' of github.com:iceHtwoO/lemmyremindyou
Browse files Browse the repository at this point in the history
  • Loading branch information
iceHtwoO committed Jul 16, 2023
2 parents 31a874e + 98be45e commit 3e36142
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
node {
def app

stage('Clone repository') {
checkout scm
}

stage('Build image') {
app = docker.build("iceh2/lemmyremindyou")
}

stage('Push image') {
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
app.push("${env.BUILD_NUMBER}")
app.push("latest")
pipeline {
agent any
stages {
stage('Clone repository') {
steps {
checkout scm
}
}

stage('Build image') {
steps {
script {
app = docker.build("iceh2/lemmyremindyou")
}
}
}

stage('Push image') {
when {
tag 'v*.*.*'
}
steps {
script {
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
app.push("${env.TAG_NAME}")
app.push("latest")
}
}
}
}
}
}

0 comments on commit 3e36142

Please sign in to comment.