A peer-to-peer stack for code collaboration
Tag radicle-server images with commit sha
Thomas Scholtesd88967e2adb8
diff --git a/README.md b/README.mdindex 0d3450e..ca094b1 100644--- a/README.md+++ b/README.md@@ -33,10 +33,13 @@ rad> (fac 6)`radicle-server` is a service that hosts Radicle state machines and persiststhem to PostgreSQL.-The lastest master build of this service is distributed as the Docker image-`eu.gcr.io/opensourcecoin/radicle-server`. To build the image locally run-`images/radicle-server/build.sh`. You can also use-`images/radicle-server/docker-compose.yaml`.+The latest master build of this service is distributed as the Docker image+`eu.gcr.io/opensourcecoin/radicle-server:latest`. For every master commit we+also provide an image tagged the current date and a short commit hash. For+example `eu.gcr.io/opensourcecoin/radicle-server:b2018.12.06-a76a52f`.++To build the image locally run `images/radicle-server/build.sh`. You can also+use `images/radicle-server/docker-compose.yaml`.## Developmentdiff --git a/cloudbuild.yaml b/cloudbuild.yamlindex 3df6947..0f7373e 100644--- a/cloudbuild.yaml+++ b/cloudbuild.yaml@@ -46,7 +46,6 @@ steps:apt-get -qq updateapt-get -yqq install libpq-dev- stack build --faststack build --fast --test --no-terminal --pedantic./images/radicle-server/ci-copy-bin.sh@@ -81,6 +80,7 @@ steps:name: 'gcr.io/cloud-builders/docker'entrypoint: bashenv:+ - COMMIT_SHA=$COMMIT_SHA- BRANCH_NAME=$BRANCH_NAMEargs:- "-c"@@ -89,11 +89,16 @@ steps:if [ "$BRANCH_NAME" == "master" ]; thenimage_name="eu.gcr.io/opensourcecoin/radicle-server"+ short_sha=$(echo "$COMMIT_SHA" | head --bytes=7)+ # Looks like this: b2018.12.06-a76a52f+ tag="b$(date +%Y.%m.%d)-${short_sha}"docker build \--tag "$image_name" \+ --tag "$image_name:$tag" \--cache-from "$image_name" \./images/radicle-serverdocker push "$image_name"+ docker push "$image_name:$tag"fi- id: "Save cache"