Skip to content

Commit

Permalink
Fix build (#91)
Browse files Browse the repository at this point in the history
* changed mvn to mvnw

* fixing build
added Dockerfile for openjdk

* fixing build
added Dockerfile for openjdk

* test commit

* test commit

* test commit

* test commit

* test commit

* test commit

* test commit

* test commit

* test commit

* changed step in Jenkinsfile

* changed step in Jenkinsfile

* test commit

* test commit

* test commit

* test commit

* test commit

* test commit

* test commit

* test commit

* test commit

* test commit

* test commit

Co-authored-by: Bulat Yusupov <[email protected]>
  • Loading branch information
usbulat and Bulat Yusupov committed Aug 5, 2020
1 parent 8494e91 commit 4190d76
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,19 @@ spec:
stage('Build artifact') {
steps {
container('docker-client') {
sh "docker run -v $WORKSPACE:/usr/src/mymaven -v /tmp/repository:/root/.m2/repository -w /usr/src/mymaven maven:3.6.3-jdk-13 bash -c 'mvn clean package -Pprod'"
sh "docker run -v /var/run/docker.sock:/var/run/docker.sock -v $WORKSPACE:/usr/src/mymaven -v /tmp/repository:/root/.m2/repository -w /usr/src/mymaven provectuslabs/openjdk:13 bash -c 'chown -R \$(whoami):\$(whoami) kafka-ui-react-app && ./mvnw clean package -Pprod'"
}
}
}
stage('Build docker image') {
when {
expression { return env.GIT_BRANCH == 'origin/master'; }
}
steps {
container('docker-client') {
dir(path: './kafka-ui-api') {
script {
dockerImage = docker.build( registry + ":$VERSION", "--build-arg JAR_FILE=*.jar -f Dockerfile ." )
dockerImage = docker.build( registry + ":$VERSION", "--build-arg JAR_FILE=kafka-ui-api-\'$VERSION\'.jar -f Dockerfile ." )
}
}
}
Expand All @@ -121,6 +124,9 @@ spec:
}
}
stage('Remove unused docker image') {
when {
expression { return env.GIT_BRANCH == 'origin/master'; }
}
steps{
container('docker-client') {
sh "docker rmi $registry:$VERSION"
Expand Down
3 changes: 3 additions & 0 deletions docker-openjdk/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM openjdk:13
RUN yum install -y git && \
yum groupinstall -y "Development Tools"

0 comments on commit 4190d76

Please sign in to comment.