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

Add quotes in command #467

Merged
merged 77 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
13ab2c0
Update plugin.yaml
jkroepke Jul 30, 2024
e27b52b
Update plugin.yaml
jkroepke Jul 30, 2024
2bfa8f8
Update plugin.yaml
jkroepke Jul 30, 2024
93e4036
Update sh.cmd
jkroepke Jul 30, 2024
3bf7e1b
Update ci.yaml
jkroepke Jul 30, 2024
cb617be
Update ci.yaml
jkroepke Jul 30, 2024
3409c70
Update sh.cmd
jkroepke Jul 30, 2024
4db7182
Update sh.cmd
jkroepke Jul 30, 2024
bd33649
Update ci.yaml
jkroepke Jul 30, 2024
9187c9d
fix
jkroepke Jul 30, 2024
6fd5172
Update sh.cmd
jkroepke Jul 30, 2024
02d717c
Add space dir tests
jkroepke Aug 2, 2024
e12876b
Add space dir tests
jkroepke Aug 2, 2024
c53400f
Add space dir tests
jkroepke Aug 2, 2024
00d6fb0
Add space dir tests
jkroepke Aug 3, 2024
fbc1b34
Add space dir tests
jkroepke Aug 3, 2024
2a6aea6
Add space dir tests
jkroepke Aug 3, 2024
5244fa8
Add space dir tests
jkroepke Aug 3, 2024
3ebbca3
Add space dir tests
jkroepke Aug 3, 2024
de91e9b
Add space dir tests
jkroepke Aug 3, 2024
10310fb
Add space dir tests
jkroepke Aug 3, 2024
823214e
Add space dir tests
jkroepke Aug 3, 2024
6483303
Add space dir tests
jkroepke Aug 3, 2024
e46aab5
Add space dir tests
jkroepke Aug 3, 2024
4dd9b81
Update run.cmd
jkroepke Aug 3, 2024
761ed8c
Update run.sh
jkroepke Aug 3, 2024
1526eec
Update plugin.yaml
jkroepke Aug 3, 2024
7deaa69
Add space dir tests
jkroepke Aug 3, 2024
290c6cc
Add space dir tests
jkroepke Aug 3, 2024
2a6caa2
Add space dir tests
jkroepke Aug 3, 2024
8411e3b
Add space dir tests
jkroepke Aug 3, 2024
b286d04
Add space dir tests
jkroepke Aug 3, 2024
c086e85
Add space dir tests
jkroepke Aug 3, 2024
249db22
Update template.bats
jkroepke Aug 6, 2024
bfe7e1a
Update template.bats
jkroepke Aug 6, 2024
01720e3
Update template.bats
jkroepke Aug 6, 2024
474c05f
Update template.bats
jkroepke Aug 6, 2024
0539cc5
Update template.bats
jkroepke Aug 7, 2024
4eb79ed
Update template.bats
jkroepke Aug 7, 2024
9e43d25
Update template.bats
jkroepke Aug 7, 2024
37c435f
Update template.bats
jkroepke Aug 7, 2024
825012e
Update template.bats
jkroepke Aug 7, 2024
0c8d814
Update template.bats
jkroepke Aug 7, 2024
7a97f69
Update template.bats
jkroepke Aug 7, 2024
f4cf5d5
Update template.bats
jkroepke Aug 7, 2024
e137ad2
Update template.bats
jkroepke Aug 7, 2024
6d51d5b
Update template.bats
jkroepke Aug 7, 2024
8083bc6
Update template.bats
jkroepke Aug 7, 2024
ac763c2
Update template.bats
jkroepke Aug 7, 2024
5f15629
Update template.bats
jkroepke Aug 7, 2024
673ec2f
Update template.bats
jkroepke Aug 7, 2024
8fbf18d
Update template.bats
jkroepke Aug 7, 2024
c8c6771
Update template.bats
jkroepke Aug 7, 2024
ffeb974
Add space dir tests
jkroepke Aug 8, 2024
19e7fdf
Add space dir tests
jkroepke Aug 8, 2024
8480e50
Add space dir tests
jkroepke Aug 8, 2024
e858080
Add space dir tests
jkroepke Aug 8, 2024
9995980
Add space dir tests
jkroepke Aug 8, 2024
5db8c67
Add space dir tests
jkroepke Aug 8, 2024
28478f5
Add space dir tests
jkroepke Aug 8, 2024
9e85c29
Add space dir tests
jkroepke Aug 8, 2024
93b1799
Add space dir tests
jkroepke Aug 8, 2024
c50bec1
Add space dir tests
jkroepke Aug 8, 2024
f901442
Update template.bats
jkroepke Aug 8, 2024
13c1cda
Update template.bats
jkroepke Aug 8, 2024
c74ff3e
Update template.bats
jkroepke Aug 8, 2024
5aa29fa
Update template.bats
jkroepke Aug 8, 2024
8f65e24
Update template.bats
jkroepke Aug 8, 2024
f99bafa
Update template.bats
jkroepke Aug 8, 2024
bbae117
Update template.bats
jkroepke Aug 8, 2024
50583cd
Update template.bats
jkroepke Aug 8, 2024
f2bacd0
Update template.bats
jkroepke Aug 8, 2024
ab95db8
Update template.bats
jkroepke Aug 8, 2024
817d04c
Update template.bats
jkroepke Aug 8, 2024
eae4e98
Update template.bats
jkroepke Aug 8, 2024
bc7970f
Update template.bats
jkroepke Aug 8, 2024
2927820
Update template.bats
jkroepke Aug 8, 2024
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
21 changes: 8 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: CI

env:
WSLENV: "HELM_SECRETS_BACKEND:BATS_REPORT_FILENAME:BATS_TEST_NAME_PREFIX"
VERSION_HELM: v3.12.3
VERSION_SOPS: v3.8.1
VERSION_VALS: v0.26.2
VERSION_HELM: v3.15.3
VERSION_SOPS: v3.9.0
VERSION_VALS: v0.37.3

on:
pull_request:
Expand All @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run the sh-checker
uses: luizm/[email protected]
env:
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
# this is to fix https://github.com/actions/checkout/issues/760
- run: git config --global --add safe.directory /__w/helm-secrets/helm-secrets

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -178,19 +178,14 @@ jobs:
run: wsl bash -c 'apt-get update -qq && apt-get install -yqq parallel'

- name: Print Environment
continue-on-error: true
run: |-
bash -c 'echo "Shell: $(readlink /bin/sh || readlink /var/select/sh || echo unknown)"'
bash tests/bats/core/bin/bats -v
sops --version
gpg --version
vals version

- name: Print Environment (Windows)
if: "contains(matrix.os, 'windows-latest')"
run: |-
scripts/wrapper/sh.cmd --version
scripts/wrapper/sh.cmd -c -- "uname -a"

- name: Run helm-secrets w/o bats
run: |-
helm plugin install "${{ github.event_name == 'pull_request'
Expand Down Expand Up @@ -232,7 +227,7 @@ jobs:
BATSLIB_TEMP_PRESERVE: "0"
BATSLIB_TEMP_PRESERVE_ON_FAILURE: "0"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
Expand Down Expand Up @@ -321,7 +316,7 @@ jobs:

- run: kubectl cluster-info

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Package helm-secrets
run: tar --transform 's,^,helm-secrets/,' --exclude=contrib --exclude=examples --exclude=tests --exclude=helm-secrets.tar.gz -zcvf helm-secrets.tar.gz *
Expand All @@ -37,7 +37,7 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- run: >-
sed -i 's/HELM_SECRETS_VERSION=".*"/HELM_SECRETS_VERSION="'${GITHUB_REF_NAME/v}'"/g' docs/ArgoCD\ Integration.md
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wiki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: ${{ github.repository }}.wiki
path: wiki
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ Run decrypted command on specific value files.
This is method is preferred over the plugin command below.
This mode is used in [ArgoCD](https://github.com/jkroepke/helm-secrets/wiki/ArgoCD-Integration) environments.

On Windows, the command `helm secrets patch windows` needs to be run first.

```bash
helm upgrade name . -f secrets://secrets.yaml
```
Expand Down
1 change: 0 additions & 1 deletion docs/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Available Commands:
decrypt Decrypt secrets file
edit Edit secrets file and encrypt afterwards
dir Get plugin directory
patch Enables windows specific adjustments
<cmd> wrapper that decrypts encrypted yaml files before running helm <cmd>

Available Options:
Expand Down
4 changes: 2 additions & 2 deletions plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ useTunnel: false
command: "$HELM_PLUGIN_DIR/scripts/run.sh"
platformCommand:
- os: windows
command: "cmd /c $HELM_PLUGIN_DIR\\scripts\\wrapper\\sh.cmd $HELM_PLUGIN_DIR\\scripts\\run.sh"
#command: "powershell -noprofile -executionpolicy bypass -file $HELM_PLUGIN_DIR\\scripts\\wrapper\\sh.ps1 $HELM_PLUGIN_DIR\\scripts\\run.sh"
command: >-
cmd /c $HELM_PLUGIN_DIR\scripts\wrapper\run.cmd

downloaders:
- command: "scripts/run.sh downloader"
Expand Down
1 change: 0 additions & 1 deletion scripts/commands/help.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Available Commands:
decrypt Decrypt secrets file
edit Edit secrets file and encrypt afterwards
dir Get plugin directory
patch Enables windows specific adjustments
<cmd> wrapper that decrypts encrypted yaml files before running helm <cmd>

Available Options:
Expand Down
33 changes: 0 additions & 33 deletions scripts/commands/patch.sh

This file was deleted.

6 changes: 6 additions & 0 deletions scripts/lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ CYGWIN* | MINGW64_NT*)
fi
}
_helm_winpath() { _winpath "$@"; }

_sed_i 's! - command: .*! - command: "scripts/wrapper/run.cmd downloader"!' "${HELM_PLUGIN_DIR}/plugin.yaml"
;;
Darwin)
case $(sed --help 2>&1) in
Expand All @@ -133,3 +135,7 @@ Darwin)
fi
;;
esac

if on_wsl || on_cygwin; then
_sed_i 's! - command: .*! - command: "scripts/wrapper/run.cmd downloader"!' "${HELM_PLUGIN_DIR}/plugin.yaml"
fi
8 changes: 0 additions & 8 deletions scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ if [ "${LOAD_GPG_KEYS}" != "false" ]; then
fi

if [ -n "${HELM_SECRET_WSL_INTEROP+x}" ]; then
shift
argc=$#
j=0

Expand Down Expand Up @@ -158,13 +157,6 @@ while true; do
downloader "$2" "$3" "$4" "$5"
break
;;
patch)
# shellcheck source=scripts/commands/patch.sh
. "${SCRIPT_DIR}/commands/patch.sh"

patch "$2"
break
;;
--help | -h | help)
# shellcheck source=scripts/commands/help.sh
. "${SCRIPT_DIR}/commands/help.sh"
Expand Down
Loading
Loading