Skip to content

Commit

Permalink
Merge pull request #22 from jkroepke/vault
Browse files Browse the repository at this point in the history
WIP: Vault support
  • Loading branch information
jkroepke authored May 6, 2020
2 parents 42d9314 + 61e82da commit 3b9c0b2
Show file tree
Hide file tree
Showing 90 changed files with 2,931 additions and 2,269 deletions.
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

0 comments on commit 3b9c0b2

Please sign in to comment.