Skip to content

Commit

Permalink
major tekton cleanup
Browse files Browse the repository at this point in the history
* update minimum workflow to allign with new minimum
* add tekton typical workflow
* update everything workflow to align with new everything
* add reporting to finally
* move all charts starting with 'ploigos-workflow-' to 'charts/plogigos-workflow/' and remove the prefix to work around helm/chart-testing#343
* update README to reflect local testing updates
* update to use 'ref' instead of 'name' for EventListener TriggerTemplate references due to deprivation of 'name' parameter
* .github workflows
  * in testing kind cluster create default IngressClass
  * upgrade testing to use helm 3.6.1
  • Loading branch information
itewk committed Jun 22, 2021
1 parent 172234c commit 9762ee4
Show file tree
Hide file tree
Showing 74 changed files with 1,979 additions and 256 deletions.
21 changes: 21 additions & 0 deletions .github/scripts/configure-kube.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

echo "Install ingress controller"
helm repo add haproxy-ingress https://haproxy-ingress.github.io/charts
helm install haproxy-ingress haproxy-ingress/haproxy-ingress \
--create-namespace --namespace=ingress-controller \
--set controller.hostNetwork=true
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: haproxy
annotations:
ingressclass.kubernetes.io/is-default-class: 'true'
spec:
controller: haproxy-ingress.github.io/controller
EOF

echo "Install tekton"
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.22.0/release.yaml
kubectl apply --filename https://storage.googleapis.com/tekton-releases/triggers/previous/v0.12.1/release.yaml
9 changes: 9 additions & 0 deletions .github/scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# NOTE:
# --validate-chart-schema=false due to https://github.com/helm/chart-testing/pull/300

ct lint \
--chart-dirs charts/ploigos-workflow/ \
--all \
--validate-maintainers=false
5 changes: 5 additions & 0 deletions .github/scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

ct install \
--chart-dirs charts/ploigos-workflow/ \
--all
33 changes: 8 additions & 25 deletions .github/workflows/publish-helm-charts-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,18 @@ jobs:
- name: Setup Helm 🧰
uses: azure/setup-helm@v1
with:
version: v3.4.1
version: v3.6.1

- name: Setup Python 🧰🐍
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Setup chart-testing 🧰
uses: helm/chart-testing-action@v2.0.1
uses: helm/chart-testing-action@v2.1.0

# NOTE:
# --validate-chart-schema=false due to https://github.com/helm/chart-testing/pull/300
- name: Lint with chart-testing 🧪🖋
run: |
ct lint \
--all \
--validate-maintainers=false \
--validate-chart-schema=false
run: ${GITHUB_WORKSPACE}/.github/scripts/lint.sh

install-test:
runs-on: ubuntu-latest
Expand All @@ -76,35 +70,24 @@ jobs:
- name: Setup Helm 🧰
uses: azure/setup-helm@v1
with:
version: v3.4.1
version: v3.6.1

- name: Setup Python 🐍
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Setup chart-testing 🧰
uses: helm/chart-testing-action@v2.0.1
uses: helm/chart-testing-action@v2.1.0

- name: Setup kind cluster 🧰
uses: helm/kind-action@v1.1.0

- name: Configure Kubernetes 🧰
run: |
echo "Install ingress controller"
helm repo add haproxy-ingress https://haproxy-ingress.github.io/charts
helm install haproxy-ingress haproxy-ingress/haproxy-ingress \
--create-namespace --namespace=ingress-controller \
--set controller.hostNetwork=true
echo "Install tekton"
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.16.3/release.yaml
kubectl apply --filename https://storage.googleapis.com/tekton-releases/triggers/previous/v0.8.1/release.yaml
run: ${GITHUB_WORKSPACE}/.github/scripts/configure-kube.sh

- name: Test install with chart-testing 🧪
run: |
ct install \
--all
run: ${GITHUB_WORKSPACE}/.github/scripts/test.sh

prepare-for-release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -258,7 +241,7 @@ jobs:
- name: Setup Helm 🧰
uses: azure/setup-helm@v1
with:
version: v3.4.1
version: v3.6.1

- name: Run chart-releaser 🚀
uses: helm/chart-releaser-action@v1.1.0
Expand Down
33 changes: 8 additions & 25 deletions .github/workflows/publish-helm-charts-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,18 @@ jobs:
- name: Setup Helm 🧰
uses: azure/setup-helm@v1
with:
version: v3.4.1
version: v3.6.1

- name: Setup Python 🧰🐍
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Setup chart-testing 🧰
uses: helm/chart-testing-action@v2.0.1
uses: helm/chart-testing-action@v2.1.0

# NOTE:
# --validate-chart-schema=false due to https://github.com/helm/chart-testing/pull/300
- name: Lint with chart-testing 🧪🖋
run: |
ct lint \
--all \
--validate-maintainers=false \
--validate-chart-schema=false
run: ${GITHUB_WORKSPACE}/.github/scripts/lint.sh

install-test:
runs-on: ubuntu-latest
Expand All @@ -100,35 +94,24 @@ jobs:
- name: Setup Helm 🧰
uses: azure/setup-helm@v1
with:
version: v3.4.1
version: v3.6.1

- name: Setup Python 🐍
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Setup chart-testing 🧰
uses: helm/chart-testing-action@v2.0.1
uses: helm/chart-testing-action@v2.1.0

- name: Setup kind cluster 🧰
uses: helm/kind-action@v1.1.0

- name: Configure Kubernetes 🧰
run: |
echo "Install ingress controller"
helm repo add haproxy-ingress https://haproxy-ingress.github.io/charts
helm install haproxy-ingress haproxy-ingress/haproxy-ingress \
--create-namespace --namespace=ingress-controller \
--set controller.hostNetwork=true
echo "Install tekton"
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.16.3/release.yaml
kubectl apply --filename https://storage.googleapis.com/tekton-releases/triggers/previous/v0.8.1/release.yaml
run: ${GITHUB_WORKSPACE}/.github/scripts/configure-kube.sh

- name: Test install with chart-testing 🧪
run: |
ct install \
--all
run: ${GITHUB_WORKSPACE}/.github/scripts/test.sh

prepare-for-release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -201,7 +184,7 @@ jobs:
- name: Setup Helm 🧰
uses: azure/setup-helm@v1
with:
version: v3.4.1
version: v3.6.1

- name: Run chart-releaser 🚀
uses: helm/chart-releaser-action@v1.1.0
Expand Down
31 changes: 7 additions & 24 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,18 @@ jobs:
- name: Setup Helm 🧰
uses: azure/setup-helm@v1
with:
version: v3.4.1
version: v3.6.1

- name: Setup Python 🧰🐍
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Setup chart-testing 🧰
uses: helm/chart-testing-action@v2.0.1
uses: helm/chart-testing-action@v2.1.0

# NOTE:
# --validate-chart-schema=false due to https://github.com/helm/chart-testing/pull/300
- name: Lint with chart-testing 🧪🖋
run: |
ct lint \
--all \
--validate-maintainers=false \
--validate-chart-schema=false
run: ${GITHUB_WORKSPACE}/.github/scripts/lint.sh

install-test:
runs-on: ubuntu-latest
Expand All @@ -53,32 +47,21 @@ jobs:
- name: Setup Helm 🧰
uses: azure/setup-helm@v1
with:
version: v3.4.1
version: v3.6.1

- name: Setup Python 🐍
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Setup chart-testing 🧰
uses: helm/chart-testing-action@v2.0.1
uses: helm/chart-testing-action@v2.1.0

- name: Setup kind cluster 🧰
uses: helm/kind-action@v1.1.0

- name: Configure Kubernetes 🧰
run: |
echo "Install ingress controller"
helm repo add haproxy-ingress https://haproxy-ingress.github.io/charts
helm install haproxy-ingress haproxy-ingress/haproxy-ingress \
--create-namespace --namespace=ingress-controller \
--set controller.hostNetwork=true
echo "Install tekton"
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.16.3/release.yaml
kubectl apply --filename https://storage.googleapis.com/tekton-releases/triggers/previous/v0.8.1/release.yaml
run: ${GITHUB_WORKSPACE}/.github/scripts/configure-kube.sh

- name: Test install with chart-testing 🧪
run: |
ct install \
--all
run: ${GITHUB_WORKSPACE}/.github/scripts/test.sh
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,28 @@ If you want to use a local [Kind](https://kind.sigs.k8s.io/) cluster to do your
how you can set it up.

```bash
kind create cluster ploigos-test
kind create cluster --name ploigos-test
kubectl config use-context kind-ploigos-test

echo "Install ingress controller"
helm repo add haproxy-ingress https://haproxy-ingress.github.io/charts
helm install haproxy-ingress haproxy-ingress/haproxy-ingress \
helm upgrade --install haproxy-ingress haproxy-ingress/haproxy-ingress \
--create-namespace --namespace=ingress-controller \
--set controller.hostNetwork=true
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: haproxy
annotations:
ingressclass.kubernetes.io/is-default-class: 'true'
spec:
controller: haproxy-ingress.github.io/controller
EOF

echo "Install tekton"
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.16.3/release.yaml
kubectl apply --filename https://storage.googleapis.com/tekton-releases/triggers/previous/v0.8.1/release.yaml
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.22.0/release.yaml
kubectl apply --filename https://storage.googleapis.com/tekton-releases/triggers/previous/v0.12.0/release.yaml
```

### Run linter
Expand All @@ -74,7 +84,7 @@ ct lint \
so be aware of what that means.

```bash
kubectl config use-context ???
kubectl config use-context kind-ploigos-test

ct install \
--all
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 15 additions & 0 deletions charts/ploigos-workflow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# NOTE on mismatched chart name and folder names

## Issue
The chart names and folder names do not match.

## Reason
Had to put this in a sub folder (`ploigos-workflow`) and remove `ploigos-workflow-` from the
folder names of all of these charts due to how `chart-tester` works and helm and kubernetes
name lengths.

This was first encountered when adding `ploigos-workflow-everything-tekton-pipeline` which
put us over the character limit.

## Resolution
Can't be changed until there is some resolution to https://github.com/helm/chart-testing/issues/343.
14 changes: 14 additions & 0 deletions charts/ploigos-workflow/everything-tekton-pipeline/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v2
name: ploigos-workflow-everything-tekton-pipeline
description: |
A Helm chart for Kubernetes to install the Ploigos Workflow (Everything) run by Tekton for a
given application service.
type: application
maintainers:
- name: Red Hat, Inc.
email: ploigos@redhat.com
dependencies:
- name: ploigos-workflow-tekton-shared-resources
version: ">= 0.0.0 || >= 0.0.0-0"
# MANAGED BY: GitHub workflow
version: 0.16.2
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ global:
stepRunnerConfigDir: cicd/step-runner-config

workflowWorkerImageDefault: quay.io/ploigos/ploigos-base:latest
workflowWorkerImageUnitTest: quay.io/ploigos/ploigos-tool-maven:nightly
workflowWorkerImagePackage: quay.io/ploigos/ploigos-tool-maven:nightly
workflowWorkerImageStaticCodeAnalysis: quay.io/ploigos/ploigos-tool-sonar:nightly
workflowWorkerImagePushArtifacts: quay.io/ploigos/ploigos-tool-maven:nightly
workflowWorkerImageUAT: quay.io/ploigos/ploigos-tool-maven:nightly
workflowWorkerImageUnitTest: quay.io/ploigos/ploigos-tool-maven:latest
workflowWorkerImagePackage: quay.io/ploigos/ploigos-tool-maven:latest
workflowWorkerImageStaticCodeAnalysis: quay.io/ploigos/ploigos-tool-sonar:latest
workflowWorkerImagePushArtifacts: quay.io/ploigos/ploigos-tool-maven:latest
workflowWorkerImageUAT: quay.io/ploigos/ploigos-tool-maven:latest

# NOTE:
# have to test with ingress since GitHub action tests on 'kind' server where routes don't
Expand Down
Loading

0 comments on commit 9762ee4

Please sign in to comment.