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

Vault support #22

Merged
merged 1 commit into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ indent_style = space
indent_size = 4
max_line_length = 80
trim_trailing_whitespace = true

[*.sh]
shell_variant = posix

[*.{bash,bats}]
shell_variant = bash
32 changes: 25 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:

- name: Run checkbashisms
run: checkbashisms -p scripts/*

unit-tests:
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
Expand All @@ -47,10 +48,10 @@ jobs:
os: [ubuntu-latest, macos-latest] # [dash, zsh]
container: [~]
include:
- os: ubuntu-latest
container: alpine # ash
- os: ubuntu-latest
container: centos:8 # bash
- os: ubuntu-latest
container: alpine # ash
- os: ubuntu-latest
container: centos:8 # bash
steps:
- name: Install git & curl
run: |-
Expand All @@ -69,11 +70,15 @@ jobs:
with:
version: v3.2.0

- name: Setup vault
uses: volcano-coffee-company/setup-vault@v1
with:
version: '1.4.1'

- name: Install dependencies
run: |-
mkdir -p "$GITHUB_WORKSPACE/bin"
echo "::add-path::$GITHUB_WORKSPACE/bin/"
#export PATH="$GITHUB_WORKSPACE/bin/:$PATH"

curl -sSfL "https://github.com/mozilla/sops/releases/download/v${SOPS_VERSION}/sops-v${SOPS_VERSION}.$(uname | awk '{print tolower($0)}')" -z "$GITHUB_WORKSPACE/bin/sops" -o "$GITHUB_WORKSPACE/bin/sops"
chmod +x "$GITHUB_WORKSPACE/bin/sops"
Expand All @@ -82,15 +87,28 @@ jobs:
run: |-
tests/bats/core/install.sh "$GITHUB_WORKSPACE"

echo "Shell: $(readlink /bin/sh)"
echo "Shell: $(readlink /bin/sh || readlink /var/select/sh)"
bats -v
sops --version
gpg --version

- name: helm plugin install
run: helm plugin install .

- run: bats --tap -r tests/unit
- name: HELM_SECRETS_DRIVER=sops bats --tap -r tests/unit
run: |
bats --tap -r tests/unit
env:
HELM_SECRETS_DRIVER: sops

- name: HELM_SECRETS_DRIVER=vault bats --tap -r tests/unit
run: |
vault server -dev -dev-root-token-id=test &>/dev/null &
bats --tap -r tests/unit
env:
HELM_SECRETS_DRIVER: vault
VAULT_ADDR: 'http://127.0.0.1:8200'

integration-tests:
needs: [unit-tests]
runs-on: ubuntu-latest
Expand Down
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
*.iml
/.idea/

tests/.home/
tests/.tmp/
tests/assets/**/*.yaml.dec
tests/assets/**/*.yaml.test
tests/assets/**/*.tmp.yaml
/tests/.tmp/
/tests/coverage/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2020 Jan-Otto Kröpke <helm@jkroepke.de>
Copyright 2020 Jan-Otto Kröpke (jkroepke) <mail@jkroepke.de>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading