Skip to content

Commit

Permalink
Add machinery to bootstrap the cc_app with code coverage
Browse files Browse the repository at this point in the history
data from gcs, using "gsutil", to search for static site data, per ci job.
  • Loading branch information
wayneseymour committed Feb 4, 2020
1 parent 08a5453 commit d79ce34
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .ci/Jenkinsfile_coverage
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
. src/dev/code_coverage/shell_scripts/ingest_coverage.sh ${BUILD_NUMBER}
. src/dev/code_coverage/shell_scripts/bootstrap_app_initial_data.sh ${BUILD_NUMBER}
# Check my work :)
cat src/dev/code_coverage/shell_scripts/bootstrapped.txt
""",
"### Run `yarn kbn bootstrap && merge coverage` and Ingest Code Coverage to ES Cluster"
)
Expand Down
24 changes: 24 additions & 0 deletions src/dev/code_coverage/shell_scripts/bootstrap_app_inital_data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -e

echo "### Bootstrapping App Initial Data"

BUCKET="gs://kibana-ci-artifacts/jobs/elastic+kibana+code-coverage"
export BUCKET
CURRENT_BUILD_ID=$1
export CURRENT_BUILD_ID
PAST_BUILD_ID=$((CURRENT_BUILD_ID - 15))
export PAST_BUILD_ID

queryDataStore () {
# Sink errors to /dev/null...THEE BITBUCKET :)
for x in `seq ${PAST_BUILD_ID} ${CURRENT_BUILD_ID}`
do
gsutil ls -a ${BUCKET}/${x} 2>/dev/null |grep Z 1>> bootstrapped.txt
done
}
queryDataStore


echo "### Bootstrapping App Initial Data - Complete"
Empty file.

0 comments on commit d79ce34

Please sign in to comment.