forked from cyberark/conjur-credentials-plugin
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Multi Threaded and Distributed Environment
Support Multi Threaded and Distributed Environment
- Loading branch information
1 parent
4a7efda
commit efdbd3d
Showing
20 changed files
with
246 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Publish a pre-release to artifactory | ||
|
||
set -euo pipefail | ||
|
||
# Load docker_rt function from utils.sh | ||
# shellcheck source=/dev/null | ||
. "$(dirname "${0}")/utils.sh" | ||
|
||
# shellcheck disable=SC2012 | ||
target_package="$(ls -1tr target/*.hpi |tail -n 1)" | ||
|
||
# Copy built hpi to ASSET_DIR so it will be attached to the Github Release | ||
|
||
if [[ -n "${ASSET_DIR:-}" ]] && [[ -d "${ASSET_DIR:-}" ]]; then | ||
echo "Copying ${target_package} to Asset Dir: ${ASSET_DIR}" | ||
cp target/*.hpi "${ASSET_DIR}" | ||
else | ||
echo "ASSET_DIR is unset, unable to copy ${target_package} to ASSET_DIR for github release. ❌" | ||
exit 1 | ||
fi | ||
|
||
mkdir -p maven_cache | ||
|
||
if [[ "${MODE:-}" == "PROMOTE" ]]; then | ||
echo "PROMOTE build, publishing to internal artifactory and ossrh (maven central)" | ||
maven_profiles="artifactory,ossrh,sign" | ||
else | ||
echo "Release build, publishing to internal artifactory" | ||
maven_profiles="artifactory,sign" | ||
fi | ||
|
||
docker run \ | ||
-e OSSRH_USERNAME \ | ||
-e OSSRH_PASSWORD \ | ||
-e JFROG_USERNAME \ | ||
-e JFROG_APIKEY \ | ||
--volume "${PWD}:${PWD}" \ | ||
--volume "${PWD}/maven_cache":/root/.m2 \ | ||
--volume "$GPG_PASSWORD:/gpg_password" \ | ||
--volume "$GPG_PRIVATE_KEY:/gpg_key" \ | ||
--workdir "${PWD}" \ | ||
tools \ | ||
/bin/bash -ec "gpg --batch --passphrase-file /gpg_password --trust-model always --import /gpg_key | ||
mvn --batch-mode --settings mvn-settings.xml --file pom.xml deploy -Dmaven.test.skip -P ${maven_profiles}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.