From 558b59059fe028f5f47d447d3e759c62e0a1122a Mon Sep 17 00:00:00 2001 From: Victor Ng Date: Fri, 26 Jun 2020 11:52:41 -0400 Subject: [PATCH] Add CircleCI build badge and a build script for master --- README.md | 1 + bin/build | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100755 bin/build diff --git a/README.md b/README.md index f273ca5..f0db38d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Performance Robustness Evaluation for Statistical Classifiers +[![CircleCI](https://circleci.com/gh/mozilla/presc.svg?style=svg)](https://circleci.com/gh/mozila/presc) [![Join the chat at https://gitter.im/PRESC-outreachy/community](https://badges.gitter.im/PRESC-outreachy/community.svg)](https://gitter.im/PRESC-outreachy/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ## Overview diff --git a/bin/build b/bin/build new file mode 100755 index 0000000..250935c --- /dev/null +++ b/bin/build @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -eo pipefail + +# create a version.json +printf '{"commit":"%s","version":"%s","source":"https://github.com/%s/%s","build":"%s"}\n' \ + "$CIRCLE_SHA1" \ + "$CIRCLE_TAG" \ + "$CIRCLE_PROJECT_USERNAME" \ + "$CIRCLE_PROJECT_REPONAME" \ + "$CIRCLE_BUILD_URL" \ +> version.json + +echo "Building the docker image with the tag app:build" +docker build -t app:build .