Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbovo/action-helm-artifactory
Github action to test and push helm to artifactory
https://github.com/mbovo/action-helm-artifactory
artifactory github-action github-actions helm
Last synced: 2 months ago
JSON representation
Github action to test and push helm to artifactory
- Host: GitHub
- URL: https://github.com/mbovo/action-helm-artifactory
- Owner: mbovo
- License: apache-2.0
- Created: 2021-09-24T20:33:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T05:56:49.000Z (8 months ago)
- Last Synced: 2024-05-01T17:01:49.238Z (8 months ago)
- Topics: artifactory, github-action, github-actions, helm
- Language: Shell
- Homepage:
- Size: 34.2 KB
- Stars: 2
- Watchers: 2
- Forks: 10
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# action-helm-artifactory
GitHub Action for packaging, testing helm charts and publishing to Artifactory helm repo
_Note this action is written to specifically work with Helm repos in Artifactory_
## Inputs
### Required
`action` - `[check, dependency, lint, package, check_push, push]`
- `check` - Runs all checks on helm chart (dependency build, lint, package)
- `dependency` - Run dependency build on the target helm chart
- `lint` - Run helm lint on the target chart
- `package` - Run helm package on the target chart
- `check_push` - Runs all tests and upload the chart to artifactory
- `push` - Uses helm artifactory plugin to uploads the chart## Required Environment variables
```yaml
CHART_DIR: manifests/charts/mycomponent # path where the helm chart is located
ARTIFACTORY_URL: # Artifactory registry https://.jfrog.io/ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} # ARTIFACTORY_USERNAME (Artifactory username) must be set in GitHub Repo secrets
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} # ARTIFACTORY_PASSWORD (Artifactory password) must be set in GitHub Repo secretsOR
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} # ARTIFACTORY_API_KEY (Artifactory api key) must be set in GitHub Repo secrets
```## Optional Environment variables
```yaml
CHART_VERSION: # Override helm chart version when pushing
HELM_VERSION: # Override helm version. Default "3.5.1"
HELM_ARTIFACTORY_PLUGIN_VERSION: # Override helm artifactory plugin version. Default "v1.0.2"
CHART_VERSION: # if defined override version in Chart.yaml. Default is unset
```## Example workflow
Perform all checks on pull requests
```yaml
name: Helm lint, test, package and publishon: pull_request
jobs:
helm-suite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2# - name: myOtherJob1
# run:- name: "Helm checks"
uses: mbovo/[email protected]
with:
action: "check"
env:
CHART_DIR: resources/helm/minechart
ARTIFACTORY_URL: https://artifactory.zroot.org:443/artifactory/helm-local/
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
```Push helm charts on merge/commits on main branch
```yaml
name: Helm lint, test, package and publishon:
push:
branches: ["main"]jobs:
helm-suite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2# - name: myOtherJob1
# run:- name: "Helm publish"
uses: mbovo/[email protected]
with:
action: "push"
env:
CHART_DIR: resources/helm/minechart
ARTIFACTORY_URL: https://artifactory.zroot.org:443/artifactory/helm-local/
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
```