Skip to content

Commit 79f14ee

Browse files
author
Julien
committed
Fix lint
1 parent 31521dd commit 79f14ee

3 files changed

Lines changed: 17 additions & 20 deletions

File tree

.github/workflows/build_and_test.yaml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,18 @@ jobs:
1717
strategy:
1818
matrix:
1919
include:
20-
- python-version-short: "3.8"
21-
python-version: 3.8.18
22-
vault-version: "1.12.5-1"
23-
hvac-gh-tag: "v1.1.1"
2420
- python-version-short: "3.9"
2521
python-version: 3.9.21
26-
vault-version: "1.12.5-1"
27-
hvac-gh-tag: "v1.1.1"
22+
vault-version: "2.0.0-1"
23+
hvac-gh-tag: "v2.4.0"
2824
- python-version-short: "3.10"
2925
python-version: 3.10.16
30-
vault-version: "1.12.5-1"
31-
hvac-gh-tag: "v1.1.1"
26+
vault-version: "2.0.0-1"
27+
hvac-gh-tag: "v2.4.0"
3228
- python-version-short: "3.11"
3329
python-version: 3.11.11
34-
vault-version: "1.12.5-1"
35-
hvac-gh-tag: "v1.1.1"
30+
vault-version: "2.0.0-1"
31+
hvac-gh-tag: "v2.4.0"
3632
steps:
3733
- name: Checkout Pack Repo and CI Repos
3834
uses: StackStorm-Exchange/ci/.github/actions/checkout@master
@@ -63,8 +59,8 @@ jobs:
6359
working-directory: pack
6460
shell: bash
6561
run: |
66-
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/hashicorp.gpg
67-
echo "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
62+
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/hashicorp.gpg
63+
echo "deb [arch=amd64, signed-by=/etc/apt/trusted.gpg.d/hashicorp.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
6864
| sudo tee /etc/apt/sources.list.d/hashicorp.list
6965
7066
sudo apt update \
@@ -77,6 +73,8 @@ jobs:
7773
# We disble cap_ipc_lock here as its generally incompatabile with GitHub
7874
# Actions' runtime environments.
7975
sudo setcap cap_ipc_lock= /usr/bin/vault
76+
systemctl restart consul vault
77+
systemctl status consul vault
8078
8179
- name: Setup hvac symlinks
8280
shell: bash

actions/unwrap_secret.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import json
21
from lib import action
3-
import hvac
2+
import hvac
3+
44

55
class VaultUnwrapSecretAction(action.VaultBaseAction):
66
def run(self, token, profile_name=None):
77
super().run(profile_name=profile_name)
88
try:
99
resp = self.vault.sys.unwrap(token)
1010
except hvac.exceptions.InvalidRequest as e:
11-
return(False, f"{e}")
12-
11+
return (False, f"{e}")
12+
1313
return (True, resp)

actions/wrap_secret.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import json
21
from lib import action
32

43

54
class VaultWrapSecretAction(action.VaultBaseAction):
65
def run(self, secret, ttl, profile_name=None):
7-
super().run(profile_name=profile_name)
8-
resp = self.vault.sys.wrap(payload=secret, ttl=ttl)
9-
return (True, resp)
6+
super().run(profile_name=profile_name)
7+
resp = self.vault.sys.wrap(payload=secret, ttl=ttl)
8+
return (True, resp)

0 commit comments

Comments
 (0)