Skip to content

Commit 3f0a0e7

Browse files
authored
Merge pull request #46 from hemanth22/v3.2
V3.2
2 parents b2f98fb + 1d1321b commit 3f0a0e7

8 files changed

Lines changed: 47 additions & 227 deletions

Jenkinsfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
node {
2+
stage('Preparation') {
3+
git branch: 'v3.2', credentialsId: 'github', url: 'https://github.com/hemanth22/CentOSJenkins.git'
4+
}
5+
stage('Build') {
6+
sh 'docker-compose build'
7+
}
8+
stage('Deploy') {
9+
withDockerRegistry(credentialsId: 'docker') {
10+
sh """
11+
docker tag centosdocker_jenkins:latest bitroid/centosjenkins:release-3.2.0
12+
docker push bitroid/centosjenkins:release-3.2.0
13+
"""
14+
}
15+
}
16+
stage('Results') {
17+
sh 'docker images'
18+
}
19+
}

SUMMARY.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

jenkins/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
FROM bitroid/centos:dind
22
COPY . .
3-
RUN yum update -y;yum install -y initscripts;yum install -y epel-release;yum install -y wget yum-presto openssl ant mlocate vim curl git gcc make gcc-c++ bash-completion-extras which;yum install -y nginx fpaste ansible-* java-1.8.0-openjdk
4-
RUN ansible-galaxy install geerlingguy.nginx;ansible-galaxy install geerlingguy.jenkins; wget -O jenkinsinstaller.playbook https://gist.githubusercontent.com/hemanth22/12c97105bdc99e8c699b44e39548fd37/raw/4614d104038bb08cc531a1ec4dde6688b4e40568/jenkinsinstaller.playbook; ansible-playbook jenkinsinstaller.playbook; ansible-galaxy install hemanth22.butler; wget -O butler.playbook https://gist.githubusercontent.com/hemanth22/003728968edf17785f646e81015d4bbe/raw/4a80f64dfb7ba71b919c7de44914fd78deb156eb/butler.playbook; ansible-playbook butler.playbook; yum install -y bcrypt docker-compose; useradd docker; usermod -a -G docker jenkins; usermod -a -G dockerroot jenkins
3+
RUN sh jenkins.sh
54
EXPOSE 8080
6-
CMD systemctl start nginx
75
CMD ["/usr/sbin/init"]

jenkins/jenkins.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
echo "Update Base OS"
2+
yum update -y
3+
echo "Initscripts"
4+
yum install -y initscripts
5+
echo "Extra Packages for Enterprise Linux"
6+
yum install -y epel-release
7+
echo "Pre-requiste"
8+
yum install -y wget yum-presto openssl ant mlocate vim curl git gcc make gcc-c++ bash-completion-extras which tree
9+
yum install -y nginx fpaste ansible java-1.8.0-openjdk
10+
echo "Install playbook"
11+
ansible-galaxy install geerlingguy.nginx
12+
ansible-galaxy install geerlingguy.jenkins
13+
ansible-galaxy install geerlingguy.java
14+
ansible-galaxy install hemanth22.butler
15+
echo "Provisining Jenkins"
16+
wget -O jenkinsinstaller.playbook https://gist.githubusercontent.com/hemanth22/12c97105bdc99e8c699b44e39548fd37/raw/4614d104038bb08cc531a1ec4dde6688b4e40568/jenkinsinstaller.playbook
17+
ansible-playbook jenkinsinstaller.playbook
18+
echo "Provisining Bulter"
19+
wget -O butler.playbook https://gist.githubusercontent.com/hemanth22/003728968edf17785f646e81015d4bbe/raw/4a80f64dfb7ba71b919c7de44914fd78deb156eb/butler.playbook
20+
ansible-playbook butler.playbook
21+
echo "Install extra plugins for jenkins and docker"
22+
yum install -y bcrypt docker-compose
23+
echo "Adding user"
24+
useradd docker
25+
echo "Granting docker privilage to jenkins"
26+
usermod -a -G docker jenkins
27+
usermod -a -G dockerroot jenkins

website/README.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

website/case-study-assignment-by-intellipaat.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

website/docker-compose-file-for-assignment.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

website/docker-stack-with-dockerhub-images..md

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)