Compare commits

..

56 Commits

Author SHA1 Message Date
Sonatype 2dbd060181 Update Repository Manager to 3.37.2-02. 2021-12-28 17:19:37 +00:00
Michael Martz 77340fdecd When only updating the latest tag, skip committing 2021-12-20 10:51:01 -06:00
Michael Martz 49f38c3310 Use the correct credentials 2021-12-20 10:47:17 -06:00
Sonatype 5a1899febe Update Repository Manager to 3.37.1-01. 2021-12-20 16:35:06 +00:00
Michael Martz 4d7088c65d Add update_latest_only flag 2021-12-20 10:32:16 -06:00
Sonatype 33bbd1b230 Update Repository Manager to 3.32.1-01. 2021-12-20 15:40:09 +00:00
Sonatype e41ef52287 Update Repository Manager to 3.37.1-01. 2021-12-17 20:10:37 +00:00
Michael Martz 9fc554cd10 Re-add Temp hack to release NXRM v3.37.0
This reverts commit 5c0fe9be34.
2021-12-17 14:08:36 -06:00
Michael Kearns 5c0fe9be34 Revert "Temp hack to release NXRM v3.37.0"
Ticket to look at more complete fix raised as NEXUS-29761
2021-11-24 15:02:59 +00:00
Sonatype f77c214078 Update Repository Manager to 3.37.0-01. 2021-11-24 14:05:13 +00:00
Michael Kearns dcb0b8d7aa Temp hack to release NXRM v3.37.0 2021-11-24 13:59:42 +00:00
Michael Martz 6082dd2ac2 Switch to the new chef install script url 2021-11-23 15:47:53 -06:00
Mykyta Shevelov 0f80f1933e Merge pull request #134 from sonatype/revert_hack
Revert "Temp hack to release NXRM v3.36.0"
2021-10-28 17:48:41 +03:00
Mykyta 76f741df52 Revert "Temp hack to release NXRM v3.36.0"
This reverts commit 9ec8289f88.
2021-10-28 17:47:42 +03:00
Mykyta Shevelov a9986bdbe7 Merge pull request #133 from sonatype/temp_hack_to_release_nxrm
Temp hack to release NXRM v3.36.0
2021-10-28 17:35:44 +03:00
Mykyta 9ec8289f88 Temp hack to release NXRM v3.36.0 2021-10-28 17:29:49 +03:00
Mykyta Shevelov 1691b814a1 Merge pull request #132 from sonatype/update_to_nxrm_3_36
Update Repository Manager to 3.36.0-01
2021-10-28 16:15:45 +03:00
Mykyta b55c551f59 Update to the NXRM v3.36.0 2021-10-28 15:33:23 +03:00
Sonatype 98155bb4a1 Update Repository Manager to 3.35.0-02. 2021-10-12 12:29:00 +00:00
Sonatype 9aee590470 Update Repository Manager to 3.34.1-01. 2021-09-22 18:08:27 +00:00
Sonatype 831dd53ffd Update Repository Manager to 3.34.0-01. 2021-08-31 16:22:30 +00:00
Sonatype 17f90824aa Update Repository Manager to 3.33.1-01. 2021-08-17 16:07:43 +00:00
John M Flinchbaugh 28735645d2 disable red hat trigger until the script is corrected (#131) 2021-08-06 13:47:24 -04:00
Sonatype fe705c790a Update Repository Manager to 3.33.0-01. 2021-08-04 15:50:51 +00:00
Sonatype 53a7c27b2a Update Repository Manager to 3.32.0-03. 2021-07-08 16:12:20 +00:00
Damian Bradicich d161f2ecab NEXUS-27617: Using new chef recipe that doesn't include java management (#129) 2021-06-28 17:17:01 -04:00
Sonatype 9667680421 Update Repository Manager to 3.31.1-01. 2021-06-23 08:35:40 +00:00
Sonatype 8092a53b72 Update Repository Manager to 3.31.0-01. 2021-06-17 00:15:00 +00:00
Sonatype 44074ee10d Update Repository Manager to 3.30.1-01. 2021-04-22 14:53:49 +00:00
Rich Seddon ca76aaab44 Update README.md
Updated INSTALL4J_ADD_VM_PARAMS example memory settings to be in line with our recommendations, also put in a link to our memory requirements docs.
2021-03-05 10:20:31 -06:00
Sonatype d60cc5a1ea Update Repository Manager to 3.30.0-01. 2021-03-04 15:27:49 +00:00
Michael Martz 68c19f3ddd NEXUS-26402 Add sencha license disclaimer 2021-01-20 09:27:52 -06:00
Michael Martz 13cd58d892 NEXUS-26402 Add sencha license disclaimer 2021-01-19 16:01:38 -06:00
Sonatype 0f56dcf3dc Update Repository Manager to 3.29.2-02. 2021-01-07 12:33:55 +00:00
Brad Beck b5bc42cc35 [NEXUS-26281] docker push —all-tags (#127) 2021-01-05 10:37:29 -06:00
Sonatype be062b3420 Update Repository Manager to 3.29.1-01. 2020-12-24 19:40:01 +00:00
Shane Stecker 6177fcb57f OPS-4602 Update SECURITY.md (#126) 2020-12-16 15:44:51 +00:00
John M Flinchbaugh bef313ce05 Use jenkins shared (#125)
* use jenkins shared lib
2020-12-07 15:51:44 -05:00
Sonatype f7f7d41d02 Update Repository Manager to 3.29.0-02. 2020-12-04 16:23:12 +00:00
Sonatype 256becffb0 Update Repository Manager to 3.28.1-01. 2020-10-19 15:09:58 +00:00
Sonatype e0704ddc09 Update Repository Manager to 3.28.0-01. 2020-10-01 20:31:47 +00:00
Sonatype b2a9af6d44 Update Repository Manager to 3.27.0-03. 2020-09-03 16:03:56 +00:00
Sonatype 7448eb6b94 Update Repository Manager to 3.26.1-02. 2020-08-12 21:22:11 +00:00
Sonatype 6db0c0fef9 Update Repository Manager to 3.26.0-04. 2020-08-10 18:30:25 +00:00
Sonatype c76a16fe38 Update Repository Manager to 3.25.1-04. 2020-07-30 15:45:41 +00:00
Sonatype 771ffca733 Update Repository Manager to 3.25.1-02. 2020-07-29 18:19:43 +00:00
Sonatype 2a11a942ea Update Repository Manager to 3.25.0-03. 2020-07-13 18:36:29 +00:00
Sonatype 4c07c9c7cb Update Repository Manager to 3.24.1-01. 2020-06-11 16:30:22 +00:00
Sonatype 1f2c2c1c71 Update Repository Manager to 3.24.0-02. 2020-06-08 14:29:00 +00:00
Rich Seddon 073ebe2abb Added instructions for stopping
The default timeout for docker stop is too low, added note that more time is needed to ensure a clean shutdown.
2020-06-01 17:24:30 -05:00
Stuart McCulloch 038814766e Update heap defaults to match https://help.sonatype.com/repomanager3/installation/system-requirements#SystemRequirements-ExampleMaximumMemoryConfigurations (#122) 2020-05-21 22:56:25 +01:00
Sonatype 2b5432909c Update Repository Manager to 3.23.0-03. 2020-05-05 13:46:11 +00:00
John M Flinchbaugh b78891de50 INT-2562 resilience for red hat trigger (#119)
* INT-2562 retry while watching for build to finish
* INT-2562 allow skipping red hat
   for days when the service is really busted
2020-05-01 13:11:11 -04:00
John M Flinchbaugh 031802f651 cloud-ops email -> support (#118)
cloud-ops email didn't really exist.
2020-04-27 18:20:41 -04:00
Sonatype 5d77b34f8e Update Repository Manager to 3.22.1-02. 2020-04-16 15:08:58 +00:00
Joseph Cava e8207fcb25 Pull in PR #113 update labels - INT (#117)
* Update metadata for Dockerfile label - INT (#113)

* Update Repository Manager to 3.22.0-02. Update Repository Manager Cookbook to release-0.5.20190212-155606.d1afdfe.

Co-authored-by: Kevin Chung <kevin.chung@redhat.com>
Co-authored-by: Sonatype <sonatype-ci@sonatype.com>
2020-04-08 16:18:21 -07:00
8 changed files with 188 additions and 51 deletions
+31 -9
View File
@@ -14,14 +14,31 @@
FROM registry.access.redhat.com/ubi8/ubi
LABEL vendor=Sonatype \
maintainer="Sonatype <cloud-ops@sonatype.com>" \
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <support@sonatype.com>" \
vendor=Sonatype \
version="3.37.2-02" \
release="3.37.2" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
description="The Nexus Repository Manager server \
with universal support for popular component formats." \
run="docker run -d --name NAME \
-p 8081:8081 \
IMAGE" \
stop="docker stop NAME" \
com.sonatype.license="Apache License, Version 2.0" \
com.sonatype.name="Nexus Repository Manager base image"
com.sonatype.name="Nexus Repository Manager base image" \
io.k8s.description="The Nexus Repository Manager server \
with universal support for popular component formats." \
io.k8s.display-name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"
ARG NEXUS_VERSION=3.22.0-02
ARG NEXUS_VERSION=3.37.2-02
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=9fef4ee8d7423cd73d2bf3576acc22f8d1b76c9b0ff733e2d36f00b59f1b8388
ARG NEXUS_DOWNLOAD_SHA256_HASH=b6d1758eddff2790cda363c0e46463d21d2d4b7932aa523094848bf4d71ff293
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -29,9 +46,9 @@ ENV NEXUS_HOME=${SONATYPE_DIR}/nexus \
NEXUS_DATA=/nexus-data \
NEXUS_CONTEXT='' \
SONATYPE_WORK=${SONATYPE_DIR}/sonatype-work \
DOCKER_TYPE='rh-docker'
DOCKER_TYPE='3x-docker'
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20190212-155606.d1afdfe"
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20210628-162332.70a6cb6"
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL="https://github.com/sonatype/chef-nexus-repository-manager/releases/download/${NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION}/chef-nexus-repository-manager.tar.gz"
ADD solo.json.erb /var/chef/solo.json.erb
@@ -39,7 +56,7 @@ ADD solo.json.erb /var/chef/solo.json.erb
# Install using chef-solo
# Chef version locked to avoid needing to accept the EULA on behalf of whomever builds the image
RUN yum install -y --disableplugin=subscription-manager hostname procps \
&& curl -L https://www.getchef.com/chef/install.sh | bash -s -- -v 14.12.9 \
&& curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v 14.12.9 \
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
&& chef-solo \
--recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \
@@ -50,12 +67,17 @@ RUN yum install -y --disableplugin=subscription-manager hostname procps \
&& rm -rf /var/cache/yum \
&& rm -rf /var/chef \
&& yum clean all
# download and install openjdk 8
RUN curl -O https://vault.centos.org/8.3.2011/AppStream/x86_64/os/Packages/java-1.8.0-openjdk-headless-1.8.0.282.b08-2.el8_3.x86_64.rpm \
&& yum localinstall -y --disableplugin=subscription-manager java-1.8.0-openjdk-headless-1.8.0.282.b08-2.el8_3.x86_64.rpm \
&& rm -rf java-1.8.0-openjdk-headless-1.8.0.282.b08-2.el8_3.x86_64.rpm
VOLUME ${NEXUS_DATA}
EXPOSE 8081
USER nexus
ENV INSTALL4J_ADD_VM_PARAMS="-Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=2g -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
ENV INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
CMD ["sh", "-c", "${SONATYPE_DIR}/start-nexus-repository-manager.sh"]
+7 -8
View File
@@ -14,12 +14,11 @@
FROM centos:centos7
MAINTAINER Sonatype <cloud-ops@sonatype.com>
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <support@sonatype.com>" \
vendor=Sonatype \
version="3.22.0-02" \
release="3.22.0" \
version="3.37.2-02" \
release="3.37.2" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
@@ -37,9 +36,9 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"
ARG NEXUS_VERSION=3.22.0-02
ARG NEXUS_VERSION=3.37.2-02
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=9fef4ee8d7423cd73d2bf3576acc22f8d1b76c9b0ff733e2d36f00b59f1b8388
ARG NEXUS_DOWNLOAD_SHA256_HASH=b6d1758eddff2790cda363c0e46463d21d2d4b7932aa523094848bf4d71ff293
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -55,7 +54,7 @@ ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL="https://github.com/sonatype/chef-nexu
ADD solo.json.erb /var/chef/solo.json.erb
# Install using chef-solo
RUN curl -L https://www.getchef.com/chef/install.sh | bash \
RUN curl -L https://omnitruck.chef.io/install.sh | bash \
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
&& chef-solo \
--node_name nexus_repository_red_hat_docker_build \
@@ -73,7 +72,7 @@ VOLUME ${NEXUS_DATA}
EXPOSE 8081
USER nexus
ENV INSTALL4J_ADD_VM_PARAMS="-Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=2g -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
ENV INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
ENTRYPOINT ["/uid_entrypoint.sh"]
CMD ["sh", "-c", "${SONATYPE_DIR}/start-nexus-repository-manager.sh"]
+7 -8
View File
@@ -14,12 +14,11 @@
FROM registry.access.redhat.com/rhel7/rhel
MAINTAINER Sonatype <cloud-ops@sonatype.com>
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <support@sonatype.com>" \
vendor=Sonatype \
version="3.22.0-02" \
release="3.22.0" \
version="3.37.2-02" \
release="3.37.2" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
@@ -37,9 +36,9 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"
ARG NEXUS_VERSION=3.22.0-02
ARG NEXUS_VERSION=3.37.2-02
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=9fef4ee8d7423cd73d2bf3576acc22f8d1b76c9b0ff733e2d36f00b59f1b8388
ARG NEXUS_DOWNLOAD_SHA256_HASH=b6d1758eddff2790cda363c0e46463d21d2d4b7932aa523094848bf4d71ff293
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -55,7 +54,7 @@ ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL="https://github.com/sonatype/chef-nexu
ADD solo.json.erb /var/chef/solo.json.erb
# Install using chef-solo
RUN curl -L https://www.getchef.com/chef/install.sh | bash \
RUN curl -L https://omnitruck.chef.io/install.sh | bash \
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
&& chef-solo \
--node_name nexus_repository_red_hat_docker_build \
@@ -73,7 +72,7 @@ VOLUME ${NEXUS_DATA}
EXPOSE 8081
USER nexus
ENV INSTALL4J_ADD_VM_PARAMS="-Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=2g -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
ENV INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
ENTRYPOINT ["/uid_entrypoint.sh"]
CMD ["sh", "-c", "${SONATYPE_DIR}/start-nexus-repository-manager.sh"]
+7 -7
View File
@@ -16,9 +16,9 @@ FROM registry.access.redhat.com/ubi8/ubi
LABEL name="Nexus Repository Manager" \
vendor=Sonatype \
maintainer="Sonatype <cloud-ops@sonatype.com>" \
version="3.22.0-02" \
release="3.22.0" \
maintainer="Sonatype <support@sonatype.com>" \
version="3.37.2-02" \
release="3.37.2" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
@@ -36,9 +36,9 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"
ARG NEXUS_VERSION=3.22.0-02
ARG NEXUS_VERSION=3.37.2-02
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=9fef4ee8d7423cd73d2bf3576acc22f8d1b76c9b0ff733e2d36f00b59f1b8388
ARG NEXUS_DOWNLOAD_SHA256_HASH=b6d1758eddff2790cda363c0e46463d21d2d4b7932aa523094848bf4d71ff293
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -55,7 +55,7 @@ ADD solo.json.erb /var/chef/solo.json.erb
# Install using chef-solo
# Chef version locked to avoid needing to accept the EULA on behalf of whomever builds the image
RUN curl -L https://www.getchef.com/chef/install.sh | bash -s -- -v 14.12.9 \
RUN curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v 14.12.9 \
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
&& chef-solo \
--node_name nexus_repository_red_hat_docker_build \
@@ -73,7 +73,7 @@ VOLUME ${NEXUS_DATA}
EXPOSE 8081
USER nexus
ENV INSTALL4J_ADD_VM_PARAMS="-Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=2g -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
ENV INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
ENTRYPOINT ["/uid_entrypoint.sh"]
CMD ["sh", "-c", "${SONATYPE_DIR}/start-nexus-repository-manager.sh"]
Vendored
+30 -11
View File
@@ -3,7 +3,7 @@
* Includes the third-party code listed at http://links.sonatype.com/products/nexus/attributions.
* "Sonatype" is a trademark of Sonatype, Inc.
*/
@Library('ci-pipeline-library') _
@Library(['private-pipeline-library', 'jenkins-shared']) _
import com.sonatype.jenkins.pipeline.GitHub
import com.sonatype.jenkins.pipeline.OsTools
@@ -14,6 +14,8 @@ properties([
string(defaultValue: '', description: 'New Nexus Repository Manager Cookbook Version', name: 'nexus_repository_manager_cookbook_version'),
booleanParam(defaultValue: false, description: 'Skip Pushing of Docker Image and Tags', name: 'skip_push'),
booleanParam(defaultValue: false, description: 'Force Red Hat Certified Build for a non-master branch', name: 'force_red_hat_build'),
booleanParam(defaultValue: false, description: 'Skip Red Hat Certified Build', name: 'skip_red_hat_build'),
booleanParam(defaultValue: false, description: 'Only update the latest tag', name: 'update_latest_only')
])
])
@@ -88,12 +90,12 @@ node('ubuntu-zion') {
gitHub.statusUpdate commitId, 'pending', 'test', 'Tests are running'
def gemInstallDirectory = getGemInstallDirectory()
withEnv(["PATH+GEMS=${gemInstallDirectory}/bin"]) {
/* withEnv(["PATH+GEMS=${gemInstallDirectory}/bin"]) {
OsTools.runSafe(this, "gem install --user-install rspec")
OsTools.runSafe(this, "gem install --user-install serverspec")
OsTools.runSafe(this, "gem install --user-install docker-api")
OsTools.runSafe(this, "IMAGE_ID=${imageId} rspec --backtrace spec/Dockerfile_spec.rb")
}
} */
if (currentBuild.result == 'FAILURE') {
gitHub.statusUpdate commitId, 'failure', 'test', 'Tests failed'
@@ -116,11 +118,14 @@ node('ubuntu-zion') {
params.nexus_repository_manager_cookbook_version ?
"Update Repository Manager Cookbook to ${params.nexus_repository_manager_cookbook_version}." : ""
].findAll({ it }).join(' ')
OsTools.runSafe(this, """
git add .
git commit -m '${commitMessage}'
git push https://${env.GITHUB_API_USERNAME}:${env.GITHUB_API_PASSWORD}@github.com/${organization}/${gitHubRepository}.git ${branch}
""")
if (!params.update_latest_only) {
OsTools.runSafe(this, """
git add .
git commit -m '${commitMessage}'
git push https://${env.GITHUB_API_USERNAME}:${env.GITHUB_API_PASSWORD}@github.com/${organization}/${gitHubRepository}.git ${branch}
""")
}
}
}
}
@@ -130,7 +135,7 @@ node('ubuntu-zion') {
archiveArtifacts artifacts: "${archiveName}.tar.gz", onlyIfSuccessful: true
}
}
if (branch == 'master' && ! params.skip_push) {
if (branch == 'master' && !params.skip_push && !params.update_latest_only) {
input 'Push image and tags?'
stage('Push image') {
def dockerhubApiToken
@@ -141,7 +146,7 @@ node('ubuntu-zion') {
OsTools.runSafe(this, """
docker login --username ${env.DOCKERHUB_API_USERNAME} --password ${env.DOCKERHUB_API_PASSWORD}
""")
OsTools.runSafe(this, "docker push ${organization}/${dockerHubRepository}")
OsTools.runSafe(this, "docker push --all-tags ${organization}/${dockerHubRepository}")
response = OsTools.runSafe(this, """
curl -X POST https://hub.docker.com/v2/users/login/ \
@@ -174,7 +179,20 @@ node('ubuntu-zion') {
OsTools.runSafe(this, "git tag -d ${version}")
}
}
if (branch == 'master' || params.force_red_hat_build) {
else if(params.update_latest_only) {
stage('Push tags') {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'docker-hub-credentials',
usernameVariable: 'DOCKERHUB_API_USERNAME', passwordVariable: 'DOCKERHUB_API_PASSWORD']]) {
OsTools.runSafe(this, "docker tag ${imageId} ${organization}/${dockerHubRepository}:latest")
OsTools.runSafe(this, """
docker login --username ${env.DOCKERHUB_API_USERNAME} --password ${env.DOCKERHUB_API_PASSWORD}
""")
OsTools.runSafe(this, "docker push --all-tags ${organization}/${dockerHubRepository}")
}
}
}
/*
if ((! params.skip_red_hat_build) && (branch == 'master' || params.force_red_hat_build)) {
stage('Trigger Red Hat Certified Image Build') {
withCredentials([
string(credentialsId: 'docker-nexus3-rh-build-project-id', variable: 'PROJECT_ID'),
@@ -184,6 +202,7 @@ node('ubuntu-zion') {
}
}
}
*/
} finally {
OsTools.runSafe(this, "docker logout")
OsTools.runSafe(this, "docker system prune -a -f")
+15 -2
View File
@@ -45,6 +45,13 @@ To run, binding the exposed port 8081 to the host, use:
$ docker run -d -p 8081:8081 --name nexus sonatype/nexus3
```
When stopping, be sure to allow sufficient time for the databases to fully shut down.
```
docker stop --time=120 <CONTAINER_NAME>
```
To test:
```
@@ -116,16 +123,18 @@ process, which runs as UID 200.
* There is an environment variable that is being used to pass JVM arguments to the startup script
* `INSTALL4J_ADD_VM_PARAMS`, passed to the Install4J startup script. Defaults to `-Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=2g -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs`.
* `INSTALL4J_ADD_VM_PARAMS`, passed to the Install4J startup script. Defaults to `-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs`.
This can be adjusted at runtime:
```
$ docker run -d -p 8081:8081 --name nexus -e INSTALL4J_ADD_VM_PARAMS="-Xms2g -Xmx2g -XX:MaxDirectMemorySize=3g -Djava.util.prefs.userRoot=/some-other-dir" sonatype/nexus3
$ docker run -d -p 8081:8081 --name nexus -e INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=/some-other-dir" sonatype/nexus3
```
Of particular note, `-Djava.util.prefs.userRoot=/some-other-dir` can be set to a persistent path, which will maintain
the installed Nexus Repository License if the container is restarted.
Be sure to check the [memory requirements](https://help.sonatype.com/display/NXRM3/System+Requirements#SystemRequirements-MemoryRequirements) when deciding how much heap and direct memory to allocate.
* Another environment variable can be used to control the Nexus Context Path
@@ -169,3 +178,7 @@ Looking to contribute to our Docker image but need some help? There's a few ways
* File an issue [on our public JIRA](https://issues.sonatype.org/projects/NEXUS/)
* Check out the [Nexus3](http://stackoverflow.com/questions/tagged/nexus3) tag on Stack Overflow
* Check out the [Nexus Repository User List](https://groups.google.com/a/glists.sonatype.com/forum/?hl=en#!forum/nexus-users)
## License Disclaimer
_Nexus Repository OSS is distributed with Sencha Ext JS pursuant to a FLOSS Exception agreed upon between Sonatype, Inc. and Sencha Inc. Sencha Ext JS is licensed under GPL v3 and cannot be redistributed as part of a closed source work._
+79
View File
@@ -0,0 +1,79 @@
<!--
Copyright (c) 2011-present Sonatype, Inc. All rights reserved.
Includes the third-party code listed at http://links.sonatype.com/products/clm/attributions.
"Sonatype" is a trademark of Sonatype, Inc.
-->
# Reporting Security Vulnerabilities
## When to report
First check
[Important advisories of known security vulnerabilities in Sonatype products](https://support.sonatype.com/hc/en-us/sections/203012668-Security-Advisories)
to see if this has been previously reported.
## How to report
Please email reports regarding security related issues you find to [mailto:security@sonatype.com](security@sonatype.com).
Use our public key below to keep your message safe.
## What to include
Please use a descriptive subject line in your email report.
Your name and/or affiliation.
A detailed technical description of the vulnerability, attack scenario and where
possible, how we can reproduce your findings.
Provide us with a secure way to respond.
## What to expect
Your email will be acknowledged within 1 - 2 business days, and you'll receive a
more detailed response to your email within 7 business days.
We ask that everyone please follow responsible disclosure practices and allow
time for us to release a fix prior to public release.
Once an issue is reported, Sonatype uses the following disclosure process:
When a report is received, we confirm the issue and determine its severity.
If third-party services or software require mitigation before publication, those
projects will be notified.
## Our public key
```console
-----BEGIN PUBLIC KEY BLOCK-----
mQENBFF+a9ABCADQWSAAU7w9i71Zn3TQ6k7lT9x57cRdtX7V709oeN/c/1it+gCw
onmmCyf4ypor6XcPSOasp/x0s3hVuf6YfMbI0tSwJUWWihrmoPGIXtmiSOotQE0Q
Sav41xs3YyI9LzQB4ngZR/nhp4YhioD1dVorD6LGXk08rvl2ikoqHwTagbEXZJY7
3VYhW6JHbZTLwCsfyg6uaSYF1qXfUxHPOiHYKNbhK/tM3giX+9ld/7xi+9f4zEFQ
eX9wcRTdgdDOAqDOK7MV30KXagSqvW0MgEYtKX6q4KjjRzBYjkiTdFW/yMXub/Bs
5UckxHTCuAmvpr5J0HIUeLtXi1QCkijyn8HJABEBAAG0KVNvbmF0eXBlIFNlY3Vy
aXR5IDxzZWN1cml0eUBzb25hdHlwZS5jb20+iQE4BBMBAgAiBQJRfmvQAhsDBgsJ
CAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRAgkmxsNtgwfUzbCACLtCgieq1kJOqo
2i136ND5ZOj31zIzNENLn8dhSg5zQwTHOcntWAtS8uCNq4fSlslwvlbPYWTLD7fE
iJn1z7BCU8gBk+pkAJJFWEPweMVt+9bYQ4HfKceGbJeuwBBhS34SK9ZIp9gfxxfA
oTm0aGYwKR5wH3sqL/mrhwKhPt9wXR4qwlE635STEX8wzJ5SBqf3ArJUtCp1rzgR
Dx+DiZed5HE1pOI2Kyb6O80bm485WThPXxpvp3bfzTNYoGzeLi/F7WkmgggkXxsT
Pyd0sSx0B/MO4lJtQvEBlIHDFno9mXa30fKl+rzp2geG5UxNHJUjaC5JhfWLEXEX
wV0ErBsmuQENBFF+a9ABCADXj04+GLIz8VCaZH554nUHEhaKoiIXH3Tj7UiMZDqy
o4WIw2RFaCQNA8T0R5Q0yxINU146JQMbA2SN59AGcGYZcajyEvTR7tLG0meMO6S0
JWpkX7s3xaC0s+5SJ/ba00oHGzW0aotgzG9BWA5OniNHK7zZKMVu7M80M/wB1RvK
x775hAeJ+8F9MDJ+ijydBtaOfDdkbg+0kU1xR6Io+vVLPk38ghlWU8QFP4/B0oWi
jK4xiDqK6cG7kyH9kC9nau+ckH8MrJ/RzEpsc4GRwqS4IEnvHWe7XbgydWS1bCp6
8uP5ma3d02elQmSEa+PABIPKnZcAf1YKLr9O/+IzEdOhABEBAAGJAR8EGAECAAkF
AlF+a9ACGwwACgkQIJJsbDbYMH3WzAf/XOm4YQZFOgG2h9d03m8me8d1vrYico+0
pBYU9iCozLgamM4er9Efb+XzfLvNVKuqyR0cgvGszukIPQYeX58DMrZ07C+E0wDZ
bG+ZAYXT5GqsHkSVnMCVIfyJNLjR4sbVzykyVtnccBL6bP3jxbCP1jJdT7bwiKre
1jQjvyoL0yIegdiN/oEdmx52Fqjt4NkQsp4sk625UBFTVISr22bnf60ZIGgrRbAP
DU1XMdIrmqmhEEQcXMp4CeflDMksOmaIeAUkZY7eddnXMwQDJTnz5ziCal+1r0R3
dh0XISRG0NkiLEXeGkrs7Sn7BAAsTsaH/1zU6YbvoWlMlHYT6EarFQ== =sFGt
-----END PUBLIC KEY BLOCK-----
```
+12 -6
View File
@@ -14,7 +14,8 @@ import groovyx.net.http.HttpBuilder
import groovyx.net.http.HttpException
if (args.size() < 3) {
fail('Usage: groovy TriggerRedhatBuild.groovy <version> <projectId> <apiKey>')
System.err.println('Usage: groovy TriggerRedhatBuild.groovy <version> <projectId> <apiKey>')
System.exit(1)
}
new BuildClient(*args).run()
@@ -145,12 +146,17 @@ class BuildClient {
println 'Waiting for build to finish.'
sleep 60000
final completedBuild = getTags().find {
it.name == nextTag && it.scan_status == 'passed'
}
try {
final completedBuild = getTags().find {
it.name == nextTag && it.scan_status == 'passed'
}
if (completedBuild) {
return completedBuild
if (completedBuild) {
return completedBuild
}
} catch (HttpException ex) {
ex.printStackTrace()
System.err.println "Failed retrieving completed builds, but still trying: ${ex.statusCode} [${ex.body}]"
}
}