Skip to content

Feature/dockerbuild #200

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
4 changes: 4 additions & 0 deletions nodejstest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
how to run nodejs
npm instal
ini quiz
pool scm trigger di jenkins pake H2/* * * *
1 change: 1 addition & 0 deletions readme2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
60 changes: 60 additions & 0 deletions worker/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
pipeline {
agent{
docker{
image 'maven:3.6.1-jdk-8-slim'
args '-v $HOME/.m2:/root/.m2'
}
}

tools{
maven 'maven 3.6.1'
}
stages{
stage("build"){
when{
changeset "**/worker/**"
}
steps{
echo 'Compiling worker app'
dir('worker'){
sh 'mvn compile'
}
}
}
stage("test"){
when{
changeset "**/worker/**"
}
steps{
echo 'Running Unit Tets on worker app'
dir('worker'){
sh 'mvn clean test'
}
}
}
stage("package"){
when{
branch 'master'
changeset "**/worker/**"
}
steps{
echo 'Packaging worker app'
dir('worker'){
sh 'mvn package -DskipTests'
archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true
}
}
}
}
post{
always{
echo 'Building multibranch pipeline for worker is completed..'
}
failure {
slackSend (channel: "instavoteg2", message: "Build Failed - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
success {
slackSend (channel: "instavoteg2", message: "Build Succeeded - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
}
}
1 change: 1 addition & 0 deletions worker/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
belajar php
1 change: 1 addition & 0 deletions worker/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
belajar nih