Skip to content

Commit

Permalink
Improve docs on config.json
Browse files Browse the repository at this point in the history
  • Loading branch information
kyounger committed Apr 15, 2020
1 parent e1013f6 commit 1d9172d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ kubectl create secret docker-registry docker-credentials \
--docker-email=""
```

### How to create a Jenkins secret file that contains config.json
### Create config.json for use elsewhere
You can use the same kubectl command and just use it locally to generate the file via --dry-run
```
kubectl create secret docker-registry docker-credentials \
--docker-username="" \
--docker-password="" \
--docker-email="" --dry-run=client -o jsonpath='{.data.\.dockerconfigjson}' | base64 -D > config.json
```

### How to add config.json as secret file credential
1. Navigate to credentials
2. Navigate to your domain
3. Add Credentials
Expand Down
1 change: 1 addition & 0 deletions k8sSecret-declarative.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pipeline {
kubernetes {
defaultContainer 'kaniko'
yaml """
apiVersion: v1
kind: Pod
metadata:
name: kaniko
Expand Down

0 comments on commit 1d9172d

Please sign in to comment.