mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
* [DRA] Force docker save to save directly on file instead of pipe to another command loosing the execution error code
(cherry picked from commit 2e5e49d10d
)
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
This commit is contained in:
parent
3822b60890
commit
dac65a439e
1 changed files with 5 additions and 1 deletions
|
@ -11,7 +11,11 @@ function save_docker_tarballs {
|
||||||
local arch="${1:?architecture required}"
|
local arch="${1:?architecture required}"
|
||||||
local version="${2:?stack-version required}"
|
local version="${2:?stack-version required}"
|
||||||
for image in logstash logstash-oss logstash-ubi8; do
|
for image in logstash logstash-oss logstash-ubi8; do
|
||||||
docker save "docker.elastic.co/logstash/${image}:${version}" | gzip -c > "build/${image}-${version}-docker-image-${arch}.tar.gz"
|
docker save -o "build/${image}-${version}-docker-image-${arch}.tar" \
|
||||||
|
"docker.elastic.co/logstash/${image}:${version}" || \
|
||||||
|
error "Hit a problem in saving the Docker image for ${image}"
|
||||||
|
# NOTE: if docker save exited with non-zero the error log already exited the script
|
||||||
|
gzip "build/${image}-${version}-docker-image-${arch}.tar"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue