Skip to content

Commit

Permalink
[CI] Build docker image during packer_cache (#82145)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders committed Nov 18, 2020
1 parent 62e06ae commit 7d9f460
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
10 changes: 10 additions & 0 deletions .ci/build_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -euo pipefail

cd "$(dirname "${0}")"

cp /usr/local/bin/runbld ./
cp /usr/local/bin/bash_standard_lib.sh ./

docker build -t kibana-ci -f ./Dockerfile .
2 changes: 2 additions & 0 deletions .ci/packer_cache_for_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \

echo "created $HOME/.kibana/bootstrap_cache/$branch.tar"

.ci/build_docker.sh

if [[ "$branch" != "master" ]]; then
rm --preserve-root -rf "$checkoutDir"
fi
7 changes: 1 addition & 6 deletions vars/kibanaPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,7 @@ def scriptTaskDocker(description, script) {

def buildDocker() {
sh(
script: """
cp /usr/local/bin/runbld .ci/
cp /usr/local/bin/bash_standard_lib.sh .ci/
cd .ci
docker build -t kibana-ci -f ./Dockerfile .
""",
script: "./.ci/build_docker.sh",
label: 'Build CI Docker image'
)
}
Expand Down

0 comments on commit 7d9f460

Please sign in to comment.