-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase build timeout pipeline (#20)
* Increase build timeout pipeline Signed-off-by: see-quick <[email protected]> * add base image to speed up build time Signed-off-by: see-quick <[email protected]> * Jakub comments Signed-off-by: see-quick <[email protected]> * add a other architectures to build base image Signed-off-by: see-quick <[email protected]> * last changes Signed-off-by: see-quick <[email protected]> * little bit of debug Signed-off-by: see-quick <[email protected]> * build fix Signed-off-by: see-quick <[email protected]> * try prepare base and build images in one step Signed-off-by: see-quick <[email protected]> * save and load base image Signed-off-by: see-quick <[email protected]> * try without cache Signed-off-by: see-quick <[email protected]> * add cache back that I know everything works :) Signed-off-by: see-quick <[email protected]> * change cache key to bypass old cache Signed-off-by: see-quick <[email protected]> --------- Signed-off-by: see-quick <[email protected]>
- Loading branch information
Showing
6 changed files
with
57 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
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,7 @@ | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
|
||
USER root | ||
|
||
RUN microdnf update \ | ||
&& microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install java-11-openjdk-headless shadow-utils \ | ||
&& microdnf clean all |
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 | ||
|
||
##### | ||
# DOCKER AND PROJECT auxiliary variables | ||
##### | ||
DOCKER_VERSION_ARG=$1 | ||
PROJECT_NAME_BASE=$2 | ||
ARCHITECTURES=$3 | ||
DOCKERFILE_BASE_DIR=$4 | ||
|
||
CURRENT_TAG=${CURRENT_TAG:-"local"} | ||
|
||
#### | ||
# BUILD BASE IMAGES | ||
#### | ||
for ARCH in $ARCHITECTURES | ||
do | ||
echo "[INFO] Building image with name: strimzi/$PROJECT_NAME_BASE:$CURRENT_TAG-$ARCH)." | ||
docker build --platform linux/$ARCH --build-arg version=$DOCKER_VERSION_ARG -t strimzi/$PROJECT_NAME_BASE:$CURRENT_TAG-$ARCH $DOCKERFILE_BASE_DIR | ||
|
||
# "refresh" Docker's awareness of the image | ||
docker save strimzi/$PROJECT_NAME_BASE:$CURRENT_TAG-$ARCH -o strimzi_base_$ARCH.tar | ||
docker load -i strimzi_base_$ARCH.tar | ||
# tagging this image eliminate this error | ||
# ``` | ||
# ERROR: failed to solve: strimzi/base:local: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed | ||
# ``` | ||
# May be more likely to recognize this new tag as a local entity without trying to fetch it from a remote repository. | ||
# This specific tagging can help in resolving ambiguities that Docker might have had with the original image name and tag. | ||
docker tag strimzi/$PROJECT_NAME_BASE:$CURRENT_TAG-$ARCH strimzi/$PROJECT_NAME_BASE:latest-$ARCH`` | ||
done | ||
|
||
# PRINT ALL IMAGES | ||
docker images | ||
|
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