Compare commits

..

7 Commits

Author SHA1 Message Date
CMYanko 26ee0f7d34 moved n some rhel specific stuff 2019-02-26 16:35:35 -05:00
CMYanko b5f028837a Update to new UBI images from Red HAt 2019-02-26 11:51:01 -05:00
bigspotteddog c770722970 Use openjdk. 2019-02-12 17:49:11 -08:00
Sonatype c75f2c4c2a Update Repository Manager to 3.15.2-01. Update Repository Manager Cookbook to release-0.5.20190212-155606.d1afdfe. 2019-02-13 01:21:48 +00:00
Sonatype 318f53548b Update Repository Manager to 3.15.2-01. 2019-01-29 12:52:08 +00:00
Dawid Sawa 7f8dca3509 Switchover to OpenJDK (#105) 2019-01-28 11:46:03 +00:00
Sonatype cad92467b0 Update Repository Manager to 3.15.1-01. Update Oracle JRE to 8u202-b08. 2019-01-18 05:39:05 +00:00
6 changed files with 24 additions and 72 deletions
+1
View File
@@ -28,6 +28,7 @@ Sonatype internal people:
* [@jeviolle](https://github.com/jeviolle/) (Rick Briganti/The Money)
* [@jswank](https://github.com/jswank/) (Jason Swank)
* [@DarthHater](https://github.com/darthhater/) (Jeffry Hesse)
* [@dawidsawa](https://github.com/dawidsawa/) (Dawid Sawa)
External contributors:
+7 -10
View File
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM centos:centos7
FROM registry.access.redhat.com/ubi7/ubi
MAINTAINER Sonatype <cloud-ops@sonatype.com>
@@ -20,14 +20,9 @@ LABEL vendor=Sonatype \
com.sonatype.license="Apache License, Version 2.0" \
com.sonatype.name="Nexus Repository Manager base image"
ARG NEXUS_VERSION=3.15.0-01
ARG NEXUS_VERSION=3.15.2-01
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=7bee286f980eb485738110480daf14915c5eeeee3c805904b4814a2669fb712a
ARG JAVA_URL=http://download.oracle.com/otn-pub/java/jdk/8u192-b12/750e1c8617c5452694857ad95c3ee230/server-jre-8u192-linux-x64.tar.gz
ARG JAVA_DOWNLOAD_SHA256_HASH=3d811a5ec65dc6fc261f488757bae86ecfe285a79992363b016f60cdb4dbe7e6
ENV JAVA_HOME=/opt/java
ARG NEXUS_DOWNLOAD_SHA256_HASH=acde357f5bbc6100eb0d5a4c60a1673d5f1f785e71a36cfa308b8dfa45cf25d0
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -35,9 +30,9 @@ ENV NEXUS_HOME=${SONATYPE_DIR}/nexus \
NEXUS_DATA=/nexus-data \
NEXUS_CONTEXT='' \
SONATYPE_WORK=${SONATYPE_DIR}/sonatype-work \
DOCKER_TYPE='docker'
DOCKER_TYPE='rh-docker'
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20180828-231916.863899c"
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20190212-155606.d1afdfe"
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
@@ -46,6 +41,7 @@ ADD solo.json.erb /var/chef/solo.json.erb
RUN curl -L https://www.getchef.com/chef/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 \
--recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \
--json-attributes /var/chef/solo.json \
&& rpm -qa *chef* | xargs rpm -e \
@@ -62,4 +58,5 @@ USER nexus
ENV INSTALL4J_ADD_VM_PARAMS="-Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=2g -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
ENTRYPOINT ["/uid_entrypoint.sh"]
CMD ["sh", "-c", "${SONATYPE_DIR}/start-nexus-repository-manager.sh"]
+6 -11
View File
@@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM centos:centos7
FROM registry.access.redhat.com/ubi7/ubi
MAINTAINER Sonatype <cloud-ops@sonatype.com>
LABEL name="Nexus Repository Manager" \
vendor=Sonatype \
version="3.15.0-01" \
release="3.15.0" \
version="3.15.2-01" \
release="3.15.2" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
@@ -37,14 +37,9 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"
ARG NEXUS_VERSION=3.15.0-01
ARG NEXUS_VERSION=3.15.2-01
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=7bee286f980eb485738110480daf14915c5eeeee3c805904b4814a2669fb712a
ARG JAVA_URL=http://download.oracle.com/otn-pub/java/jdk/8u192-b12/750e1c8617c5452694857ad95c3ee230/server-jre-8u192-linux-x64.tar.gz
ARG JAVA_DOWNLOAD_SHA256_HASH=3d811a5ec65dc6fc261f488757bae86ecfe285a79992363b016f60cdb4dbe7e6
ENV JAVA_HOME=/opt/java
ARG NEXUS_DOWNLOAD_SHA256_HASH=acde357f5bbc6100eb0d5a4c60a1673d5f1f785e71a36cfa308b8dfa45cf25d0
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -54,7 +49,7 @@ ENV NEXUS_HOME=${SONATYPE_DIR}/nexus \
SONATYPE_WORK=${SONATYPE_DIR}/sonatype-work \
DOCKER_TYPE='rh-docker'
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20180828-231916.863899c"
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20190212-155606.d1afdfe"
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
+6 -11
View File
@@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM registry.access.redhat.com/rhel7/rhel
FROM registry.access.redhat.com/ubi7/ubi
MAINTAINER Sonatype <cloud-ops@sonatype.com>
LABEL name="Nexus Repository Manager" \
vendor=Sonatype \
version="3.15.0-01" \
release="3.15.0" \
version="3.15.2-01" \
release="3.15.2" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
@@ -37,14 +37,9 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"
ARG NEXUS_VERSION=3.15.0-01
ARG NEXUS_VERSION=3.15.2-01
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=7bee286f980eb485738110480daf14915c5eeeee3c805904b4814a2669fb712a
ARG JAVA_URL=http://download.oracle.com/otn-pub/java/jdk/8u192-b12/750e1c8617c5452694857ad95c3ee230/server-jre-8u192-linux-x64.tar.gz
ARG JAVA_DOWNLOAD_SHA256_HASH=3d811a5ec65dc6fc261f488757bae86ecfe285a79992363b016f60cdb4dbe7e6
ENV JAVA_HOME=/opt/java
ARG NEXUS_DOWNLOAD_SHA256_HASH=acde357f5bbc6100eb0d5a4c60a1673d5f1f785e71a36cfa308b8dfa45cf25d0
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -54,7 +49,7 @@ ENV NEXUS_HOME=${SONATYPE_DIR}/nexus \
SONATYPE_WORK=${SONATYPE_DIR}/sonatype-work \
DOCKER_TYPE='rh-docker'
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20180828-231916.863899c"
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20190212-155606.d1afdfe"
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
Vendored
+2 -26
View File
@@ -13,9 +13,6 @@ properties([
string(defaultValue: '', description: 'New Nexus Repository Manager Version Sha256', name: 'nexus_repository_manager_version_sha'),
string(defaultValue: '', description: 'New Nexus Repository Manager Cookbook Version', name: 'nexus_repository_manager_cookbook_version'),
string(defaultValue: '', description: 'New JRE Url', name: 'oracle_jre_url'),
string(defaultValue: '', description: 'New JRE Sha256', name: 'oracle_jre_sha')
])
])
@@ -71,12 +68,6 @@ node('ubuntu-zion') {
dockerFileLocations.each { updateRepositoryCookbookVersion(it) }
}
}
if (params.oracle_jre_url && params.oracle_jre_sha) {
stage('Update JRE Url') {
OsTools.runSafe(this, "git checkout ${branch}")
dockerFileLocations.each { updateJreUrl(it) }
}
}
}
stage('Build') {
gitHub.statusUpdate commitId, 'pending', 'build', 'Build is running'
@@ -113,8 +104,7 @@ node('ubuntu-zion') {
return
}
if (params.nexus_repository_manager_version && params.nexus_repository_manager_version_sha
|| params.nexus_repository_manager_cookbook_version
|| params.oracle_jre_url && params.oracle_jre_sha) {
|| params.nexus_repository_manager_cookbook_version) {
stage('Commit Automated Code Update') {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'integrations-github-api',
usernameVariable: 'GITHUB_API_USERNAME', passwordVariable: 'GITHUB_API_PASSWORD']]) {
@@ -122,9 +112,7 @@ node('ubuntu-zion') {
params.nexus_repository_manager_version && params.nexus_repository_manager_version_sha ?
"Update Repository Manager to ${params.nexus_repository_manager_version}." : "",
params.nexus_repository_manager_cookbook_version ?
"Update Repository Manager Cookbook to ${params.nexus_repository_manager_cookbook_version}." : "",
params.oracle_jre_url && params.oracle_jre_sha ?
"Update Oracle JRE to ${(params.oracle_jre_url =~ /(\du\d{3}\-b\d{2})/)[0][0]}." : ""
"Update Repository Manager Cookbook to ${params.nexus_repository_manager_cookbook_version}." : ""
].findAll({ it }).join(' ')
OsTools.runSafe(this, """
git add .
@@ -243,15 +231,3 @@ def updateRepositoryCookbookVersion(dockerFileLocation) {
writeFile(file: dockerFileLocation, text: dockerFile)
}
def updateJreUrl(dockerFileLocation) {
def dockerFile = readFile(file: dockerFileLocation)
def jreUrlRegex = /(ARG JAVA_URL=)(http.*-linux-x64\.tar\.gz)/
def jreShaRegex = /(JAVA_DOWNLOAD_SHA256_HASH=)([A-Fa-f0-9]{64})/
dockerFile = dockerFile.replaceAll(jreUrlRegex, "\$1${params.oracle_jre_url}")
dockerFile = dockerFile.replaceAll(jreShaRegex, "\$1${params.oracle_jre_sha}")
writeFile(file: dockerFileLocation, text: dockerFile)
}
+2 -14
View File
@@ -23,20 +23,8 @@ raise RuntimeError, 'environment variable NEXUS_DATA is required' if ENV['NEXUS_
{
:run_list => [ "recipe[nexus_repository_manager::#{ENV['DOCKER_TYPE']}]" ],
:java => {
:jdk_version => ENV['JAVA_VERSION_MAJOR'],
:java_home => ENV['JAVA_HOME'],
:install_flavor => 'oracle',
:oracle => {
:accept_oracle_download_terms => true
},
:jdk => {
:'8' => {
:x86_64 => {
:url => ENV['JAVA_URL'],
:checksum => ENV['JAVA_DOWNLOAD_SHA256_HASH']
}
}
}
:install_flavor => 'openjdk',
:accept_license_agreement => true
},
:nexus_repository_manager => {
:version => ENV['NEXUS_VERSION'],