Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(jenkins-pipeline): Create docker-config Secret From env vars #1054

Merged
merged 3 commits into from
Sep 4, 2022

Conversation

daniel-hutao
Copy link
Member

@daniel-hutao daniel-hutao commented Sep 4, 2022

Signed-off-by: Daniel Hu tao.hu@merico.dev

Pre-Checklist

Note: please complete ALL items in the following checklist.

  • I have read through the CONTRIBUTING.md documentation.
  • My code has the necessary comments and documentation (if needed).
  • I have added relevant tests

Description

  1. Read the HARBOR_PASSWORD from env var
  2. Set HARBOR_URL, HARBOR_PASSWORD, HARBOR_PASSWORD to k8s Secret

Related Issues

#993

New Behavior (screenshots if needed)

test

After dtm apply,

  • k get secret -n jenkins docker-config -o yaml
apiVersion: v1
data:
  config.json: ewoiYXV0aHMiOiB7CiAgICJodHRwOi8vaGFyYm9yLmV4YW1wbGUuY29tOjgwIjogewogICAgICJhdXRoIjogIllXUnRhVzQ2ZUhoNCIKICAgfQp9
immutable: false
kind: Secret
metadata:
  creationTimestamp: "2022-09-04T05:59:06Z"
  name: docker-config
  namespace: jenkins
  resourceVersion: "166249"
  uid: 850f0cd5-b80a-4cac-97f5-23fbb04559b3
type: Opaque
  • echo "ewoiYXV0aHMiOiB7CiAgICJodHRwOi8vaGFyYm9yLmV4YW1wbGUuY29tOjgwIjogewogICAgICJhdXRoIjogIllXUnRhVzQ2ZUhoNCIKICAgfQp9" | base64 -d
{
"auths": {
   "http://harbor.example.com:80": {
     "auth": "YWRtaW46eHh4"
   }
}%
  • echo "YWRtaW46eHh4" | base64 -d
admin:xxx%

…ipeline

Signed-off-by: Daniel Hu <tao.hu@merico.dev>
@daniel-hutao daniel-hutao changed the title Feat(jenkins-pipeline): Create docker-config Secret From env vars Feat(jenkins-pipeline): Create docker-config Secret From env vars Sep 4, 2022
@daniel-hutao daniel-hutao marked this pull request as ready for review September 4, 2022 06:04
@daniel-hutao daniel-hutao requested a review from a team as a code owner September 4, 2022 06:04
Signed-off-by: Daniel Hu <tao.hu@merico.dev>
@steinliber steinliber merged commit 521c49e into devstream-io:main Sep 4, 2022
@daniel-hutao daniel-hutao removed the request for review from aFlyBird0 September 4, 2022 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants