mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
On ARM architecture UBI8 Docker images aren't created, so avoid to create empty tar.gz files.
(cherry picked from commit 7a39d97055
)
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
This commit is contained in:
parent
dac65a439e
commit
fd3ffc1548
2 changed files with 17 additions and 5 deletions
|
@ -10,12 +10,19 @@ function error {
|
|||
function save_docker_tarballs {
|
||||
local arch="${1:?architecture required}"
|
||||
local version="${2:?stack-version required}"
|
||||
for image in logstash logstash-oss logstash-ubi8; do
|
||||
docker save -o "build/${image}-${version}-docker-image-${arch}.tar" \
|
||||
local images="logstash logstash-oss"
|
||||
if [ "${arch}" != "aarch64" ]; then
|
||||
# No logstash-ubi8 for AARCH64
|
||||
images="logstash logstash-oss logstash-ubi8"
|
||||
fi
|
||||
|
||||
for image in ${images}; do
|
||||
tar_file="${image}-${version}-docker-image-${arch}.tar"
|
||||
docker save -o "build/${tar_file}" \
|
||||
"docker.elastic.co/logstash/${image}:${version}" || \
|
||||
error "Hit a problem in saving the Docker image for ${image}"
|
||||
error "Unable to save tar file ${tar_file} for ${image} image."
|
||||
# NOTE: if docker save exited with non-zero the error log already exited the script
|
||||
gzip "build/${image}-${version}-docker-image-${arch}.tar"
|
||||
gzip "build/${tar_file}"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,12 @@ for file in build/logstash-*; do shasum $file;done
|
|||
|
||||
info "UPLOADING TO INTERMEDIATE BUCKET"
|
||||
# Note the deb, rpm tar.gz AARCH64 files generated has already been loaded by the dra_x86_64.sh
|
||||
for image in logstash logstash-oss logstash-ubi8; do
|
||||
images="logstash logstash-oss"
|
||||
if [ "$ARCH" != "aarch64" ]; then
|
||||
# No logstash-ubi8 for AARCH64
|
||||
images="logstash logstash-oss logstash-ubi8"
|
||||
fi
|
||||
for image in ${images}; do
|
||||
upload_to_bucket "build/$image-${STACK_VERSION}-docker-image-${ARCH}.tar.gz" ${STACK_VERSION}
|
||||
done
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue