Compare commits

...

19 Commits

Author SHA1 Message Date
Sonatype a42cdc11d0 Update Repository Manager to 3.37.3-02. 2021-12-29 20:08:57 +00:00
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
5 changed files with 44 additions and 28 deletions
+5 -5
View File
@@ -17,8 +17,8 @@ FROM registry.access.redhat.com/ubi8/ubi
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <support@sonatype.com>" \
vendor=Sonatype \
version="3.35.0-02" \
release="3.35.0" \
version="3.37.3-02" \
release="3.37.3" \
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.35.0-02
ARG NEXUS_VERSION=3.37.3-02
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=a158c3661e290bd4eec781ff9c9b4359f8542b2ce34ef57cc4a6a8c5b8b76656
ARG NEXUS_DOWNLOAD_SHA256_HASH=c1db431908c5a76b44015c555d6ef4517abf0a86844faffee0f5d6c62359312d
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -56,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} \
+5 -5
View File
@@ -17,8 +17,8 @@ FROM centos:centos7
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <support@sonatype.com>" \
vendor=Sonatype \
version="3.35.0-02" \
release="3.35.0" \
version="3.37.3-02" \
release="3.37.3" \
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.35.0-02
ARG NEXUS_VERSION=3.37.3-02
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=a158c3661e290bd4eec781ff9c9b4359f8542b2ce34ef57cc4a6a8c5b8b76656
ARG NEXUS_DOWNLOAD_SHA256_HASH=c1db431908c5a76b44015c555d6ef4517abf0a86844faffee0f5d6c62359312d
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -54,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 \
+5 -5
View File
@@ -17,8 +17,8 @@ FROM registry.access.redhat.com/rhel7/rhel
LABEL name="Nexus Repository Manager" \
maintainer="Sonatype <support@sonatype.com>" \
vendor=Sonatype \
version="3.35.0-02" \
release="3.35.0" \
version="3.37.3-02" \
release="3.37.3" \
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.35.0-02
ARG NEXUS_VERSION=3.37.3-02
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=a158c3661e290bd4eec781ff9c9b4359f8542b2ce34ef57cc4a6a8c5b8b76656
ARG NEXUS_DOWNLOAD_SHA256_HASH=c1db431908c5a76b44015c555d6ef4517abf0a86844faffee0f5d6c62359312d
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -54,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 \
+5 -5
View File
@@ -17,8 +17,8 @@ FROM registry.access.redhat.com/ubi8/ubi
LABEL name="Nexus Repository Manager" \
vendor=Sonatype \
maintainer="Sonatype <support@sonatype.com>" \
version="3.35.0-02" \
release="3.35.0" \
version="3.37.3-02" \
release="3.37.3" \
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.35.0-02
ARG NEXUS_VERSION=3.37.3-02
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=a158c3661e290bd4eec781ff9c9b4359f8542b2ce34ef57cc4a6a8c5b8b76656
ARG NEXUS_DOWNLOAD_SHA256_HASH=c1db431908c5a76b44015c555d6ef4517abf0a86844faffee0f5d6c62359312d
# 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 \
Vendored
+24 -8
View File
@@ -15,6 +15,7 @@ properties([
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')
])
])
@@ -89,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'
@@ -117,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}
""")
}
}
}
}
@@ -131,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
@@ -175,6 +179,18 @@ node('ubuntu-zion') {
OsTools.runSafe(this, "git tag -d ${version}")
}
}
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') {