Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix behavior regression when no decryption needed #12

Merged
merged 5 commits into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/bash

set -o errexit -o pipefail -o nounset
set -o errexit -o pipefail

# Source configuration file
config_file="$(dirname "${BASH_SOURCE[0]}")/configuration.bash"
Expand Down Expand Up @@ -77,15 +76,16 @@ freshen_chef_repo
pushd chef_repo
wd="$(pwd)"

if test \( -n "$CHEF_MAGE_PROFILE" -a -z "$MAGE_KEY" \) -o \( -z "$CHEF_MAGE_PROFILE" -a -n "$MAGE_KEY" \); then
echo "CHEF_MAGE_PROFILE or MAGE_KEY is not set, and are necessary to perform decryption."
exit 1
fi

if test -n "$CHEF_MAGE_PROFILE" && test -n "$MAGE_KEY" ; then
decrypt_secrets
elif test -n "$NO_MAGE" ; then
echo "NO_MAGE variable is set. No decryption is performed"
else
echo "CHEF_MAGE_PROFILE or MAGE_KEY is not set, and are necessary to perform decryption."
exit 1
fi


cinc-solo -c "${wd}/.chef/solo.rb" -E "$CHEF_ENVIRONMENT" -j "${wd}/${CHEF_SOLO_FILE}"

# Write date + commit SHA to a changelog
Expand Down