Skip to content

Commit 95efa78

Browse files
committed
cleanup
1 parent 037e808 commit 95efa78

File tree

5 files changed

+29
-7
lines changed

5 files changed

+29
-7
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM alpine/git:${ALPINE_GIT_VERSION}
44
ARG TARGETOS
55
ARG TARGETARCH
66

7-
ARG MASKCMD_VERSION=0.0.4
7+
ARG MASKCMD_VERSION=v0.0.8
88

99
RUN wget -O /usr/local/bin/maskcmd https://github.com/caseycs/maskcmd/releases/download/$MASKCMD_VERSION/maskcmd-$TARGETOS-$TARGETARCH \
1010
&& chmod +x /usr/local/bin/maskcmd

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,31 @@ Useful for bash scripts within K8S native pipelines, like Argo Workflows.
77

88
### Argo Workflow
99

10+
```bash
11+
kubectl apply -f argo-workflow-example/secret.yaml
12+
argo submit argo-workflow-example/example.yaml -w --log
13+
Name: maskcmd-example-mm2nj
14+
Namespace: default
15+
ServiceAccount: unset (will run with the default ServiceAccount)
16+
Status: Pending
17+
Created: Sun Mar 16 22:42:25 +0100 (now)
18+
Progress:
19+
maskcmd-example-mm2nj: + git clone https://x-token-auth:*****@bitbucket.org/project1/repo1.git
20+
maskcmd-example-mm2nj: Cloning into 'repo1'...
21+
maskcmd-example-mm2nj: remote: You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated.
22+
maskcmd-example-mm2nj: fatal: repository 'https://bitbucket.org/project1/repo1.git/' not found
23+
maskcmd-example-mm2nj: Error: child command returned exit code: 128
24+
maskcmd-example-mm2nj: time="2025-03-16T21:42:28.457Z" level=info msg="sub-process exited" argo=true error="<nil>"
25+
maskcmd-example-mm2nj: Error: exit status 128
26+
maskcmd-example-mm2nj Failed at 2025-03-16 22:42:35 +0100 CET
27+
```
28+
29+
Notice that there no `bitbucket-repo1-token` (secret value) in the output, but just asterisks (`*****@`).
30+
31+
[Example K8S manigests](/argo-workflow-example).
1032

1133

12-
### shell scripts
34+
### Shell scripts
1335

1436
Mask files content in certain dir:
1537

@@ -42,4 +64,4 @@ secret is *****
4264

4365
### Docker image
4466

45-
Based on recent [alpine/git](https://hub.docker.com/r/alpine/git): https://hub.docker.com/r/caseycs/maskcmd/tags
67+
[Dockerfile](/Dockerfile) is based on recent [alpine/git](https://hub.docker.com/r/alpine/git): https://hub.docker.com/r/caseycs/maskcmd/tags

argo-workflow-example/maskcmd-example.yaml renamed to argo-workflow-example/example.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ spec:
77
templates:
88
- name: demo
99
container:
10-
image: caseycs/maskcmd:v2.47.2-005
11-
command: [maskcmd, --secrets-dir, /secret/, sh, -ex, -c]
10+
image: caseycs/maskcmd:v2.47.2-008
11+
command: [maskcmd, --secrets-dir, /secret/, --, sh, -exc]
1212
args:
13-
- |
13+
- |
1414
git clone https://x-token-auth:$(cat /secret/bitbucket-repo1/token)@bitbucket.org/project1/repo1.git
1515
volumeMounts:
1616
- name: secret-bitbucket-repo1

argo-workflow-example/secret-docker-hub.yaml renamed to argo-workflow-example/secret.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ metadata:
44
name: bitbucket-repo1
55
type: Opaque
66
data:
7-
token: Yml0YnVja2V0LXJlcG8xLXRva2Vu
7+
token: bitbucket-repo1-token # bitbucket-repo1-token

maskcmd

-3.47 MB
Binary file not shown.

0 commit comments

Comments
 (0)