GithubHelp home page GithubHelp logo

isabella232 / action-helm-artifactory Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elastic/action-helm-artifactory

0.0 0.0 0.0 25 KB

Github action to test and push helm to artifactory

License: Apache License 2.0

Shell 98.93% Dockerfile 1.07%

action-helm-artifactory's Introduction

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

CHART_DIR: manifests/charts/mycomponent # path where the helm chart is located
ARTIFACTORY_URL: # Artifactory registry https://<company>.jfrog.io/<company>

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 secrets

OR

ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} # ARTIFACTORY_API_KEY (Artifactory api key) must be set in GitHub Repo secrets

Optional Environment variables

CHART_VERSION: # Overide 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

name: Helm lint, test, package and publish

on: 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

name: Helm lint, test, package and publish

on:
  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 }}

action-helm-artifactory's People

Contributors

mbovo avatar wandergeek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.