Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
06372b5
first step in docker_build.jenkins
VanDirBan Dec 18, 2024
cf416fb
Update docker_build.jenkins
VanDirBan Dec 18, 2024
08a9beb
Update docker_build.jenkins for any agent
VanDirBan Dec 18, 2024
dc84bf4
Update Dockerfile
VanDirBan Dec 18, 2024
1fa30a8
Update Dockerfile
VanDirBan Dec 18, 2024
8ea051a
Update Dockerfile
VanDirBan Dec 18, 2024
7e7dae8
Update Dockerfile
VanDirBan Dec 18, 2024
b798b26
Update Dockerfile
VanDirBan Dec 18, 2024
7a06f01
Update Dockerfile
VanDirBan Dec 18, 2024
1ec2b49
Update Dockerfile
VanDirBan Dec 18, 2024
c38b93e
Update first_steps.jenkins
VanDirBan Dec 18, 2024
ce8cba4
Update first_steps.jenkins
VanDirBan Dec 18, 2024
f4de8a2
Update docker_build.jenkins
VanDirBan Dec 18, 2024
1d75d3a
Update docker_build.jenkins
VanDirBan Dec 18, 2024
44e7afd
Update docker_build.jenkins
VanDirBan Dec 18, 2024
8a5df10
Poll SCM update
VanDirBan Dec 18, 2024
3b17b0b
Update pip install
VanDirBan Dec 18, 2024
3fd0ef3
pip version check
VanDirBan Dec 18, 2024
f7f14d3
python version check
VanDirBan Dec 18, 2024
95eb098
added toolbox tags
VanDirBan Dec 18, 2024
bce9f0f
change repo name
VanDirBan Dec 18, 2024
70b8551
Added docker login and push on docker hub
VanDirBan Dec 18, 2024
952f63c
add mysql_client to dockerfile
VanDirBan Dec 19, 2024
18491cc
Update Dockerfile
VanDirBan Dec 19, 2024
c4d0bc5
Update docker_build.jenkins
VanDirBan Dec 19, 2024
377fe96
Update docker_build.jenkins
VanDirBan Dec 19, 2024
d38aae9
Update docker_build.jenkins
VanDirBan Dec 19, 2024
4ddcaa4
Update docker_build.jenkins
VanDirBan Dec 19, 2024
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
6 changes: 3 additions & 3 deletions docker/toolbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM alpine
RUN apk add --no-cache curl wget busybox-extras netcat-openbsd python py-pip bash && \
pip install awscli
RUN apk --purge -v del py-pip
RUN apk add --no-cache curl wget busybox-extras netcat-openbsd python3 py3-pip mysql-client
RUN pip --version
RUN python --version
CMD tail -f /dev/null
13 changes: 6 additions & 7 deletions jenkinsfiles/docker_build.jenkins
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!groovy
// Run docker build
properties([disableConcurrentBuilds()])

pipeline {
agent {
label 'master'
}
agent {
label 'linux'
}
triggers { pollSCM('* * * * *') }
options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
Expand All @@ -15,7 +14,7 @@ pipeline {
stage("docker login") {
steps {
echo " ============== docker login =================="
withCredentials([usernamePassword(credentialsId: 'dockerhub_semaev', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
withCredentials([usernamePassword(credentialsId: 'Docker_hub_VanDan', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh """
docker login -u $USERNAME -p $PASSWORD
"""
Expand All @@ -26,15 +25,15 @@ pipeline {
steps {
echo " ============== start building image =================="
dir ('docker/toolbox') {
sh 'docker build -t semaev/toolbox:latest . '
sh 'docker build -t vandan2402/toolbox:example01 . '
}
}
}
stage("docker push") {
steps {
echo " ============== start pushing image =================="
sh '''
docker push semaev/toolbox:latest
docker push vandan2402/toolbox:example01
'''
}
}
Expand Down
11 changes: 2 additions & 9 deletions jenkinsfiles/first_steps.jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,15 @@
properties([disableConcurrentBuilds()])

pipeline {
agent {
label 'master'
}
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
timestamps()
}
stages {
stage("First step") {
steps {
sh 'ssh root@ub1 \'hostname\''
}
}
stage("Second step") {
steps {
sh 'ssh root@ub1 \'uptime\''
echo 'fisrt step'
}
}
}
Expand Down