diff --git a/dev_guide/builds.adoc b/dev_guide/builds.adoc index 43891e298a61..11de4b57a380 100644 --- a/dev_guide/builds.adoc +++ b/dev_guide/builds.adoc @@ -826,49 +826,20 @@ repository: + ==== ---- -$ oc create -f secret.json +$ oc secrets new scmsecret ssh-privatekey=$HOME/.ssh/id_rsa ---- ==== -. The `*data*` field for the `*secret*` must contain your private key with the -value set to the base64-encoded content of that file: -+ -==== ----- -$ base64 -w 0 $HOME/.ssh/id_rsa -6yJodHRwc1ovL2zuZGV4LmRvY21lci5aby92MS8iOnsiYXV0aCI6ImJXWnZhblJwYXpwdVoybGxkR2d4TUE9PSIsImVtYWlsIj8ibWlAbWlmby5zayJ9fQ== ----- -==== - -. Copy the value returned from the above command and place it into the -`ssh-privatekey` field in `*_secret.json_*` file: +. Add the `*secret*` to the builder service account: + ==== ---- -{ - "kind": "Secret", - "apiVersion": "v1", - "metadata": { - "name": "scmsecret" - }, - "data": { - "ssh-privatekey": "6yJodHRwc1ovL2zuZGV4LmRvY21lci5aby92MS8iOnsiYXV0aCI6ImJXWnZhblJwYXpwdVoybGxkR2d4TUE9PSIsImVtYWlsIj8ibWlAbWlmby5zayJ9fQ==" - }, - "type": "Opaque" -} +$ oc secrets add serviceaccount/builder secrets/scmsecret ---- ==== -. Create a second `*secret*` for Docker from the *_secret.json_* file: -+ -==== - ----- -$ oc create -f secret.json ----- -==== . Add a `*sourceSecret*` field into the `*source*` section inside the buildConfig and set it to the name of the `*secret*` that you created, in this