Created
January 24, 2021 02:53
-
-
Save pzduniak/7a4ec242aa0d48dfcb572e2389b2d2ba to your computer and use it in GitHub Desktop.
Sourcing secrets from Keybase in Concourse using KBFS
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
resources: | |
- name: keybase-image | |
type: registry-image | |
icon: docker | |
source: | |
repository: keybaseio/client | |
tag: 5.6.0-20201113121711-1a3ba10881 | |
jobs: | |
- name: source-secrets | |
plan: | |
- task: source-secrets | |
image: keybase-image | |
config: | |
platform: linux | |
outputs: | |
- name: secrets | |
params: | |
KEYBASE_SERVICE: "1" | |
KEYBASE_USERNAME: ((keybase-username)) | |
KEYBASE_PAPERKEY: ((keybase-paperkey)) | |
run: | |
path: /bin/bash | |
args: | |
- -c | |
- | | |
set -euxo pipefail | |
cat << EOF > /tmp/copy-secrets | |
keybase fs cp ((keybase-base-path))/secrets.json ./secrets/secrets.json | |
EOF | |
mkdir -p /home/keybase/.config/keybase /home/keybase/.cache/keybase | |
chmod +x /tmp/copy-secrets | |
chown -R keybase /home/keybase/.config/keybase /home/keybase/.cache/keybase | |
chmod a+w ./secrets | |
/usr/bin/entrypoint.sh /tmp/copy-secrets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment