From f1cb46081c31a3c3d630ff6bd25ce8410bd0bed6 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 20 Sep 2018 11:21:53 +0300 Subject: [PATCH] ci: only run `aio_preview` job on PR builds (#26030) There can be no preview on non-PR builds, so there is no point in running the job. PR Close #26030 --- .circleci/config.yml | 8 +++++++- aio/scripts/build-artifacts.sh | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e20d9766c5..134e3ac05b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -148,6 +148,7 @@ jobs: - run: bazel run @yarn//:yarn - run: bazel query --output=label //... | xargs bazel test --define=compile=local --build_tag_filters=ivy-local --test_tag_filters=-manual,ivy-local + # This job should only be run on PR builds, where `CIRCLE_PR_NUMBER` is defined. aio_preview: <<: *job_defaults environment: @@ -262,7 +263,11 @@ workflows: - test_ivy_jit - test_ivy_aot - build-packages-dist - - aio_preview + - aio_preview: + # Only run on PR builds. (There can be no previews for non-PR builds.) + filters: + branches: + only: /pull\/\d+/ - integration_test: requires: - build-packages-dist @@ -291,6 +296,7 @@ workflows: branches: only: - master + notify: webhooks: - url: https://ngbuilds.io/circle-build \ No newline at end of file diff --git a/aio/scripts/build-artifacts.sh b/aio/scripts/build-artifacts.sh index 45684f7cbe..61d9dfddcd 100755 --- a/aio/scripts/build-artifacts.sh +++ b/aio/scripts/build-artifacts.sh @@ -9,13 +9,13 @@ readonly OUTPUT_FILE=$PROJECT_ROOT/$1 readonly PR_NUMBER=$2 readonly PR_LAST_SHA=$3 readonly deployedUrl=https://pr${PR_NUMBER}-${PR_LAST_SHA:0:7}.ngbuilds.io/ - + ( cd $PROJECT_ROOT/aio # Build and store the app yarn build - + # Set deployedUrl as parameter in the opensearch description # deployedUrl must end with / yarn set-opensearch-url $deployedUrl