-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from WarnerMedia/sync/update-to-2.7.0
Sync/update to 2.7.0
- Loading branch information
Showing
24 changed files
with
2,096 additions
and
280 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,34 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v17 | ||
|
||
- uses: cachix/install-nix-action@v20 | ||
with: | ||
extra_nix_config: | | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Building package | ||
run: nix build . | ||
|
||
- name: Write a gimme-aws-creds config file for testing | ||
run: | | ||
cat > ~/.okta_aws_login_config <<EOF | ||
[default] | ||
okta_org_url = https://foobar.okta.com | ||
okta_auth_server = | ||
client_id = | ||
gimme_creds_server = appurl | ||
aws_appname = | ||
aws_rolename = | ||
write_aws_creds = False | ||
cred_profile = role | ||
okta_username = [email protected] | ||
app_url = https://foobar.okta.com/home/amazon_aws/00000000000000000000/111 | ||
resolve_aws_alias = False | ||
preferred_mfa_type = | ||
aws_default_duration = 36000 | ||
device_token = | ||
output_format = json | ||
EOF | ||
- name: Check gimme-aws-creds version | ||
run: ./result/bin/gimme-aws-creds --version |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
include README.md | ||
include LICENSE.txt | ||
include requirements.txt | ||
include LONG_DESCRIPTION.md |
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,44 @@ | ||
#/usr/bin/env bash | ||
# | ||
# Auto-complete script for gimme-aws-creds. | ||
# | ||
# Links: | ||
# https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion-Builtins.html#Programmable-Completion-Builtins | ||
# | ||
# To use in your current shell: | ||
# /> source gimme-aws-creds-completion.sh | ||
# | ||
# To auto-load in new shells, copy to the system wide bash completion directory: | ||
# on Mac: /usr/local/etc/bash_completion.d/ | ||
# on Linux: /etc/bash_completion.d/ | ||
# on Windows: who cares??? | ||
# | ||
|
||
gimme-aws-creds_autocomplete() | ||
{ | ||
local _cmd_line="${COMP_LINE}" | ||
local _cur="${COMP_WORDS[COMP_CWORD]}" | ||
local _prev="${COMP_WORDS[COMP_CWORD-1]}" | ||
local _opts="--help --action-configure --configure --output-format --profile --resolve --insecure -keep --version --action-list-profiles --list-profiles --action-list-roles --open-browser" | ||
local _suggestions="" | ||
if [[ "${_prev}" == "gimme-aws-creds" && "${_cur}" == "" ]] ; then | ||
_suggestions=($(compgen -W "${_opts}" "${_cur}")) | ||
elif [[ "${_cur}" == "-" ]] ; then | ||
_suggestions=($(compgen -W "${_opts}" "${_cur}")) | ||
elif [[ "${_cur}" =~ "--" ]] ; then | ||
_suggestions=($(compgen -W "${_opts}" -- "${_cur}")) | ||
elif [ "${_prev}" == "--profile" ] || [ "${_prev}" == "-p" ] ; then | ||
# Get a list of profiles from the okta config-file (if we have some): | ||
local IFS=$'\n' | ||
local _creds_cfg_file=${HOME}/.okta_aws_login_config | ||
if [ -f ${_creds_cfg_file} ] ; then | ||
local _profiles=$(grep "^\[" ${_creds_cfg_file} | sed -e 's/\[//' -e 's/\]//') | ||
[ ! -z "${_profiles}" ] && _suggestions=($(compgen -W "${_profiles}" "${_cur}")) | ||
fi | ||
elif [ "${_prev}" == "--output-format" ] || [ "${_prev}" == "-o" ] ; then | ||
_suggestions=($(compgen -W "export json" "${_cur}")) | ||
fi | ||
COMPREPLY=("${_suggestions[@]}") | ||
} | ||
|
||
complete -F gimme-aws-creds_autocomplete gimme-aws-creds |
Oops, something went wrong.