Skip to content

Commit

Permalink
Merge branch 'sonatype:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
madpah authored Jul 10, 2024
2 parents 119d105 + 33cbd75 commit 1fab563
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 54 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <[email protected]>" \
vendor=Sonatype \
version="3.69.0-02" \
release="3.69.0" \
version="3.70.0-03" \
release="3.70.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
Expand All @@ -40,10 +40,10 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"

ARG NEXUS_VERSION=3.69.0-02
ARG NEXUS_VERSION=3.70.0-03
ARG JAVA_VERSION=java8
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-${JAVA_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=4161a1bb43d92ad8ca6185fa0da2c0f02dfd62280c5b6e4ac4419df4aecaf55f
ARG NEXUS_DOWNLOAD_SHA256_HASH=002cecb09f46926dfcb4bd5600b06945f84966b4a493e8645a38f4abe6c41445

# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.alpine.java11
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ FROM alpine
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <[email protected]>" \
vendor=Sonatype \
version="3.69.0-02" \
release="3.69.0" \
version="3.70.0-03" \
release="3.70.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
Expand All @@ -36,10 +36,10 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"

ARG NEXUS_VERSION=3.69.0-02
ARG NEXUS_VERSION=3.70.0-03
ARG JAVA_VERSION=java11
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-${JAVA_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=4a22cd3f2a2bd3fef46e2f13b57abfcca9e6244c36cee8c2aac226a333524c07
ARG NEXUS_DOWNLOAD_SHA256_HASH=3461129eceb65876dc61992d2e6bc4ea28f0baf28b721f4e1ee39874788e6dee

# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.alpine.java17
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ FROM alpine
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <[email protected]>" \
vendor=Sonatype \
version="3.69.0-02" \
release="3.69.0" \
version="3.70.0-03" \
release="3.70.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
Expand All @@ -36,10 +36,10 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"

ARG NEXUS_VERSION=3.69.0-02
ARG NEXUS_VERSION=3.70.0-03
ARG JAVA_VERSION=java17
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-${JAVA_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=59ed008f74dea1a7f1a36dd896ea552c1d35ff537ec8e5669addd87776ecc7e2
ARG NEXUS_DOWNLOAD_SHA256_HASH=1624bd55df501dc866b58c65f29e6a22087d2a07950fe4ee991d921468857ebc

# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.java11
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <[email protected]>" \
vendor=Sonatype \
version="3.69.0-02" \
release="3.69.0" \
version="3.70.0-03" \
release="3.70.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
Expand All @@ -36,10 +36,10 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"

ARG NEXUS_VERSION=3.69.0-02
ARG NEXUS_VERSION=3.70.0-03
ARG JAVA_VERSION=java11
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-${JAVA_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=4a22cd3f2a2bd3fef46e2f13b57abfcca9e6244c36cee8c2aac226a333524c07
ARG NEXUS_DOWNLOAD_SHA256_HASH=3461129eceb65876dc61992d2e6bc4ea28f0baf28b721f4e1ee39874788e6dee

# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.java17
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <[email protected]>" \
vendor=Sonatype \
version="3.69.0-02" \
release="3.69.0" \
version="3.70.0-03" \
release="3.70.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
Expand All @@ -36,10 +36,10 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"

ARG NEXUS_VERSION=3.69.0-02
ARG NEXUS_VERSION=3.70.0-03
ARG JAVA_VERSION=java17
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-${JAVA_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=59ed008f74dea1a7f1a36dd896ea552c1d35ff537ec8e5669addd87776ecc7e2
ARG NEXUS_DOWNLOAD_SHA256_HASH=1624bd55df501dc866b58c65f29e6a22087d2a07950fe4ee991d921468857ebc

# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.rh.centos
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ FROM centos:centos7
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <[email protected]>" \
vendor=Sonatype \
version="3.69.0-02" \
release="3.69.0" \
version="3.70.0-03" \
release="3.70.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
Expand All @@ -36,10 +36,10 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"

ARG NEXUS_VERSION=3.69.0-02
ARG NEXUS_VERSION=3.70.0-03
ARG JAVA_VERSION=java8
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-${JAVA_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=4161a1bb43d92ad8ca6185fa0da2c0f02dfd62280c5b6e4ac4419df4aecaf55f
ARG NEXUS_DOWNLOAD_SHA256_HASH=002cecb09f46926dfcb4bd5600b06945f84966b4a493e8645a38f4abe6c41445

# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.rh.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ FROM registry.access.redhat.com/rhel7/rhel
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <[email protected]>" \
vendor=Sonatype \
version="3.69.0-02" \
release="3.69.0" \
version="3.70.0-03" \
release="3.70.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
Expand All @@ -36,10 +36,10 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"

ARG NEXUS_VERSION=3.69.0-02
ARG NEXUS_VERSION=3.70.0-03
ARG JAVA_VERSION=java8
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-${JAVA_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=4161a1bb43d92ad8ca6185fa0da2c0f02dfd62280c5b6e4ac4419df4aecaf55f
ARG NEXUS_DOWNLOAD_SHA256_HASH=002cecb09f46926dfcb4bd5600b06945f84966b4a493e8645a38f4abe6c41445

# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.rh.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
LABEL name="Nexus Repository Manager" \
vendor=Sonatype \
maintainer="Sonatype <[email protected]>" \
version="3.69.0-02" \
release="3.69.0" \
version="3.70.0-03" \
release="3.70.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
Expand All @@ -36,10 +36,10 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"

ARG NEXUS_VERSION=3.69.0-02
ARG NEXUS_VERSION=3.70.0-03
ARG JAVA_VERSION=java8
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-${JAVA_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=4161a1bb43d92ad8ca6185fa0da2c0f02dfd62280c5b6e4ac4419df4aecaf55f
ARG NEXUS_DOWNLOAD_SHA256_HASH=002cecb09f46926dfcb4bd5600b06945f84966b4a493e8645a38f4abe6c41445

# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.rh.ubi.java11
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
LABEL name="Nexus Repository Manager" \
vendor=Sonatype \
maintainer="Sonatype <[email protected]>" \
version="3.69.0-02" \
release="3.69.0" \
version="3.70.0-03" \
release="3.70.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
Expand All @@ -36,10 +36,10 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"

ARG NEXUS_VERSION=3.69.0-02
ARG NEXUS_VERSION=3.70.0-03
ARG JAVA_VERSION=java11
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-${JAVA_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=4a22cd3f2a2bd3fef46e2f13b57abfcca9e6244c36cee8c2aac226a333524c07
ARG NEXUS_DOWNLOAD_SHA256_HASH=3461129eceb65876dc61992d2e6bc4ea28f0baf28b721f4e1ee39874788e6dee

# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.rh.ubi.java17
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
LABEL name="Nexus Repository Manager" \
vendor=Sonatype \
maintainer="Sonatype <[email protected]>" \
version="3.69.0-02" \
release="3.69.0" \
version="3.70.0-03" \
release="3.70.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
Expand All @@ -36,10 +36,10 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"

ARG NEXUS_VERSION=3.69.0-02
ARG NEXUS_VERSION=3.70.0-03
ARG JAVA_VERSION=java17
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-${JAVA_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=59ed008f74dea1a7f1a36dd896ea552c1d35ff537ec8e5669addd87776ecc7e2
ARG NEXUS_DOWNLOAD_SHA256_HASH=1624bd55df501dc866b58c65f29e6a22087d2a07950fe4ee991d921468857ebc

# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
Expand Down
29 changes: 15 additions & 14 deletions Jenkinsfile-Release
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ node('ubuntu-zion') {
def JAVA_8 = 'java8'
def JAVA_11 = 'java11'
def JAVA_17 = 'java17'
def alpineDockerfilePath

try {
stage('Preparation') {
Expand Down Expand Up @@ -120,7 +121,7 @@ node('ubuntu-zion') {

// Build Alpine Image if not Java 8
if (params.java_version != OPENJDK8) {
def alpineDockerfilePath = dockerfilePath.replace("Dockerfile", "Dockerfile.alpine")
alpineDockerfilePath = dockerfilePath.replace("Dockerfile", "Dockerfile.alpine")
def alpineHash = OsTools.runSafe(this, "docker build --quiet --no-cache --tag ${imageName}-alpine . -f ${alpineDockerfilePath}")
alpineImageId = alpineHash.split(':')[1]
}
Expand Down Expand Up @@ -151,19 +152,19 @@ node('ubuntu-zion') {
}

stage('Evaluate Policies') {
runEvaluation({ stage ->
def isAlpine = alpineDockerfilePath != null && alpineDockerfilePath.contains('alpine')
def iqApplicationName = isAlpine ? 'docker-nexus3-alpine' : 'docker-nexus3'
def imageToScan = isAlpine ? "${imageName}-alpine" : imageName

nexusPolicyEvaluation(
iqStage: stage,
iqApplication: iqApplicationName,
iqScanPatterns: [[scanPattern: "container:${imageToScan}"]],
failBuildOnNetworkError: true,
)
}, 'release')
}
runEvaluation({ stage ->
def isAlpine = alpineDockerfilePath != null && alpineDockerfilePath.contains('alpine')
def iqApplicationName = isAlpine ? 'docker-nexus3-alpine' : 'docker-nexus3'
def imageToScan = isAlpine ? "${imageName}-alpine" : imageName

nexusPolicyEvaluation(
iqStage: stage,
iqApplication: iqApplicationName,
iqScanPatterns: [[scanPattern: "container:${imageToScan}"]],
failBuildOnNetworkError: true,
)
}, 'release')
}

if (currentBuild.result == 'FAILURE') {
return
Expand Down

0 comments on commit 1fab563

Please sign in to comment.