diff --git a/publish.sh b/publish.sh index 5389d744..59497bb0 100755 --- a/publish.sh +++ b/publish.sh @@ -1,3 +1,32 @@ +# ! /usr/bin/env bash +#set -e +# +#if [ $# -ne 1 ]; then +# echo "Usage: $0 " +# exit 1 +#fi +# +#project="${1}" +# +#if [ ! -f "${project}.gemspec" ]; then +# echo "Cannot find ${project}.gemspec" +# echo "Usage: $0 " +# exit 1 +#fi +# +#base="$(dirname "${0}")" +# +#docker run \ +# --rm \ +# --env RUBYGEMS_API_KEY \ +# --volume "$(pwd)":"$(pwd)" \ +# --workdir "$(pwd)" \ +# cyberark/ubuntu-ruby-builder:latest \ +# "${base}/publish-rubygem-container-entrpoint.sh" "${project}" + + + +#Original #!/bin/bash -e docker pull registry.tld/conjurinc/publish-rubygem @@ -5,3 +34,65 @@ docker pull registry.tld/conjurinc/publish-rubygem summon --yaml "RUBYGEMS_API_KEY: !var rubygems/api-key" \ docker run --rm --env-file @SUMMONENVFILE -v "$(pwd)":/opt/src \ registry.tld/conjurinc/publish-rubygem conjur-cli + + + + + +# conjurinc/publish-rubygem -> conjurinc/release-tools/bin/publish-rubygem +#docker pull registry.tld/conjurinc/release-tools/bin/publish-rubygem + +#summon --yaml "RUBYGEMS_API_KEY: !var rubygems/api-key" \ +# docker run --rm --env-file @SUMMONENVFILE -v "$(pwd)":/opt/src \ +# registry.tld/conjurinc/release-tools/bin/publish-rubygem-container-entrpoint.sh conjur-cli + +#publish-rubygem-container-entrpoint.sh + + + + + +##!/usr/bin/env bash +#set -e +# +#if [ $# -ne 1 ]; then +# echo "Usage: $0 " +# exit 1 +#fi +# +#project="${1}" +# +#if [ ! -f "${project}.gemspec" ]; then +# echo "Cannot find ${project}.gemspec" +# echo "Usage: $0 " +# exit 1 +#fi +# +#echo "Updating package list..." +#apt-get update > /dev/null 2>&1 +#echo "Installing dependencies..." +#apt-get install -y git > /dev/null 2>&1 +# +#git config --global --add safe.directory "$(pwd)" +# +#echo "Building gem..." +# +#gem build "${project}.gemspec" +# +#echo "Publishing gem..." +## write API key to credentials file +#mkdir -p /root/.gem +#cat > /root/.gem/credentials <