diff --git a/docker/toolbox/Dockerfile b/docker/toolbox/Dockerfile index cae61c5..0fa2d20 100644 --- a/docker/toolbox/Dockerfile +++ b/docker/toolbox/Dockerfile @@ -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 diff --git a/jenkinsfiles/docker_build.jenkins b/jenkinsfiles/docker_build.jenkins index a0547c0..0ff065a 100644 --- a/jenkinsfiles/docker_build.jenkins +++ b/jenkinsfiles/docker_build.jenkins @@ -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')) @@ -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 """ @@ -26,7 +25,7 @@ pipeline { steps { echo " ============== start building image ==================" dir ('docker/toolbox') { - sh 'docker build -t semaev/toolbox:latest . ' + sh 'docker build -t vandan2402/toolbox:example01 . ' } } } @@ -34,7 +33,7 @@ pipeline { steps { echo " ============== start pushing image ==================" sh ''' - docker push semaev/toolbox:latest + docker push vandan2402/toolbox:example01 ''' } } diff --git a/jenkinsfiles/first_steps.jenkins b/jenkinsfiles/first_steps.jenkins index ad7f543..3d293d8 100644 --- a/jenkinsfiles/first_steps.jenkins +++ b/jenkinsfiles/first_steps.jenkins @@ -3,9 +3,7 @@ properties([disableConcurrentBuilds()]) pipeline { - agent { - label 'master' - } + agent any options { buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10')) timestamps() @@ -13,12 +11,7 @@ pipeline { stages { stage("First step") { steps { - sh 'ssh root@ub1 \'hostname\'' - } - } - stage("Second step") { - steps { - sh 'ssh root@ub1 \'uptime\'' + echo 'fisrt step' } } }