Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage #116

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open

Stage #116

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM tomcat:8
LABEL app=my-app
COPY target/*.war /usr/local/tomcat/webapps/myweb.war
# testing webhook
FROM tomcat:8.0.20-jre8
# Dummy text to test
# COPY target/myweb*.war /usr/local/tomcat/webapps/myweb.war
RUN mkdir srilatha
# Git webhook trigger demo
# TO test github push trigger hari
13 changes: 0 additions & 13 deletions Jenkinsfile

This file was deleted.

62 changes: 0 additions & 62 deletions Jenkinsfile_old

This file was deleted.

25 changes: 25 additions & 0 deletions jenkins-declarative-pipeline
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pipeline {
agent any
stages{
stage("Git Checkout"){
steps{
git credentialsId: 'github', url: 'https://github.com/Sarath818/my-app'
}

}
stage("Docker-Build"){
steps{
sh 'docker build -t . sarath818/node-app:v10'
withCredentials([string(credentialsId: 'docker-hub', variable: 'dockerhubpwd')]) {
sh "docker login -u sarath818 -p ${dockerhubpwd}"
}
sh 'docker push sarath818/node-app:v10'
}

}

}
}
}


30 changes: 30 additions & 0 deletions multi-agent-demo
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pipeline{
agent any
tools {
maven 'maven-3'
}
stages{
stage('Git Checkout'){
agent{
label 'master'
}
steps{
git url: 'https://github.com/sarath818/my-app'
stash 'source'
}
}
stage('mvn package'){
agent{
label 'slave-one'
}
steps{

unstash 'source'
sh "mvn clean package"


}
}
}
}
]