Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
3cde4cb
Create sonar-project.properties
kemvoueric Sep 5, 2021
ce28a55
Create Dockerfile
kemvoueric Sep 12, 2021
49b9a4a
Update index.jsp
kemvoueric Sep 12, 2021
ce46209
Update index.jsp
kemvoueric Sep 12, 2021
ebb7e6d
Update index.jsp
kemvoueric Sep 12, 2021
e109d04
Update sonar-project.properties
kemvoueric Sep 19, 2021
8ba1162
Update sonar-project.properties
kemvoueric Sep 19, 2021
ce4d42d
Create Jenkinsfile
kemvoueric Sep 19, 2021
e546653
Update Jenkinsfile
kemvoueric Sep 19, 2021
185bf54
Update Jenkinsfile
kemvoueric Sep 19, 2021
513618b
Update Jenkinsfile
kemvoueric Sep 19, 2021
3b249df
Update Jenkinsfile
kemvoueric Sep 19, 2021
813149c
Update Jenkinsfile
kemvoueric Sep 19, 2021
a42626e
Update Jenkinsfile
kemvoueric Sep 19, 2021
c077ce5
Update Jenkinsfile
kemvoueric Sep 19, 2021
a2db8ba
Update Jenkinsfile
kemvoueric Sep 19, 2021
8bee79a
Update Jenkinsfile
kemvoueric Sep 19, 2021
72e28de
Update Jenkinsfile
kemvoueric Sep 19, 2021
2cee957
Update Jenkinsfile
kemvoueric Sep 19, 2021
2d6ca92
Update Jenkinsfile
kemvoueric Sep 19, 2021
432061c
Update Jenkinsfile
kemvoueric Sep 19, 2021
6317023
Update Jenkinsfile
kemvoueric Sep 19, 2021
4f2e749
Create docker-agent
kemvoueric Oct 3, 2021
f0efca3
Update docker-agent
kemvoueric Oct 3, 2021
060c437
Update docker-agent
kemvoueric Oct 3, 2021
29fecc4
Update docker-agent
kemvoueric Oct 3, 2021
db92651
Update docker-agent
kemvoueric Oct 3, 2021
3d847e9
Update docker-agent
kemvoueric Oct 3, 2021
685b068
Update docker-agent
kemvoueric Oct 3, 2021
ba6eea8
Update docker-agent
kemvoueric Oct 3, 2021
6ae9de8
Update docker-agent
kemvoueric Oct 3, 2021
53a60ea
Update docker-agent
kemvoueric Oct 3, 2021
a3b6a19
Update docker-agent
kemvoueric Oct 3, 2021
739972e
Update docker-agent
kemvoueric Oct 3, 2021
5991f80
Update docker-agent
kemvoueric Oct 3, 2021
282de33
Update docker-agent
kemvoueric Oct 3, 2021
81f2375
Update docker-agent
kemvoueric Oct 3, 2021
2ddd877
Update docker-agent
kemvoueric Oct 3, 2021
e23a24f
Create Dockerfile2
kemvoueric Oct 3, 2021
5c4e783
Update index.jsp
kemvoueric Oct 10, 2021
7f8a525
Update index.jsp
kemvoueric Oct 10, 2021
85011b7
Update index.jsp
kemvoueric Oct 10, 2021
4229c3b
Update index.jsp
kemvoueric Oct 10, 2021
fd0eae2
Update index.jsp
kemvoueric Oct 10, 2021
8d766bb
Update index.jsp
kemvoueric Oct 10, 2021
b14c8d8
Update index.jsp
kemvoueric Oct 10, 2021
8745ad5
Update index.jsp
kemvoueric Oct 10, 2021
30cec4b
Update index.jsp
kemvoueric Oct 10, 2021
e4976c2
Create Jenkinsfile-containers
kemvoueric Oct 10, 2021
53267a9
Update index.jsp
kemvoueric Oct 10, 2021
def0ca9
Update Jenkinsfile-containers
kemvoueric Oct 10, 2021
631f182
Update index.jsp
kemvoueric Oct 10, 2021
9276e55
Update Jenkinsfile-containers
kemvoueric Oct 10, 2021
28c660e
Update Jenkinsfile-containers
kemvoueric Oct 10, 2021
d2b2fb1
Update Jenkinsfile-containers
kemvoueric Oct 10, 2021
fe6a08a
Update Jenkinsfile-containers
kemvoueric Oct 10, 2021
dd74fd7
test
kemvoueric Oct 17, 2021
256fff2
Create Jenkinsfile2
kemvoueric Oct 17, 2021
ce3de3f
Update Jenkinsfile2
kemvoueric Oct 17, 2021
bad0ef1
Update Jenkinsfile2
kemvoueric Oct 17, 2021
c1c8a3a
Update Jenkinsfile2
kemvoueric Oct 17, 2021
e40ec54
Update Jenkinsfile2
kemvoueric Oct 17, 2021
4ff8ae4
Update Jenkinsfile2
kemvoueric Oct 17, 2021
f09031c
Update sonar-project.properties
kemvoueric Oct 17, 2021
ef47886
Update Jenkinsfile2
kemvoueric Oct 17, 2021
bf0c26a
Update Jenkinsfile2
kemvoueric Oct 17, 2021
839a101
Update Jenkinsfile2
kemvoueric Oct 17, 2021
87692b7
Create Jenkinsfile11
kemvoueric Oct 17, 2021
e97922d
Update Jenkinsfile2
kemvoueric Oct 17, 2021
7fe0dbc
Update Jenkinsfile2
kemvoueric Oct 17, 2021
8a15454
Update Jenkinsfile2
kemvoueric Oct 17, 2021
027670f
Update Jenkinsfile2
kemvoueric Oct 17, 2021
2da6ef1
Update Jenkinsfile2
kemvoueric Oct 17, 2021
00bc607
Update Jenkinsfile2
kemvoueric Oct 17, 2021
cb25655
Update Jenkinsfile2
kemvoueric Oct 17, 2021
8ec4ff6
Update Jenkinsfile2
kemvoueric Oct 17, 2021
c7e58d0
Update Jenkinsfile2
kemvoueric Oct 17, 2021
080c3ab
Update Jenkinsfile2
kemvoueric Oct 17, 2021
511ee22
Update Jenkinsfile2
kemvoueric Oct 17, 2021
d0f4283
Update Jenkinsfile2
kemvoueric Oct 17, 2021
0034e8d
Update Jenkinsfile2
kemvoueric Oct 17, 2021
4a397b5
Update Jenkinsfile2
kemvoueric Oct 23, 2021
0c6e09c
Update sonar-project.properties
kemvoueric Oct 23, 2021
fbe7078
Update sonar-project.properties
kemvoueric Oct 23, 2021
4fecd04
Create playbook.yml
kemvoueric Oct 23, 2021
374dc3a
Update playbook.yml
kemvoueric Oct 23, 2021
20c1bd5
Create docker-compose.yml
kemvoueric Oct 23, 2021
5c48c17
Update docker-compose.yml
kemvoueric Oct 23, 2021
d625572
Update playbook.yml
kemvoueric Oct 23, 2021
aa37534
Update Jenkinsfile2
kemvoueric Oct 23, 2021
91fabc3
Update playbook.yml
kemvoueric Oct 23, 2021
ee56f84
Update playbook.yml
kemvoueric Oct 23, 2021
d487ac4
Update Jenkinsfile2
kemvoueric Oct 23, 2021
c2df916
Update Jenkinsfile2
kemvoueric Oct 23, 2021
071a590
Update playbook.yml
kemvoueric Oct 23, 2021
cf5fbe4
Update playbook.yml
kemvoueric Oct 23, 2021
ecaf587
Create deploy.sh
kemvoueric Oct 23, 2021
e02cb15
Update playbook.yml
kemvoueric Oct 23, 2021
d34fafd
Update deploy.sh
kemvoueric Oct 23, 2021
f5eec59
Update playbook.yml
kemvoueric Oct 23, 2021
b320b3b
Update playbook.yml
kemvoueric Oct 23, 2021
45eba22
Update playbook.yml
kemvoueric Oct 23, 2021
683bcb9
Update playbook.yml
kemvoueric Oct 23, 2021
271b40d
Update playbook.yml
kemvoueric Oct 23, 2021
1a63fd4
Update playbook.yml
kemvoueric Oct 23, 2021
e571564
Update docker-compose.yml
kemvoueric Oct 23, 2021
9870ac8
Update deploy.sh
kemvoueric Oct 23, 2021
9a3bbe3
Update docker-compose.yml
kemvoueric Oct 23, 2021
4abe6ff
Update docker-compose.yml
kemvoueric Oct 23, 2021
44ab425
Update docker-compose.yml
kemvoueric Oct 23, 2021
f6bf31e
Create index.html
kemvoueric Oct 23, 2021
5104073
Update Dockerfile2
kemvoueric Oct 23, 2021
5e21f21
Update Dockerfile2
kemvoueric Oct 23, 2021
5609a56
Update index.jsp
kemvoueric Oct 23, 2021
9135ac9
Update docker-compose.yml
kemvoueric Oct 23, 2021
fd03694
Update index.jsp
kemvoueric Oct 23, 2021
74af5d1
Update Jenkinsfile2
kemvoueric Oct 24, 2021
850adf2
Update sonar-project.properties
kemvoueric Oct 24, 2021
3910e26
Update index.jsp
kemvoueric Oct 24, 2021
f02fc81
Update deploy.sh
kemvoueric Oct 24, 2021
0114a4e
Update Jenkinsfile2
kemvoueric Oct 24, 2021
2b7bf28
Update Jenkinsfile2
kemvoueric Oct 24, 2021
8de8254
Update index.jsp
kemvoueric Oct 24, 2021
3f89c1a
Update Jenkinsfile2
kemvoueric Oct 24, 2021
e86488e
Update Jenkinsfile2
kemvoueric Oct 24, 2021
f0aca0e
Update docker-compose.yml
kemvoueric Oct 24, 2021
92cde45
Update index.jsp
kemvoueric Oct 24, 2021
bea3017
Update index.jsp
kemvoueric Oct 24, 2021
6afd0f6
Update index.jsp
kemvoueric Oct 24, 2021
00d96bb
Update Dockerfile2
kemvoueric Oct 24, 2021
efd0f9a
Update index.html
kemvoueric Oct 24, 2021
c488f45
Rename Dockerfile2 to apache.Dockerfile
kemvoueric Oct 24, 2021
2512a0a
Update Jenkinsfile2
kemvoueric Oct 24, 2021
45fa312
Update index.html
kemvoueric Oct 24, 2021
5cc7101
Update index.html
kemvoueric Oct 24, 2021
fc963ed
Create Jenkinsfile-backup-jenkins
kemvoueric Oct 30, 2021
09eee32
Create Jenkinsfile-back-entire-jenkins
kemvoueric Oct 30, 2021
97c7ead
Update sonar-project.properties
kemvoueric Nov 6, 2021
e443328
Create pipeline_tomcat_Dockerfile
kemvoueric Nov 7, 2021
7b21dc8
Create pipeline_apache_Dockerfile
kemvoueric Nov 7, 2021
93228a2
Create pipeline_docker-compose.yml
kemvoueric Nov 7, 2021
69b89fa
Create pipeline_deploy_script.sh
kemvoueric Nov 7, 2021
3bb0b95
Create pipeline_playbook.yml
kemvoueric Nov 7, 2021
2d7d4b2
Create pipline_jenkinsfile
kemvoueric Nov 7, 2021
da83c26
Update pipline_jenkinsfile
kemvoueric Nov 7, 2021
5c34088
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
def2987
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
66773a7
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
531cf10
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
d88ab51
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
2e439e0
Update pipeline_tomcat_Dockerfile
kemvoueric Nov 13, 2021
cfac3c0
Update pipeline_apache_Dockerfile
kemvoueric Nov 13, 2021
635aaf0
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
0c4aeab
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
5d91a31
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
80d0ab0
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
744287b
Update pipeline_apache_Dockerfile
kemvoueric Nov 13, 2021
0c0e927
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
e2c76cb
Update pipeline_playbook.yml
kemvoueric Nov 13, 2021
42cc26c
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
d294cea
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
1a4ee81
Update pipeline_playbook.yml
kemvoueric Nov 13, 2021
e91514c
Update pipeline_deploy_script.sh
kemvoueric Nov 13, 2021
65855be
Update pipeline_deploy_script.sh
kemvoueric Nov 13, 2021
1fba044
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
1dac40a
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
af0046c
Update pipeline_docker-compose.yml
kemvoueric Nov 13, 2021
21b8991
Update pipeline_deploy_script.sh
kemvoueric Nov 13, 2021
77b6a86
Update pipeline_deploy_script.sh
kemvoueric Nov 13, 2021
6515ade
Update pipeline_deploy_script.sh
kemvoueric Nov 13, 2021
cbda5a0
Update pipeline_tomcat_Dockerfile
kemvoueric Nov 13, 2021
67d4d03
Update pipeline_tomcat_Dockerfile
kemvoueric Nov 13, 2021
e5d6b23
Update pipeline_tomcat_Dockerfile
kemvoueric Nov 13, 2021
86227e2
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
62f5ffb
Update pipline_jenkinsfile
kemvoueric Nov 13, 2021
b1fc60a
Update index.jsp
kemvoueric Nov 13, 2021
62bc0de
Update index.html
kemvoueric Nov 13, 2021
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM tomcat:8.0-alpine
COPY webapp/target/webapp.war /usr/local/tomcat/webapps
56 changes: 56 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
pipeline {
agent any

stages {

stage("Code testing") {
agent any
steps {
withSonarQubeEnv('sonarqube') {
sh 'mvn clean test sonar:sonar'
}
}
}

stage("maven Build") {
steps {
withSonarQubeEnv('sonarqube') {
sh 'mvn clean install package sonar:sonar'
}
}
}



stage("build images ") {
steps {
sh '''
sudo docker rmi -f kemvoueric/maven:latest || true
sudo docker build -t kemvoueric/maven .
'''
}
}


stage("pushing to dockerhub ") {
steps {
sh '''
docker push kemvoueric/maven:latest
'''
}
}



stage("deploy to tomcat ") {
steps {
sh '''
docker run -itd -p 8888:8080 kemvoueric/maven:latest
'''
}
}



}
}
56 changes: 56 additions & 0 deletions Jenkinsfile-back-entire-jenkins
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

pipeline {
agent any

stages {
stage('cleaning the envornment') {
steps {
sh '''
DATE=$(date "+%Y-%m-%d-%M")
mkdir ~/BACKUP || true
rm -rf ~/BACKUP/* || true

'''
}
}


stage('packaging backup') {
steps {
sh '''
DATE=$(date "+%Y-%m-%d-%M")
cp -r /var/lib/jenkins/jobs ~/BACKUP
mv ~/BACKUP/jobs ~/BACKUP/jenkins-backup-jobs-$DATE
'''
}
}




stage('push into s3') {
steps {
sh '''
DATE=$(date "+%Y-%m-%d-%M")
aws s3 cp ~/BACKUP/jenkins-backup-jobs-$DATE s3://jenkins-backup-focus/jenkins-backup-jobs-$DATE --recursive

'''
}
}


}

post {

unstable {
slackSend (channel: '#jenkins', color: 'warning', message: "UNSTABLE: No backup made on AWS_S3 '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
success {
slackSend (channel: '#jenkins', color: 'good', message: "SUCCESS: all backup made on AWS_S3 '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
failure {
slackSend (channel: '#jenkins', color: '#FF0000', message: "FAILURE: backup made on AWS_S3 '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
}
}
80 changes: 80 additions & 0 deletions Jenkinsfile-backup-jenkins
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@

pipeline {
agent any

stages {
stage('cleaning the envornment') {
steps {
sh '''
DATE=$(date "+%Y-%m-%d-%M")
mkdir ~/BACKUP || true
rm -rf ~/BACKUP/* || true
mkdir ~/BACKUP/backup-$DATE ||true
'''
}
}


stage('capture all build number') {
steps {
sh '''
DATE=$(date "+%Y-%m-%d-%M")
cp -r /var/lib/jenkins/jobs/* ~/BACKUP/backup-$DATE
'''
}
}

stage('backup all build') {
steps {
sh '''
DATE=$(date "+%Y-%m-%d-%M")
for i in $(ls ~/BACKUP/backup-$DATE)
do
mkdir ~/BACKUP/$i-$DATE ||true
cp -r ~/BACKUP/backup-$DATE/$i/builds/* ~/BACKUP/$i-$DATE
rm -rf ~/BACKUP/$i-$DATE/legacyIds
rm -rf ~/BACKUP/$i-$DATE/permalinks
done
'''
}
}


stage('make file reday for AWS_S3') {
steps {
sh '''
DATE=$(date "+%Y-%m-%d-%M")
rm -rf ~/BACKUP/backup*
mkdir ~/BACKUP/jenkins_backup_$DATE
mv ~/BACKUP/* ~/BACKUP/jenkins_backup_$DATE || true
'''
}
}


stage('push into s3') {
steps {
sh '''
DATE=$(date "+%Y-%m-%d-%M")
aws s3 cp ~/BACKUP/jenkins_backup_$DATE s3://jenkins-backup-focus/jenkins_backup_$DATE --recursive

'''
}
}


}

post {

unstable {
slackSend (channel: '#jenkins', color: 'warning', message: "UNSTABLE: No backup made on AWS_S3 '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
success {
slackSend (channel: '#jenkins', color: 'good', message: "SUCCESS: all backup made on AWS_S3 '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
failure {
slackSend (channel: '#jenkins', color: '#FF0000', message: "FAILURE: backup made on AWS_S3 '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
}
}
81 changes: 81 additions & 0 deletions Jenkinsfile-containers
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
pipeline {
agent none
stages {



stage('cleaning') {

agent {
label "master"
}

steps {
sh '''
rm -rf ./*
'''
}
}

stage('cloning the repo') {
agent {
docker { image 'git_container' }
}
steps {
sh '''
git clone https://github.com/kemvoueric/devops_addressbook.git

'''
}
}



stage('build artifact') {
agent {
docker { image 'maven:3.8.1-adoptopenjdk-11' }
}
steps {
sh '''
ls
cd devops_addressbook
mvn clean install package
sleep 5
'''
}
}

stage('building images') {
agent {
label "master"
}
steps {
sh '''

cd devops_addressbook
sudo docker build -t tomcat-image:${BUILD_NUMBER} .

'''
}
}

stage('deploy') {
agent {
label "master"
}
steps {
sh '''

sudo docker rm -f $(sudo docker ps -aq)

sudo docker run -itd --name tomcat-${BUILD_NUMBER} -p 85:8080 tomcat-image:${BUILD_NUMBER}
sudo docker ps
'''
}
}


}

}

25 changes: 25 additions & 0 deletions Jenkinsfile11
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pipeline {
agent any
stages {

stage('build && SonarQube analysis') {
steps {
withSonarQubeEnv('sonarqube') {
// Optionally use a Maven environment you've configured already
withMaven(maven:'Maven 3.8.3') {
sh 'mvn clean package sonar:sonar'
}
}
}
}
stage("Quality Gate") {
steps {
timeout(time: 1, unit: 'HOURS') {
// Parameter indicates whether to set pipeline to UNSTABLE if Quality Gate fails
// true = set pipeline to UNSTABLE, false = don't
waitForQualityGate abortPipeline: true
}
}
}
}
}
Loading