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

bug: Use the correct user instead of hardcoding leverage #68

Merged
merged 8 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
#
build-and-test:
machine:
image: ubuntu-2204:2022.04.1
image: ubuntu-2204:2023.02.1

# This job has been blocked because Docker Layer Caching is not available on your plan.
# Should upgrade if necessary.
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
#
push-images:
machine:
image: ubuntu-2204:2022.04.1
image: ubuntu-2204:2023.02.1

# This job has been blocked because Docker Layer Caching is not available on your plan.
# Should upgrade if necessary.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ AWS_DOCKER_ENTRYPOINT := aws
# from the circle ci workflow reading the versions_to_build file,
# this values will be overwritten at build time:
TERRAFORM_TAG := 1.3.5
LEVERAGE_CLI_TAG := 1.14
LEVERAGE_CLI_TAG := 0.2.0

DOCKER_TAG := ${TERRAFORM_TAG}-${LEVERAGE_CLI_TAG}
DOCKER_REPO_NAME := binbash
Expand Down
6 changes: 4 additions & 2 deletions scripts/aws-sso/aws-sso-login.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ function log {
# -----------------------------------------------------------------------------
# Initialize variables
# -----------------------------------------------------------------------------
USR=$(whoami)
USR_HOME=$([ "$USR" == "root" ] && echo "root" || echo "home/$USR")
SCRIPT_LOG_LEVEL=${SCRIPT_LOG_LEVEL:-2}
PROJECT=$(hcledit -f "$COMMON_CONFIG_FILE" attribute get project | sed 's/"//g')
SSO_PROFILE_NAME=${SSO_PROFILE_NAME:-$PROJECT-sso}
SSO_CACHE_DIR=${SSO_CACHE_DIR:-/home/leverage/tmp/$PROJECT/sso/cache}
AWS_SSO_CACHE_DIR=/home/leverage/.aws/sso/cache
SSO_CACHE_DIR=${SSO_CACHE_DIR:-"/${USR_HOME}/tmp/$PROJECT/sso/cache"}
AWS_SSO_CACHE_DIR="/${USR_HOME}/.aws/sso/cache"
SSO_TOKEN_FILE_NAME='token'
debug "SCRIPT_LOG_LEVEL=$SCRIPT_LOG_LEVEL"
debug "COMMON_CONFIG_FILE=$COMMON_CONFIG_FILE"
Expand Down
4 changes: 3 additions & 1 deletion scripts/aws-sso/aws-sso-logout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ function log {
# -----------------------------------------------------------------------------
# Initialize variables
# -----------------------------------------------------------------------------
USR=$(whoami)
USR_HOME=$([ "$USR" == "root" ] && echo "root" || echo "home/$USR")
SCRIPT_LOG_LEVEL=${SCRIPT_LOG_LEVEL:-2}
PROJECT=$(hcledit -f "$COMMON_CONFIG_FILE" attribute get project | sed 's/"//g')
SSO_CACHE_DIR=${SSO_CACHE_DIR:-/home/leverage/tmp/$PROJECT/sso/cache}
SSO_CACHE_DIR=${SSO_CACHE_DIR:-"/${USR_HOME}/tmp/$PROJECT/sso/cache"}
debug "SCRIPT_LOG_LEVEL=$SCRIPT_LOG_LEVEL"
debug "AWS_SHARED_CREDENTIALS_FILE=$AWS_SHARED_CREDENTIALS_FILE"
debug "AWS_CONFIG_FILE=$AWS_CONFIG_FILE"
Expand Down
6 changes: 3 additions & 3 deletions versions_to_build
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1.3.5-0.2.0
1.5.0-0.2.0
1.6.0-0.2.0
1.3.5-0.2.1
1.5.0-0.2.1
1.6.0-0.2.1
Loading