Skip to content

Commit

Permalink
Merge branch 'DebianVersion' into 'master'
Browse files Browse the repository at this point in the history
Jenkinsfile#debian[Release|Snapshot] added

See merge request exedio/cope!1257
  • Loading branch information
rw7 committed Sep 17, 2024
2 parents f78d1aa + c48617b commit 0252cfe
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
11 changes: 11 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import groovy.transform.Field
import groovy.transform.stc.ClosureParams
import groovy.transform.stc.SimpleType

@Field
String debianRelease = 'bullseye'
@Field
String debianSnapshot = '20220418'
@Field
String jdk = 'openjdk-17'
@Field
Expand Down Expand Up @@ -50,6 +54,7 @@ try
def mainImage = mainImage(imageName("Main"))
def dbImage = docker.build(
imageName('Main', 'apache'),
'--build-arg DEBIAN_RELEASE=' + debianRelease + ' ' +
'conf/apache')
shSilent "mkdir VaultHttpServiceDocumentRoot"
shSilent "mkdir VaultHttpServiceDocumentRoot/myContent"
Expand Down Expand Up @@ -216,6 +221,8 @@ try
{
def mainImage = docker.build(
imageName('Github'),
'--build-arg DEBIAN_RELEASE=' + debianRelease + ' ' +
'--build-arg DEBIAN_SNAPSHOT=' + debianSnapshot + ' ' +
'--build-arg JDK=' + jdk + ' ' +
'conf/github')

Expand Down Expand Up @@ -267,6 +274,8 @@ try
nodeCheckoutAndDelete {
def ideaImage = docker.build(
imageName('Idea'),
'--build-arg DEBIAN_RELEASE=' + debianRelease + ' ' +
'--build-arg DEBIAN_SNAPSHOT=' + debianSnapshot + ' ' +
'--build-arg JDK=' + jdk + ' ' +
'--build-arg IDEA=' + idea + ' ' +
'--build-arg IDEA_SHA256=' + ideaSHA256 + ' ' +
Expand Down Expand Up @@ -578,6 +587,8 @@ def mainImage(String imageName)
{
return docker.build(
imageName,
'--build-arg DEBIAN_RELEASE=' + debianRelease + ' ' +
'--build-arg DEBIAN_SNAPSHOT=' + debianSnapshot + ' ' +
'--build-arg JDK=' + jdk + ' ' +
'--build-arg JENKINS_OWNER=' + env.JENKINS_OWNER + ' ' +
'conf/main')
Expand Down
3 changes: 2 additions & 1 deletion conf/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM httpd:2.4.53-bullseye
ARG DEBIAN_RELEASE
FROM httpd:2.4.53-${DEBIAN_RELEASE}

COPY httpd.conf /usr/local/apache2/conf/httpd.conf
4 changes: 3 additions & 1 deletion conf/github/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM debian:bullseye-20220418
ARG DEBIAN_RELEASE
ARG DEBIAN_SNAPSHOT
FROM debian:${DEBIAN_RELEASE}-${DEBIAN_SNAPSHOT}

# corresponds to .github/workflows/ant.yml
ARG JDK
Expand Down
7 changes: 6 additions & 1 deletion conf/idea/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Any ARG before the first FROM can be used in all FROM instruction of the Dockerfile.
# https://docs.docker.com/reference/dockerfile/#understand-how-arg-and-from-interact
ARG DEBIAN_RELEASE
ARG DEBIAN_SNAPSHOT

FROM alpine:3.16.2 AS idea-fetcher
RUN apk --no-cache add curl
ARG IDEA
Expand All @@ -11,7 +16,7 @@ curl \
EOF


FROM debian:bullseye-20220418
FROM debian:${DEBIAN_RELEASE}-${DEBIAN_SNAPSHOT}

ARG JDK
RUN <<EOF
Expand Down
4 changes: 3 additions & 1 deletion conf/main/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM debian:bullseye-20220418
ARG DEBIAN_RELEASE
ARG DEBIAN_SNAPSHOT
FROM debian:${DEBIAN_RELEASE}-${DEBIAN_SNAPSHOT}

ARG JDK
RUN <<EOF
Expand Down

0 comments on commit 0252cfe

Please sign in to comment.