From 6d5259d58a7d3cf9dbddac55b7d85f8db543a0ee Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Tue, 10 Apr 2018 18:21:30 -0500 Subject: [PATCH] post to redhat registries api when tagging new release --- .circleci/config.yml | 1 + .circleci/redhat-registry.sh | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100755 .circleci/redhat-registry.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index ec83eb4bf1d50..258256aabb0d3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -247,6 +247,7 @@ jobs: bash .circleci/update-releases.sh bash .circleci/docker.sh bash .circleci/snap.sh + bash .circleci/redhat-registry.sh workflows: version: 2 diff --git a/.circleci/redhat-registry.sh b/.circleci/redhat-registry.sh new file mode 100755 index 0000000000000..a206af991c19b --- /dev/null +++ b/.circleci/redhat-registry.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -euvo pipefail +IFS=$'\n\t' + +if [[ $CIRCLE_TAG ]]; then + curl -X POST \ + https://connect.redhat.com/api/v2/projects/$REDHAT_REGISTRY_PID/build \ + -H "Authorization: Bearer $REDHAT_REGISTRY_KEY" \ + -H 'Cache-Control: no-cache' \ + -H 'Content-Type: application/json' \ + -d '{"tag":"'$CIRCLE_TAG'"}' +fi