Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
b2b170f4
Commit
b2b170f4
authored
8 years ago
by
Kevin Falcone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extra set +xing and variable name fix.
parent
5b9807d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
util/jenkins/assume-role.sh
+7
-4
No files found.
util/jenkins/assume-role.sh
View file @
b2b170f4
...
@@ -2,12 +2,14 @@
...
@@ -2,12 +2,14 @@
# assume-role function for use by machine services that don't use MFA to assume role.
# assume-role function for use by machine services that don't use MFA to assume role.
# source this into your bash script and then
# source this into your bash script and then
# set +x
#
# assume-role(${AWS_MFA_ARN})
# assume-role(${AWS_ROLE_ARN})
# set -x
#
# You can skip set +-x if you aren't concerned about leaking the tokens in your logs.
# The function turns off echoing, so no tokens are exposed.
# If you wish to hide your Role's ARN, you can set +x before calling the function.
assume-role
()
{
assume-role
()
{
set
+x
ROLE_ARN
=
"
${
1
}
"
ROLE_ARN
=
"
${
1
}
"
SESSIONID
=
$(
date +
"%s"
)
SESSIONID
=
$(
date +
"%s"
)
...
@@ -20,5 +22,6 @@ assume-role() {
...
@@ -20,5 +22,6 @@ assume-role() {
export
AWS_SECRET_ACCESS_KEY
=
${
RESULT
[1]
}
export
AWS_SECRET_ACCESS_KEY
=
${
RESULT
[1]
}
export
AWS_SECURITY_TOKEN
=
${
RESULT
[2]
}
export
AWS_SECURITY_TOKEN
=
${
RESULT
[2]
}
export
AWS_SESSION_TOKEN
=
${
AWS_SECURITY_TOKEN
}
export
AWS_SESSION_TOKEN
=
${
AWS_SECURITY_TOKEN
}
set
-x
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment