From 4d9ba8903435fe9ec00bea1e2db0f72a37425e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20C=2E=20R=C3=ADos?= Date: Mon, 10 Jan 2022 13:17:40 +0100 Subject: [PATCH] Reverting distribution repository To re-enable snapshot publishing --- ci/scripts/build-project.sh | 8 ++++++-- ci/tasks/build-project.yml | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ci/scripts/build-project.sh b/ci/scripts/build-project.sh index cf13c35..7441192 100755 --- a/ci/scripts/build-project.sh +++ b/ci/scripts/build-project.sh @@ -4,14 +4,18 @@ set -euo pipefail readonly ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE:-true}" readonly SKIP_TESTS="${SKIP_TESTS:-false}" -readonly DISTRIBUTION_REPOSITORY_OUTPUT="${DISTRIBUTION_REPOSITORY_OUTPUT:?must be set}" +# shellcheck source=common.sh +source "$(dirname "$0")/common.sh" +repository=$(pwd)/distribution-repository if [ "$SKIP_TESTS" == "true" ]; then build_task=assemble else build_task=build fi +pushd git-repo >/dev/null ./gradlew --parallel clean "$build_task" publish \ -PonlyShowStandardStreamsOnTestFailure="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE}" \ - -PpublicationRepository="${DISTRIBUTION_REPOSITORY_OUTPUT}" + -PpublicationRepository="${repository}" +popd >/dev/null diff --git a/ci/tasks/build-project.yml b/ci/tasks/build-project.yml index 37d05c3..3006c39 100644 --- a/ci/tasks/build-project.yml +++ b/ci/tasks/build-project.yml @@ -15,7 +15,7 @@ caches: - path: maven - path: gradle run: - path: ci/scripts/build-project.sh - dir: git-repo + path: git-repo/ci/scripts/build-project.sh params: - DISTRIBUTION_REPOSITORY_OUTPUT: ../distribution-repository + ARTIFACTORY_USERNAME: ((artifactory-username)) + ARTIFACTORY_PASSWORD: ((artifactory-password))