Skip to content

Commit

Permalink
Build docker image for elasticsearch snapshot (elastic#70482)
Browse files Browse the repository at this point in the history
* Build docker image for elasticsearch snapshot

* Consolidate statements

* Update .ci/es-snapshots/Jenkinsfile_build_es

Co-authored-by: Brian Seeders <seeders@gmail.com>

* Update find

* Use larger worker

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Brian Seeders <seeders@gmail.com>
  • Loading branch information
3 people authored and Liza Dayoub committed Jul 2, 2020
1 parent cd37c33 commit 086fb3e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .ci/es-snapshots/Jenkinsfile_build_es
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def PROMOTE_WITHOUT_VERIFY = !!params.PROMOTE_WITHOUT_VERIFICATION
timeout(time: 120, unit: 'MINUTES') {
timestamps {
ansiColor('xterm') {
node(workers.label('s')) {
node(workers.label('l')) {
catchErrors {
def VERSION
def SNAPSHOT_ID
Expand Down Expand Up @@ -154,9 +154,10 @@ def buildArchives(destination) {
"NODE_NAME=",
]) {
sh """
./gradlew -p distribution/archives assemble --parallel
./gradlew -Dbuild.docker=true assemble --parallel
mkdir -p ${destination}
find distribution/archives -type f \\( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elasticsearch-*-*-*-*.zip' \\) -not -path *no-jdk* -exec cp {} ${destination} \\;
find distribution -type f \\( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elasticsearch-*-*-*-*.zip' \\) -not -path *no-jdk* -not -path *build-context* -exec cp {} ${destination} \\;
docker images "docker.elastic.co/elasticsearch/elasticsearch" --format "{{.Tag}}" | xargs -n1 bash -c 'docker save docker.elastic.co/elasticsearch/elasticsearch:\${0} | gzip > ${destination}/elasticsearch-\${0}-docker-image.tar.gz'
"""
}
}

0 comments on commit 086fb3e

Please sign in to comment.