drone-helm3 icon indicating copy to clipboard operation
drone-helm3 copied to clipboard

WIP: support github runner action

Open pradeepbbl opened this issue 2 years ago • 3 comments

Feature: This is an initial draft idea to add support for github action there are few plugin already available in the market place but not good as this. So far the test are success but I would like to know your thoughts before make more changes/test.

This feature was control by environment var i.e runner when set to 'github', the envcofig prefix was set to INPUT (default is PLUGIN)

Sample Github Workflow

---
on: 
  push:
    branches:
      - master
jobs: 
  publish:
    runs-on: vm
    name: Deploy using Helm3
    needs: [build, lint]
    steps:
      - name: Checkout helm chart
        uses: actions/checkout@v3
        with:
          repository: spawnlab-dev/helm-spawnlab-apis
          token: ${{ secrets.PAT_TOKEN }}
          path: "spawnlab-apis"
  
      - name: Run lint
        env:
          runner: "github"
        id: helm-lint
        uses: spawnlab-dev/drone-helm3@pmishra/github_action
        with:
          mode: lint
          chart: ./spawnlab-apis

Screenshot 2023-10-09 at 14 10 57

Pre-merge checklist:

  • [x] Code changes have tests
  • [ ] Any config changes are documented:
    • If the change touches required config, there's a corresponding update to README.md
    • There's a corresponding update to docs/parameter_reference.md
    • There's a pull request to update the parameter reference in drone-plugin-index
  • [x] Any large changes have been verified by running a Drone job

pradeepbbl avatar Oct 09 '23 12:10 pradeepbbl

@pradeepbbl thanks for the proposed updates and I don't see anything against supporting both drone and github actions. It might be worth also refactoring the repo name and some other documentation if it's going to be a more generic helm runner. I haven't looked at creating github actions plugins but I'll take a look but definitely down to support it. I do imagine we just want it to be built by drone or actions and not both long run.

josmo avatar Oct 09 '23 15:10 josmo

@josmo thanks for the quick response I will continue with the testing and will share the updates soon.

pradeepbbl avatar Oct 09 '23 20:10 pradeepbbl

The test was success and able to build & test local build (based on current branch). I'll run few more test e.g. upgrade, uninstall etc.

Drone Build (local):

Screenshot 2023-10-10 at 01 32 03

Drone test run (local):

Screenshot 2023-10-10 at 01 28 20

pradeepbbl avatar Oct 09 '23 23:10 pradeepbbl