Skip to content

Commit 178c295

Browse files
committed
chore: add new workflows and base files
1 parent a41b862 commit 178c295

File tree

6 files changed

+174
-5
lines changed

6 files changed

+174
-5
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
sources:
2+
bitbucket-bot:
3+
kind: dockerimage
4+
spec:
5+
image: devopsiaci/bitbucket-bot
6+
architecture: linux/amd64
7+
ecr-token:
8+
kind: dockerimage
9+
spec:
10+
image: devopsiaci/ecr-token
11+
architecture: linux/amd64
12+
ssl-exporter:
13+
kind: dockerimage
14+
spec:
15+
image: ribbybibby/ssl-exporter
16+
architecture: linux/amd64
17+
versionFilter:
18+
kind: semver
19+
conditions: {}
20+
targets:
21+
bitbucket-bot:
22+
name: bump chart dependencies
23+
kind: yaml
24+
spec:
25+
file: charts/bitbucket-bot/Chart.yaml
26+
key: $.appVersion
27+
sourceid: bitbucket-bot
28+
bitbucket-bot-helm:
29+
name: Update bitbucket-bot helm chart
30+
kind: helmchart
31+
spec:
32+
name: charts/bitbucket-bot
33+
file: Chart.yaml
34+
key: $.version
35+
versionincrement: patch
36+
sourceid: bitbucket-bot
37+
38+
ecr-token:
39+
name: bump chart dependencies
40+
kind: yaml
41+
spec:
42+
file: charts/ecr-token/Chart.yaml
43+
key: $.appVersion
44+
sourceid: ecr-token
45+
ecr-token-helm:
46+
name: Update ecr-token helm chart
47+
kind: helmchart
48+
spec:
49+
name: charts/ecr-token
50+
file: Chart.yaml
51+
key: $.version
52+
versionincrement: patch
53+
sourceid: ecr-token
54+
55+
ssl-exporter:
56+
name: bump chart dependencies
57+
kind: yaml
58+
spec:
59+
file: charts/ssl-exporter/Chart.yaml
60+
key: $.appVersion
61+
sourceid: ssl-exporter
62+
ssl-exporter-helm:
63+
name: Update ssl-exporter helm chart
64+
kind: helmchart
65+
spec:
66+
name: charts/ssl-exporter
67+
file: Chart.yaml
68+
key: $.version
69+
versionincrement: patch
70+
sourceid: ssl-exporter
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Check new releases
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 * * *' # every day
7+
8+
jobs:
9+
check-and-update-charts:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Install updatecli
18+
uses: updatecli/updatecli-action@v2
19+
20+
- name: Update dependencies
21+
run: |
22+
updatecli apply --config .github/updatecli/helm-appversion.yaml --commit=false
23+
24+
- name: Check if release changed
25+
id: check_changes
26+
run: |
27+
git fetch origin
28+
29+
if [ -n "$(git diff HEAD^ HEAD)" ]; then
30+
echo "release_changed=true" >> $GITHUB_OUTPUT
31+
fi
32+
33+
- name: Update README.md Helm Chart
34+
if: steps.check_changes.outputs.release_changed == 'true'
35+
uses: losisin/helm-docs-github-action@v1
36+
with:
37+
chart-search-root: charts
38+
39+
- name: Get date
40+
id: date
41+
run: |
42+
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
43+
44+
- name: Create PR with changes
45+
if: steps.check_changes.outputs.release_changed == 'true'
46+
uses: peter-evans/create-pull-request@v6
47+
with:
48+
token: ${{ secrets.PAT_GITHUB }}
49+
commit-message: "chore: bump version charts (${{ steps.date.outputs.date }})"
50+
signoff: false
51+
branch: chore/bump-version-charts-${{ steps.date.outputs.date }}
52+
delete-branch: true
53+
title: '[charts] bump version (${{ steps.date.outputs.date }})'
54+
body: |
55+
This PR updates the appVersion of the charts to the latest release. We're working on improving the automation to make this process smoother.
56+
labels: |
57+
auto-pr-bump-version

.github/workflows/release.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
name: Release charts
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
56
- main
7+
paths:
8+
- "charts/**"
9+
610
jobs:
711
release:
812
runs-on: ubuntu-latest

CONTRIBUTING.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,41 @@
1-
TODO
1+
# How to contribute to OpenCTI Helm Chart
2+
3+
This document provides guidelines for contributing to the *OpenCTI Helm Chart* project.
4+
5+
## How can I contribute?
6+
7+
### Did you find a bug?
8+
9+
* **Ensure the bug has not already been reported** by searching on GitHub under [Issues](https://github.com/devops-ia/helm-charts/issues).
10+
* If you cannot find an open issue addressing the problem, [open a new one](https://github.com/devops-ia/helm-charts/issues/new). Include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the unexpected behavior.
11+
* Use the relevant bug report templates to create the issue, if available.
12+
13+
### Do you intend to add a new feature or change an existing one?
14+
15+
* Please discuss first ([open an issue](https://github.com/devops-ia/helm-charts/issues)) before starting any significant pull request (e.g., implementing features, refactoring code) to avoid spending time on something that might not be merged.
16+
* Adhere to the project's coding conventions (indentation, accurate comments, etc.) and any other requirements (such as test coverage, documentation).
17+
18+
## Styleguides
19+
20+
### YAML Styleguide
21+
22+
All YAML files must adhere to the following style guide:
23+
24+
* Indentation: Use 2 spaces for indentation.
25+
* No trailing spaces.
26+
* Use hyphens for list items.
27+
* Use camelCase for key names.
28+
* Ensure there are no syntax errors.
29+
30+
Additional rules:
31+
32+
* Always use double quotes for strings.
33+
* Keep lines to a maximum of 80 characters.
34+
* Ensure proper alignment of nested elements.
35+
36+
### Git Commit Messages
37+
38+
* Use the present tense ("Add feature" not "Added feature").
39+
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
40+
* Limit the first line to 72 characters or less.
41+
* Reference issues and pull requests liberally after the first line.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 DevOps Solutions
3+
Copyright (c) 2024 DevOps Solutions
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ You can then run `helm search repo devops-ia` to see the charts.
1818
| [bigquery-exporter](./charts/bigquery-exporter) | A Helm chart to deploy Bigquery Exporter |
1919
| [bitbucket-bot](./charts/bitbucket-bot) | A Helm chart to deploy Bitbucket Bot for Google Chats (Spaces) |
2020
| [default-resources](./charts/default-resources) | A Helm chart for Default Resources |
21-
| [ecr-registry](./charts/ecr-registry) | CronJob to update Amazon Elastic Container Registry credentials |
21+
| [ecr-token](./charts/ecr-token) | A Helm chart to deploy cronjob to update Amazon ECR token |
2222
| [helm-release-cleaner](./charts/helm-release-cleaner) | A Helm chart for Helm Charts to clean up the releases installed in the declared namespaces |
23-
| [snapshot-controller](./charts/snapshot-controller) | A Helm chart to deploy snapshot-controller |
24-
| [splunk](./charts/splunk) | A Helm chart to deploy Splunk standalone |
2523
| [ssl-exporter](./charts/ssl-exporter) | A Helm Chart to SSL Certificate Exporter for Prometheus |

0 commit comments

Comments
 (0)