This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added dockerfile with precashed mvn articats for usage in tests. (#111)
Added dockerfile with precashed mvn articats for usage in tests. Signed-off-by: Radim Hopp <rhopp@redhat.com>
- Loading branch information
Showing
5 changed files
with
61 additions
and
0 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,15 @@ | ||
ARG TAG | ||
FROM quay.io/eclipse/che-java11-maven:${TAG} | ||
|
||
USER root | ||
|
||
RUN cd / && \ | ||
git clone /~https://github.com/spring-projects/spring-petclinic && \ | ||
cd /spring-petclinic && \ | ||
mvn clean package && \ | ||
mkdir -p /home/user/.m2/repository && \ | ||
cp -r /root/.m2/repository/* /home/user/.m2/repository && \ | ||
rm -rf spring-petclinic/ /root/.m2/repository/* && \ | ||
chmod -R g=u /home/user | ||
|
||
USER 10001 |
35 changes: 35 additions & 0 deletions
35
arbitrary-users-patch/happy-path/build_happy_path_image.sh
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,35 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2012-2019 Red Hat, Inc. | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
|
||
set -e | ||
|
||
SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd) | ||
|
||
DEFAULT_REGISTRY="quay.io" | ||
DEFAULT_ORGANIZATION="eclipse" | ||
DEFAULT_TAG="nightly" | ||
|
||
REGISTRY=${REGISTRY:-${DEFAULT_REGISTRY}} | ||
ORGANIZATION=${ORGANIZATION:-${DEFAULT_ORGANIZATION}} | ||
TAG=${TAG:-${DEFAULT_TAG}} | ||
|
||
NAME_FORMAT="${REGISTRY}/${ORGANIZATION}" | ||
|
||
PUSH_IMAGES=false | ||
if [ "$1" == "--push" ]; then | ||
PUSH_IMAGES=true | ||
fi | ||
|
||
# Build image for happy-path tests with precashed mvn dependencies | ||
docker build -t "${NAME_FORMAT}/happy-path:${TAG}" --no-cache --build-arg TAG=${TAG} "${SCRIPT_DIR}"/ | ||
if ${PUSH_IMAGES}; then | ||
echo "Pushing ${NAME_FORMAT}/happy-path:${TAG}" to remote registry | ||
docker push "${NAME_FORMAT}/happy-path:${TAG}" | ||
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 |
---|---|---|
|
@@ -26,4 +26,5 @@ set_nightly_tag | |
setup_environment | ||
|
||
build_patched_base_images | ||
build_happy_path_image | ||
build_and_push |
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 |
---|---|---|
|
@@ -26,4 +26,5 @@ set_release_tag | |
setup_environment | ||
|
||
build_patched_base_images | ||
build_happy_path_image | ||
build_and_push_release |
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