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

Jenkins CI pipeline #39

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

Conversation

Johntawu
Copy link

pipeline {
agent any
tools {
maven "maven3.8.4"
}
stages{
stages('Gitclone') {
steps{
sh "echo clone the latest applicatios version"
git https://github.com/Pline-org/Maven-web-application
}
}
stages('Testbuild'){
steps{
sh "echo Running unitTesting"
sh "echo unitTesting ok. Creating packages"
sh "mvn clean package"
sh "echo Artifacts created"
}
}
stages('codeQuality'){
steps{
sh "echo Running codeQuality Report"
sh "mvn sonar:sonar"
}
}
stages('uploadArtifacts'){
steps{
sh "echo uploadArtifacts into nexus"
sh "mvn deploy"

  }
}
stages('message'){
  steps{
    sh  "echo CI job successful"
   }

 }

}

}

  1. Continious Deployment job:
    Deploy to docker

pipeline{
agent any
stages{
stages( 'predeployment'){
steps{
sh "docker build"
// sh "docker login -u mylamndmarktech"
sh "docker push"

       }
     }      
      stages( 'deployment'){
    steps{
      sh "echo ready for deployment"
      sh "docker run" 
     }
   }
   }
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant