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

#17 - Write aws config file to a temporary directory #20

Merged
merged 1 commit into from
Aug 19, 2021

Conversation

mrmeyers99
Copy link
Contributor

This is to clean up the config file so that non-ephemeral runners do not fail on subsequent runs of this action as requested in #17. Tested this in a private repo with non-ephemeral runners and it worked like a charm.

This log file doesn't really show much since I didn't change the output at all, but it does show that it worked from my branch:

Run mrmeyers99/aws-creds-okta-action@feat/use-temp-file
  with:
    aws_role_arn: arn:aws:iam::***:role/***
    okta_username: ***
    okta_password: ***
    okta_app_url: ***
    okta_mfa_method: token:software:totp
  env:
    ANSIBLE_FORCE_COLOR: 1
/usr/bin/docker run --name dc4f4dd0c7b2bc72b54f0787832066113a01f6_1a2cd6 --label dc4f4d --workdir /github/workspace --rm -e ANSIBLE_FORCE_COLOR -e INPUT_AWS_ROLE_ARN -e INPUT_OKTA_USERNAME -e INPUT_OKTA_PASSWORD -e INPUT_OKTA_APP_URL -e INPUT_OKTA_MFA_SEED -e INPUT_OKTA_MFA_METHOD -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/ec2-user/actions-runner/_work/_temp/_github_home":"/github/home" -v "/home/ec2-user/actions-runner/_work/_temp/_github_workflow":"/github/workflow" -v "/home/ec2-user/actions-runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/ec2-user/actions-runner/_work/***":"/github/workspace" dc4f4d:d0c7b2bc72b54f0787832066113a01f6
Requesting AWS credentials via Tokendito.
Succeeded getting credentials in attempt #1.```

@mrchief
Copy link
Owner

mrchief commented Aug 17, 2021

Looks great! Have you tested the trap path?

@mrmeyers99
Copy link
Contributor Author

I didn't test all the signals, but it definitely got deleted in my test with a normal exit.

mrchief
mrchief previously approved these changes Aug 19, 2021
Copy link
Owner

@mrchief mrchief left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sending this!

@mrchief
Copy link
Owner

mrchief commented Aug 19, 2021

@mrmeyers99
Copy link
Contributor Author

I've signed the commits, please review again.

@mrchief mrchief merged commit 2f8a4ff into mrchief:master Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants