forked from travelaudience/nexus-proxy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Travis CI will now build a container image.
Signed-off-by: Paulo Pires <pjpires@gmail.com>
- Loading branch information
Showing
5 changed files
with
67 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
before_install: | ||
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | ||
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | ||
- sudo apt-get update | ||
- sudo apt-get -y install docker-ce | ||
|
||
script: | ||
- docker build -t "quay.io/travelaudience/docker-nexus-proxy:${TRAVIS_TAG:-latest}" . | ||
|
||
after_success: | ||
- if ([[ "${TRAVIS_BRANCH}" == "master" ]] && [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]) || [[ ! -z "${TRAVIS_TAG}" ]]; | ||
then | ||
docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" quay.io; | ||
docker push "quay.io/travelaudience/docker-nexus-proxy:${TRAVIS_TAG:-latest}"; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM openjdk:8u131-jdk-alpine AS builder | ||
COPY ./ /src/ | ||
WORKDIR /src/ | ||
RUN ./gradlew --info --no-daemon build | ||
RUN ls -la /src/build/libs/ | ||
|
||
FROM quay.io/pires/docker-jre:8u131_alpine3.6.2 | ||
|
||
ENV ALLOWED_USER_AGENTS_ON_ROOT_REGEX "GoogleHC" | ||
ENV AUTH_CACHE_TTL "300" | ||
ENV BIND_PORT "8080" | ||
ENV CLIENT_ID "REPLACE_ME" | ||
ENV CLIENT_SECRET "REPLACE_ME" | ||
ENV CLOUD_IAM_AUTH_ENABLED "false" | ||
ENV KEYSTORE_PATH "keystore.jceks" | ||
ENV KEYSTORE_PASS "safe#passw0rd!" | ||
ENV NEXUS_DOCKER_HOST "containers.example.com" | ||
ENV NEXUS_HTTP_HOST "nexus.example.com" | ||
ENV NEXUS_RUT_HEADER "X-Forwarded-User" | ||
ENV ORGANIZATION_ID "REPLACE_ME" | ||
ENV REDIRECT_URL "https://nexus.example.com/oauth/callback" | ||
ENV SESSION_TTL "1440000" | ||
ENV TLS_CERT_PK12_PATH "cert.pk12" | ||
ENV TLS_CERT_PK12_PASS "safe#passw0rd!" | ||
ENV TLS_ENABLED "false" | ||
ENV UPSTREAM_DOCKER_PORT "5003" | ||
ENV UPSTREAM_HOST "localhost" | ||
ENV UPSTREAM_HTTP_PORT "8081" | ||
|
||
COPY --from=builder /src/build/libs/nexus-proxy.jar /nexus-proxy.jar | ||
|
||
EXPOSE 8080 | ||
EXPOSE 8443 | ||
|
||
CMD ["-jar", "/nexus-proxy.jar"] | ||
|
||
ENTRYPOINT ["java"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters