Skip to content
Open

Dev #10

Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions eureka-server/src/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +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
CMD tail -f /dev/null
42 changes: 42 additions & 0 deletions eureka-server/src/jenkins/build_docker.jenkins
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!groovy
// Run docker build
properties([disableConcurrentBuilds()])

pipeline {
agent {
label 'master'
}
triggers { pollSCM('* * * * *') }
options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
timestamps()
}
stages {
stage("docker login") {
steps {
echo " login"
withCredentials([usernamePassword(credentialsId: 'eureka-server', usernameVariable: 'ameeerka', passwordVariable: 'Frnbvtkm3')]) {
sh """
docker login -u ameeerka -p Frnbvtkm3
"""
}
}
}
stage("create docker image") {
steps {
echo " start building image"
dir ('eureka-server/src/docker/Dockerfile') {
sh 'docker build -t ameeerka/eureka-server:latest . '
}
}
}
stage("docker push") {
steps {
echo "start pushing image"
sh '''
docker push ameeerka/eureka-server:latest
'''
}
}
}
}