From 31a7b1b2a50ae280061a08bb5f54b927a3cbb8ac Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Tue, 24 Aug 2021 12:19:32 +0600 Subject: [PATCH 1/2] Update config.yml --- .circleci/config.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ba5fc7..5fde963 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,22 @@ # # Check https://circleci.com/docs/2.0/language-java/ for more details # -version: 2 +version: 2.1 + +commands: + early_return_for_forked_pull_requests: + description: >- + If this build is from a fork, stop executing the current job and return success. + This is useful to avoid steps that will fail due to missing credentials. + steps: + - run: + name: Early return if this build is from a forked PR + command: | + if [ -n "$CIRCLE_PR_NUMBER" ]; then + echo "Nothing to do for forked PRs, so marking this step successful" + circleci step halt + fi + jobs: build: docker: @@ -37,6 +52,7 @@ jobs: # run tests! - run: mvn integration-test + - early_return_for_forked_pull_requests - run: mvn cobertura:cobertura - run: bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t ${CODECOV_TOKEN} From 3f7fd61d039427a64ab24b19a9a457519e5c89c6 Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Tue, 24 Aug 2021 12:21:44 +0600 Subject: [PATCH 2/2] port not permitted --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5fde963..0f2c067 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,9 +22,7 @@ jobs: build: docker: - image: circleci/openjdk:8u171-jdk - - image: redislabs/rejson:edge - port: 6379:6379 working_directory: ~/repo