{"id":17982970,"url":"https://github.com/minghsu0107/update-kustomization","last_synced_at":"2025-03-25T19:31:49.830Z","repository":{"id":45773635,"uuid":"373467954","full_name":"minghsu0107/update-kustomization","owner":"minghsu0107","description":"A CI plugin for updating image tags with kustomize.","archived":false,"fork":false,"pushed_at":"2022-07-16T06:52:48.000Z","size":28,"stargazers_count":6,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T17:39:03.596Z","etag":null,"topics":["cicd","droneci","gitops","kustomize"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minghsu0107.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-03T10:25:25.000Z","updated_at":"2022-07-20T03:38:15.000Z","dependencies_parsed_at":"2022-08-28T11:51:43.055Z","dependency_job_id":null,"html_url":"https://github.com/minghsu0107/update-kustomization","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minghsu0107%2Fupdate-kustomization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minghsu0107%2Fupdate-kustomization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minghsu0107%2Fupdate-kustomization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minghsu0107%2Fupdate-kustomization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minghsu0107","download_url":"https://codeload.github.com/minghsu0107/update-kustomization/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245530321,"owners_count":20630530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","droneci","gitops","kustomize"],"created_at":"2024-10-29T18:15:44.411Z","updated_at":"2025-03-25T19:31:47.406Z","avatar_url":"https://github.com/minghsu0107.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Update Kustomization\nAn CI image for updating image tags using kustomize.\n\nEnvironment variables:\n- `SSH_KEY`: Base64-encoded private ssh key of `MANIFEST_USER`\n- `MANIFEST_HOST`: Manifest git server host\n- `MANIFEST_USER`: Manifest git user name\n- `MANIFEST_USER_EMAIL`: Manifest git user email\n- `MANIFEST_REPO`: Manifest git repository\n- `MANIFEST_BRANCH`: Manifest repository branch\n- `IMAGES`: Updated images (comma-separated list)\n- `IMAGE_TAG`: Image tag generated in current build\n- `KUSTOMIZATION`: Kustomization path relative to the project root\n## Drone Usage Example\n```yaml\nkind: pipeline\nname: publish-mysvc1\nsteps:\n- name: publish\n  image: plugins/docker\n  settings:\n    context: mysvc1\n    dockerfile: mysvc1/Dockerfile\n    username:\n      from_secret: docker_username\n    password:\n      from_secret: docker_password\n    registry: harbor.mycompany.com\n    repo: harbor.mycompany.com/myuser/mysvc1\n    tags:\n    - ${DRONE_COMMIT_BRANCH}-${DRONE_COMMIT_SHA:0:7}\n    - latest\n  when:\n    event: push\n\n---\nkind: pipeline\nname: publish-mysvc2\nsteps:\n- name: publish\n  image: plugins/docker\n  settings:\n    context: mysvc2\n    dockerfile: mysvc2/Dockerfile\n    username:\n      from_secret: docker_username\n    password:\n      from_secret: docker_password\n    registry: harbor.mycompany.com\n    repo: harbor.mycompany.com/myuser/mysvc2\n    tags:\n    - ${DRONE_COMMIT_BRANCH}-${DRONE_COMMIT_SHA:0:7}\n    - latest\n  when:\n    event: push\n    \n---\nkind: pipeline\nname: update-kustomization\nsteps:\n- name: kustomization\n  pull: if-not-exists\n  image: minghsu0107/update-kustomization\n  environment:\n    SSH_KEY:\n      from_secret: ssh_key\n    MANIFEST_HOST: git.mycompany.com\n    MANIFEST_USER: myuser\n    MANIFEST_USER_EMAIL: myuser@mycompany.com\n    MANIFEST_REPO: myapp-manifests\n    MANIFEST_BRANCH: main\n    IMAGES: harbor.mycompany.com/myuser/mysvc1,harbor.mycompany.com/myuser/mysvc2\n    IMAGE_TAG: ${DRONE_COMMIT_BRANCH}-${DRONE_COMMIT_SHA:0:7}\n    KUSTOMIZATION: overlays/production\n  when:\n    event: push\ndepends_on:\n - publish-mysvc1\n - publish-mysvc2\n```\nIn the above example, the image tag is in the form of `${DRONE_COMMIT_BRANCH}-${DRONE_COMMIT_SHA:0:7}`, where `DRONE_COMMIT_BRANCH` and `DRONE_COMMIT_SHA` are environment variables provided by Drone at run time. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminghsu0107%2Fupdate-kustomization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminghsu0107%2Fupdate-kustomization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminghsu0107%2Fupdate-kustomization/lists"}