nexus-3.61 #5
15
.drone.yml
15
.drone.yml
@@ -38,6 +38,21 @@ steps:
|
||||
auto_tag: true
|
||||
insecure: true
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
|
||||
- name: send build notification
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token:
|
||||
from_secret: TELE_TOKEN
|
||||
to:
|
||||
from_secret : TELE_GID
|
||||
message: "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{/success}}\n\n timecost: {{since build.started}}\n"
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
@@ -17,8 +17,8 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
|
||||
LABEL name="Nexus Repository Manager" \
|
||||
maintainer="Sonatype <support@sonatype.com>" \
|
||||
vendor=Sonatype \
|
||||
version="3.54.1-01" \
|
||||
release="3.54.1" \
|
||||
version="3.61.0-02" \
|
||||
release="3.61.0" \
|
||||
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.54.1-01
|
||||
ARG NEXUS_VERSION=3.61.0-02
|
||||
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=7bd5343b43f87d9da9bd7f20921b2fd1aeaed28ca91770d08ca1ac58f87808ca
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=885e0ec08a7e22db9fc5fc926fb7b7594439070826b22f555bc21a669a7bbcbf
|
||||
|
||||
# configure nexus runtime
|
||||
ENV SONATYPE_DIR=/opt/sonatype
|
||||
|
||||
@@ -17,8 +17,8 @@ FROM centos:centos7
|
||||
LABEL name="Nexus Repository Manager" \
|
||||
maintainer="Sonatype <support@sonatype.com>" \
|
||||
vendor=Sonatype \
|
||||
version="3.54.1-01" \
|
||||
release="3.54.1" \
|
||||
version="3.61.0-02" \
|
||||
release="3.61.0" \
|
||||
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.54.1-01
|
||||
ARG NEXUS_VERSION=3.61.0-02
|
||||
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=7bd5343b43f87d9da9bd7f20921b2fd1aeaed28ca91770d08ca1ac58f87808ca
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=885e0ec08a7e22db9fc5fc926fb7b7594439070826b22f555bc21a669a7bbcbf
|
||||
|
||||
# configure nexus runtime
|
||||
ENV SONATYPE_DIR=/opt/sonatype
|
||||
|
||||
@@ -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.54.1-01" \
|
||||
release="3.54.1" \
|
||||
version="3.61.0-02" \
|
||||
release="3.61.0" \
|
||||
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.54.1-01
|
||||
ARG NEXUS_VERSION=3.61.0-02
|
||||
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=7bd5343b43f87d9da9bd7f20921b2fd1aeaed28ca91770d08ca1ac58f87808ca
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=885e0ec08a7e22db9fc5fc926fb7b7594439070826b22f555bc21a669a7bbcbf
|
||||
|
||||
# configure nexus runtime
|
||||
ENV SONATYPE_DIR=/opt/sonatype
|
||||
|
||||
@@ -17,8 +17,8 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
|
||||
LABEL name="Nexus Repository Manager" \
|
||||
vendor=Sonatype \
|
||||
maintainer="Sonatype <support@sonatype.com>" \
|
||||
version="3.54.1-01" \
|
||||
release="3.54.1" \
|
||||
version="3.61.0-02" \
|
||||
release="3.61.0" \
|
||||
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.54.1-01
|
||||
ARG NEXUS_VERSION=3.61.0-02
|
||||
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=7bd5343b43f87d9da9bd7f20921b2fd1aeaed28ca91770d08ca1ac58f87808ca
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=885e0ec08a7e22db9fc5fc926fb7b7594439070826b22f555bc21a669a7bbcbf
|
||||
|
||||
# configure nexus runtime
|
||||
ENV SONATYPE_DIR=/opt/sonatype
|
||||
|
||||
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
@@ -6,6 +6,7 @@
|
||||
@Library(['private-pipeline-library', 'jenkins-shared']) _
|
||||
import com.sonatype.jenkins.pipeline.GitHub
|
||||
import com.sonatype.jenkins.pipeline.OsTools
|
||||
import com.sonatype.jenkins.shared.Expectation
|
||||
|
||||
node('ubuntu-zion') {
|
||||
def commitId, commitDate, imageId, branch
|
||||
@@ -54,13 +55,12 @@ node('ubuntu-zion') {
|
||||
stage('Test') {
|
||||
gitHub.statusUpdate commitId, 'pending', 'test', 'Tests are running'
|
||||
|
||||
def gemInstallDirectory = getGemInstallDirectory()
|
||||
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")
|
||||
}
|
||||
validateExpectations([
|
||||
new Expectation('Has user nexus in group nexus present',
|
||||
'id', '-ng nexus', 'nexus'),
|
||||
new Expectation('Has nexus user java process present',
|
||||
'ps', '-e -o command,user | grep -q ^/usr/lib/jvm/java.*nexus$ | echo $?', '0')
|
||||
])
|
||||
|
||||
if (currentBuild.result == 'FAILURE') {
|
||||
gitHub.statusUpdate commitId, 'failure', 'test', 'Tests failed'
|
||||
@@ -96,13 +96,3 @@ node('ubuntu-zion') {
|
||||
OsTools.runSafe(this, 'git clean -f && git reset --hard origin/main')
|
||||
}
|
||||
}
|
||||
|
||||
def getGemInstallDirectory() {
|
||||
def content = OsTools.runSafe(this, 'gem env')
|
||||
for (line in content.split('\n')) {
|
||||
if (line.startsWith(' - USER INSTALLATION DIRECTORY: ')) {
|
||||
return line.substring(33)
|
||||
}
|
||||
}
|
||||
error 'Could not determine user gem install directory.'
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
@Library(['private-pipeline-library', 'jenkins-shared']) _
|
||||
import com.sonatype.jenkins.pipeline.GitHub
|
||||
import com.sonatype.jenkins.pipeline.OsTools
|
||||
import com.sonatype.jenkins.shared.Expectation
|
||||
|
||||
properties([
|
||||
parameters([
|
||||
@@ -17,7 +18,7 @@ properties([
|
||||
])
|
||||
])
|
||||
|
||||
node('ubuntu-zion-legacy') {
|
||||
node('ubuntu-zion') {
|
||||
def commitId, commitDate, version, imageId, branch, dockerFileLocations
|
||||
def organization = 'sonatype',
|
||||
gitHubRepository = 'docker-nexus3',
|
||||
@@ -87,13 +88,12 @@ node('ubuntu-zion-legacy') {
|
||||
stage('Test') {
|
||||
gitHub.statusUpdate commitId, 'pending', 'test', 'Tests are running'
|
||||
|
||||
def gemInstallDirectory = getGemInstallDirectory()
|
||||
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")
|
||||
}
|
||||
validateExpectations([
|
||||
new Expectation('Has user nexus in group nexus present',
|
||||
'id', '-ng nexus', 'nexus'),
|
||||
new Expectation('Has nexus user java process present',
|
||||
'ps', '-e -o command,user | grep -q ^/usr/lib/jvm/java.*nexus$ | echo $?', '0')
|
||||
])
|
||||
|
||||
if (currentBuild.result == 'FAILURE') {
|
||||
gitHub.statusUpdate commitId, 'failure', 'test', 'Tests failed'
|
||||
@@ -227,16 +227,6 @@ def getShortVersion(version) {
|
||||
return version.split('-')[0]
|
||||
}
|
||||
|
||||
def getGemInstallDirectory() {
|
||||
def content = OsTools.runSafe(this, "gem env")
|
||||
for (line in content.split('\n')) {
|
||||
if (line.startsWith(' - USER INSTALLATION DIRECTORY: ')) {
|
||||
return line.substring(33)
|
||||
}
|
||||
}
|
||||
error 'Could not determine user gem install directory.'
|
||||
}
|
||||
|
||||
def updateRepositoryManagerVersion(dockerFileLocation) {
|
||||
def dockerFile = readFile(file: dockerFileLocation)
|
||||
|
||||
|
||||
20
README.md
20
README.md
@@ -16,15 +16,15 @@
|
||||
|
||||
-->
|
||||
|
||||
# Sonatype Nexus3 Docker: sonatype/nexus3
|
||||
# Sonatype Nexus Repository Docker: sonatype/nexus3
|
||||
|
||||
[](https://gitter.im/sonatype/nexus-developers?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
A Dockerfile for Sonatype Nexus Repository Manager 3, starting with 3.18 the image is based on the [Red Hat Universal Base Image](https://www.redhat.com/en/blog/introducing-red-hat-universal-base-image) while earlier versions used CentOS.
|
||||
A Dockerfile for Sonatype Nexus Repository 3, starting with 3.18 the image is based on the [Red Hat Universal Base Image](https://www.redhat.com/en/blog/introducing-red-hat-universal-base-image) while earlier versions used CentOS.
|
||||
|
||||
* [Contribution Guidlines](#contribution-guidelines)
|
||||
* [Running](#running)
|
||||
* [Building the Nexus Repository Manager image](#building-the-nexus-repository-manager-image)
|
||||
* [Building the Sonatype Nexus Repository image](#building-the-nexus-repository-manager-image)
|
||||
* [Chef Solo for Runtime and Application](#chef-solo-for-runtime-and-application)
|
||||
* [Testing the Dockerfile](#testing-the-dockerfile)
|
||||
* [Red Hat Certified Image](#red-hat-certified-image)
|
||||
@@ -58,7 +58,7 @@ To test:
|
||||
$ curl http://localhost:8081/
|
||||
```
|
||||
|
||||
## Building the Nexus Repository Manager image
|
||||
## Building the Sonatype Nexus Repository image
|
||||
|
||||
To build a docker image from the [Dockerfile](https://github.com/sonatype/docker-nexus3/blob/main/Dockerfile) you can use this command:
|
||||
|
||||
@@ -68,9 +68,9 @@ $ docker build --rm=true --tag=sonatype/nexus3 .
|
||||
|
||||
The following optional variables can be used when building the image:
|
||||
|
||||
- NEXUS_VERSION: Version of the Nexus Repository Manager
|
||||
- NEXUS_DOWNLOAD_URL: Download URL for Nexus Repository, alternative to using `NEXUS_VERSION` to download from Sonatype
|
||||
- NEXUS_DOWNLOAD_SHA256_HASH: Sha256 checksum for the downloaded Nexus Repository Manager archive. Required if `NEXUS_VERSION`
|
||||
- NEXUS_VERSION: Version of the Sonatype Nexus Repository
|
||||
- NEXUS_DOWNLOAD_URL: Download URL for Sonatype Nexus Repository, alternative to using `NEXUS_VERSION` to download from Sonatype
|
||||
- NEXUS_DOWNLOAD_SHA256_HASH: Sha256 checksum for the downloaded Sonatype Nexus Repository archive. Required if `NEXUS_VERSION`
|
||||
or `NEXUS_DOWNLOAD_URL` is provided
|
||||
|
||||
## Chef Solo for Runtime and Application
|
||||
@@ -132,7 +132,7 @@ process, which runs as UID 200.
|
||||
```
|
||||
|
||||
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.
|
||||
the installed Sonatype 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.
|
||||
|
||||
@@ -177,8 +177,8 @@ Looking to contribute to our Docker image but need some help? There's a few ways
|
||||
* Chat with us on [Gitter](https://gitter.im/sonatype/nexus-developers)
|
||||
* 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)
|
||||
* Check out the [Sonatype 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._
|
||||
_Sonatype 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._
|
||||
|
||||
Reference in New Issue
Block a user