-
Notifications
You must be signed in to change notification settings - Fork 282
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
Integrate Go s3secrets-helper into elastic-stack #772
Conversation
dfca5df
to
d000c0e
Compare
👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
I tested this (and buildkite/elastic-ci-stack-s3-secrets-hooks#37) as a blackbox by creating a new stack based on this branch and running some builds.
My secrets bucket looked like this:
aws s3 ls s3://<bucket-name> --recursive
2020-11-22 22:31:56 26 env
2020-11-22 22:32:22 0 gist-test/
2020-11-22 22:32:50 28 gist-test/env
2020-11-22 22:29:43 1678 private_ssh_key
My global env:
$ cat env
#!/bin/sh
GLOBAL_ENV=foo
My pipeline env:
$ cat env
#!/bin/sh
PIPELINE_ENV=bar
The build script looked like this:
#!/bin/bash
set -ux
echo $GLOBAL_ENV
echo $PIPELINE_ENV
The hook ran in 0 seconds (woo!), and did everything I expected:
The environment variables set in the env files were available when the script ran:
There's some things I didn't test, like ssh credentials (my test repo was checked out via http), and git-credentials
. Still, my tests show there's no glaring errors and I reckon we should merge so we can start dogfooding it via our own builds.
A few of these changes will conflict with the arm support that's brewing in #758. That's OK though, I'm happy to rebase the arm support if this merges first.
Oh. I should add that I also ran the same test on windows and everything worked as expected 👍 |
Previous submodule commit on this branch was the branch commit prior to merge, so it has the same file tree.
Integrating buildkite/elastic-ci-stack-s3-secrets-hooks#37 into elastic-stack.
CI:
s3secrets-helper
binaries as CI steps (linux & windows)PATH
Development:
s3secrets-helper
binaries viaMakefile