-
-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added inital hook to allow both docker/podman and sudo/runas/"" (#5460)
* Added inital hook to allow both docker/podman and sudo/runas/"" * Better subshell quoting * Added correct title to dockerfile * being explicit on default temurin image origin [exec] INFO: podman build --no-cache -t adoptopenjdk-lucene-solr-test:11-jdk-ubuntu-hotspot-full -f /home/jvanek/git/jvmtest/external/lucene-solr/dockerfile/11/jdk/ubuntu/Dockerfile.hotspot.full /home/jvanek/git/jvmtest/external/ [exec] ##################################################### [exec] STEP 1/21: FROM eclipse-temurin:11-jdk [exec] Error: creating build container: short-name resolution enforced but cannot prompt without a TTY Which needs to resolve. The docker.io/library is already ised in external/external.sh: docker_image_name="docker.io/library/eclipse-temurin:${JDK_VERSION}-jdk" * Fixed target name in README * Runtime can now use podman too * Added ability to not clean after run * Honour JAVA_TOOLS_OPTIONS in external tests * recognizes->recognizes Co-authored-by: Martijn Verburg <[email protected]> * determining/determines Co-authored-by: Martijn Verburg <[email protected]> * walking/walks Co-authored-by: Martijn Verburg <[email protected]> * Dropped `If used, you are on your own.` But afaict it should be there... Co-authored-by: Martijn Verburg <[email protected]> * Update external/README.md Co-authored-by: Martijn Verburg <[email protected]> * nothing->empty string * Used | isntead of / for exemplar values * Small debugging nit * Improved readme in docker x podman context * Removed smuggled in java_tool_options * Reset end of file * Renamed EXTERNAL_AQACLEAN -> EXTERNAL_AQA_CONTAIER_CLEAN * Rneamned EXTERNAL_AQA_CONTAIER_CLEAN->EXTERNAL_AQA_CONTAINER_CLEAN * Removed in-buil.xml docekr command --------- Co-authored-by: Martijn Verburg <[email protected]>
- Loading branch information
Showing
7 changed files
with
124 additions
and
24 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
|
||
################################################################### | ||
## This script walks through all external tests ## | ||
## and determines which virtualisation to use ## | ||
## It recognizes two environment variables: ## | ||
## EXTERNAL_AQA_RUNNER=docker|podman|... ## | ||
## EXTERNAL_AQA_SUDO=sudo||runas ## | ||
## ## | ||
## EXTERNAL_AQA_RUNNER defaults to podman if podman is installed ## | ||
## otherwise to docker ## | ||
## EXTERNAL_AQA_SUDO defaults to empty string ## | ||
################################################################### | ||
|
||
if [ -z "${EXTERNAL_AQA_RUNNER}" ]; then | ||
if which podman > /dev/null; then | ||
EXTERNAL_AQA_RUNNER=podman | ||
else | ||
EXTERNAL_AQA_RUNNER=docker | ||
fi | ||
fi | ||
|
||
function getExternalImageBuildCommand() { | ||
#"sudo docker build" | ||
echo "$(getExternalImageCommand) build" | ||
} | ||
|
||
function getExternalImageCommand() { | ||
#"sudo docker" | ||
echo "${EXTERNAL_AQA_SUDO} ${EXTERNAL_AQA_RUNNER}" | ||
} | ||
|
||
function getProviderNice() { | ||
echo "${EXTERNAL_AQA_RUNNER}" | ||
} | ||
|
||
function getSudoNice() { | ||
if [ -z "${EXTERNAL_AQA_SUDO}" ]; then | ||
echo "not-as-root" | ||
else | ||
echo "${EXTERNAL_AQA_SUDO}" | ||
fi | ||
} | ||
|
||
function getProviderTile() { | ||
echo "$(getSudoNice)/$(getProviderNice)" | ||
} | ||
|