From 145620071716eef5947c4d6339fa50c0c803f96a Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Sat, 24 Nov 2018 19:19:53 +0100 Subject: [PATCH] @cosmetic added auto deploy for prs and branch builds --- .circleci/config.yml | 3 +++ deploy.sh | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 deploy.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 56019eb79..5640437b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -118,6 +118,9 @@ jobs: - store_artifacts: path: _packages destination: artifacts + - run: + name: "Deploying" + command: chmod +x deploy.sh && ./deploy.sh - persist_to_workspace: root: . # Must be relative path from root diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 000000000..4de8e260b --- /dev/null +++ b/deploy.sh @@ -0,0 +1,7 @@ +if [ -z "$CIRCLE_PULL_REQUEST" ]; then + echo "We are building a normal branch, deploying as such..." + curl "http://pr.radarr.video:4466/deploy?urlhttps%3A%2F%2F${CIRCLE_BUILD_NUM}-77323220-gh.circle-artifacts.com%2F0%2Fartifacts%2FRadarr.${CIRCLE_BRANCH//\//-}.$BUILD_VERSION.$CIRCLE_BUILD_NUM.linux.tar.gz&b=branch&name=${CIRCLE_BRANCH}" +else + echo "We are building a pr, deploying as such..." + curl "http://pr.radarr.video:4466/deploy?urlhttps%3A%2F%2F${CIRCLE_BUILD_NUM}-77323220-gh.circle-artifacts.com%2F0%2Fartifacts%2FRadarr.${CIRCLE_BRANCH//\//-}.$BUILD_VERSION.$CIRCLE_BUILD_NUM.linux.tar.gz&b=pr&name=${CIRCLE_PR_NUMBER}" +fi \ No newline at end of file