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

Add more CI/CD Integration examples #493

Open
mclarkex opened this issue Feb 16, 2023 · 0 comments
Open

Add more CI/CD Integration examples #493

mclarkex opened this issue Feb 16, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@mclarkex
Copy link

mclarkex commented Feb 16, 2023

Description of the problem/feature request
Provide more examples of how to integrate kube-linter into other CI/CD tools for wider adoption and usage.

Description of the existing behavior vs. expected behavior

Current documentation is limited regarding how to integrate with other CI/CD tools.

I've provided a working example of getting kube-linting working for Kubernetes and Helm within Concourse CI Concourse is a popular Go-based CI tool used at a lot of large organisations.

  1. Create a new resource_type:
resource_types:
 - name: kubelinter-image
    type: docker-image 
    source: 
      repository: stackrox/kube-linter 
      tag: latest
  1. Create a resource where your Kubernetes for helm files are stored
- name: platform-code
  type: git
  icon: github
  source: 
    uri:   git@github.com:/orginisation/platform-code.git
    branch: main
    private_key: ((xxxxxx)) #Your SSH key 
  1. Create a new job pulling in your Kubernetes or helm files
jobs:
- name: kube-linting
  plan:
    - get: platform-code #Your repository with 
      trigger: true 
    - task: kube-linting
      config:
        platform: linux
        image_resource:
          type: docker-image
          source:
            repository: stackrox/kube-linter 
            tag: latest
        inputs:
          - name: platform-code
        run: 
          path: /kube-linter 
          args: 
          - lint
          - platform-code/kubernetes/kubernetes-manifiest.yaml
  • The syntax within Concourse requires kube-linter arguments to be passed on two separate lines

Syntax error
image

Working Example Output:
image

Additional context

This is a relatively simple issue, I would like to raise a PR to add it into the ReadMes, but if accepted I will raise a PR with Concourse to add kube-linter to a list of valid resource types as outlined here: https://github.com/concourse/resource-types and here https://resource-types.concourse-ci.org/

Will provide an example for Azure DevOps aswell.

@janisz janisz added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed labels Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants