Skip to content

Commit f25a6c9

Browse files
authored
Fix credentials path (#12)
1 parent 8b02693 commit f25a6c9

File tree

1 file changed

+7
-7
lines changed
  • jenkins/jenkins-openshift-internal-registry

1 file changed

+7
-7
lines changed

jenkins/jenkins-openshift-internal-registry/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
This [example pipeline](Jenkinsfile) shows how to build, push, and then scan the Docker image in Openshift, using the service account credentials to push and scan from the Openshift internal registry.
44

55
The podTemplate in the example is composed by 4 containers:
6-
* **jnlp** container. Required for the Jenkins agent. Also, we mount the service account secret in `/home/jenkins/agent/.dockercfg` to convert the old dockercfg format to the new config.json format required by Kaniko:
6+
* **jnlp** container. Required for the Jenkins agent. Also, we mount the service account secret in `/tmp/.dockercfg` to convert the old dockercfg format to the new config.json format required by Kaniko:
77

88
```
9-
sh "echo -n \"{ \\\"auths\\\": \" > /home/jenkins/agent/config.json"
10-
sh "cat /home/jenkins/agent/.dockercfg >> /home/jenkins/agent/config.json"
11-
sh "echo \"}\" >>/home/jenkins/agent/config.json"
9+
sh "echo -n \"{ \\\"auths\\\": \" > /tmp/config.json"
10+
sh "cat /tmp/.dockercfg >> /tmp/config.json"
11+
sh "echo \"}\" >>/tmp/config.json"
1212
```
1313

1414
* **maven** container for building a Java application.
15-
* **builder** container, using [Kaniko](https://github.com/GoogleContainerTools/kaniko) to build a Docker image without requiring the Docker daemon. Once build, the image is pushed to the internal Openshift registry, using the credentials at `/home/jenkins/agent/config.json`.
16-
* **inline-scan** container, where the pipeline executes the `inline-scan.sh` script to analyze the image pushed to the internal Openshift registry, using the credentials from /home/jenkins/agent/config.json or using the .dockercfg file (two alternatives are provided).
15+
* **builder** container, using [Kaniko](https://github.com/GoogleContainerTools/kaniko) to build a Docker image without requiring the Docker daemon. Once build, the image is pushed to the internal Openshift registry, using the credentials at `/tmp/config.json`.
16+
* **inline-scan** container, where the pipeline executes the `inline-scan.sh` script to analyze the image pushed to the internal Openshift registry, using the credentials from /tmp/config.json or using the /tmp/.dockercfg file (two alternatives are provided).
1717

18-
See [Jenkins examples README.md](../README.md) for common usage tips and troubleshooting.
18+
See [Jenkins examples README.md](../README.md) for common usage tips and troubleshooting.

0 commit comments

Comments
 (0)