Skip to content

Commit

Permalink
chore: update releases and add new templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ialejandro committed Aug 2, 2024
1 parent 1dc7557 commit 3896110
Show file tree
Hide file tree
Showing 6 changed files with 227 additions and 13 deletions.
88 changes: 88 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Bug report
description: Create a bug report
title: "[opencti] Bug title"
labels: [bug]
body:
- type: markdown
attributes:
value: Please be cautious with the sensitive information/logs while filing the issue.

- type: textarea
id: description
attributes:
label: Describe the bug a clear and concise description of what the bug is.
validations:
required: true

- type: input
id: helm-version
attributes:
label: What's your helm version?
description: Output of `#~ helm version`
validations:
required: true

- type: input
id: kubectl-version
attributes:
label: What's your kubectl version?
description: Output of `#~ kubectl version`
validations:
required: true

- type: input
id: chart-version
attributes:
label: Chart version
description: Enter the version of the chart that you encountered this bug.
validations:
required: true

- type: textarea
id: explain-bug
attributes:
label: Explain bug
description: Explain what happened.
validations:
required: false

- type: textarea
id: expected-result
attributes:
label: What you expected to happen?
description: Enter what you expected to happen.
validations:
required: false

- type: textarea
id: reproduce-bug
attributes:
label: How to reproduce it?
description: Explain step-by-step if is possible.
validations:
required: false

- type: textarea
id: chart-values
attributes:
label: Enter the changed values of values.yaml?
description: Please enter only values which differ from the defaults. Enter `NONE` if nothing's changed.
placeholder: 'key: value'
validations:
required: false

- type: textarea
id: helm-command
attributes:
label: Enter the command that you execute when chart failing/misfunctioning
description: Enter the command as-is as how you executed.
placeholder: helm install [RELEASE] opencti/opencti --version [VERSION] -f values.yaml --debug
validations:
required: true

- type: textarea
id: more-info
attributes:
label: More info
validations:
required: false
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Feature request
description: Suggest an idea to improve this project
title: "[opencti] Feature title"
labels: [enhancement]
body:
- type: markdown
attributes:
value: Thanks for taking the time to fill out this bug report!

- type: textarea
id: description
attributes:
label: Is your feature request related to a problem?
description: Description of what the problem is.
validations:
required: true

- type: textarea
id: proposals
attributes:
label: Describe the solution you'd like
description: Description of what you want to happen.
validations:
required: true

- type: textarea
id: improves
attributes:
label: Describe alternatives you've considered
description: Description of any alternative solutions or features you've considered. If nothing, please enter `NONE`
validations:
required: true

- type: textarea
id: more-info
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
Before you submit this PR we'd like to make sure you are aware of our technical requirements and best practices:
* https://github.com/devops-ia/kafka-cruise-control/blob/main/CONTRIBUTING.md#technical-requirements
* https://helm.sh/docs/chart_best_practices/
Following our best practices right from the start will accelerate the review process and help get your PR merged quicker.
When updates to your PR are requested, please add new commits and do not squash the history.
This will make it easier to identify new changes. The PR will be squashed anyways when it is merged.
PR Steps:
1) Please make sure you test your changes before you push them.
2) Once pushed, GitHub Actions will run across your changes and do some initial checks and linting.
3) These checks run very quickly.
4) Please check the results.
5) We would like these checks to pass before we even continue reviewing your changes.
-->
#### What this PR does / why we need it:

#### Which issue this PR fixes
*(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*
- fixes #

#### Special notes for your reviewer:

#### Checklist
<!-- [Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.] -->
- [ ] [DCO](https://github.com/devops-ia/helm-opencti/blob/main/CONTRIBUTING.md#sign-off-your-work) signed
2 changes: 1 addition & 1 deletion .github/workflows/auto-assign.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: auto assign
name: Auto assign
on:
issues:
types: [opened]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Check linkedin/cruise-control updates

on:
schedule:
- cron: '0 0 * * *'
- cron: '0 * * * *'
workflow_dispatch:

jobs:
Expand Down
79 changes: 68 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Create default release
name: Create release

env:
USER: devopsiaci
REPO: cruise-control
DOCKERHUB_USER: devopsiaci
DOCKERHUB_REPO: cruise-control
GHCR_REGISTRY: ghcr.io
GHCR_REPO: ${{ github.repository }}

on:
push:
Expand All @@ -21,35 +23,54 @@ jobs:
jdk_version:
- 11
- 17

permissions:
contents: write
packages: write
id-token: write
attestations: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Read .lastbuild file
id: current_tag
run: |
current_tag=$(grep lastTag .lastbuild | cut -d '=' -f 2)
echo "current_tag=$current_tag" >> $GITHUB_OUTPUT
- name: Log in to Docker Hub
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

##############
# DOCKERHUB
##############

- name: "[DOCKERHUB] Log in to Docker Hub"
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push Docker image
- name: "[DOCKERHUB] Build and push Docker image"
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
build-args: |
OPENJDK_VERSION=${{ matrix.jdk_version }}
CC_TAG=${{ steps.current_tag.outputs.current_tag }}
tags: |
${{ env.USER }}/${{ env.REPO }}:jdk${{ matrix.jdk_version }}-cc${{ steps.current_tag.outputs.current_tag }}
${{ env.DOCKERHUB_USER }}/${{ env.DOCKERHUB_REPO }}:jdk${{ matrix.jdk_version }}-cc${{ steps.current_tag.outputs.current_tag }}
- name: Update README.md default version
- name: "[DOCKERHUB] Update README.md default version"
run: |
# replace default version
sed -i "s/\* Cruise Control: .*/* Cruise Control: ${{ steps.current_tag.outputs.current_tag }}/" README.md
Expand All @@ -59,11 +80,47 @@ jobs:
git config --global user.name "github-actions[bot]"
git add README.md
git commit -m "chore: update README.md [skip ci]"
git push origin HEAD:main
git push -f origin HEAD:main
- name: Update Docker registry description
- name: "[DOCKERHUB] Update Docker registry description"
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ env.USER }}/${{ env.REPO }}
repository: ${{ env.DOCKERHUB_USER }}/${{ env.DOCKERHUB_REPO }}

##############
# GHCR
##############

- name: "[GHCR] Log in to the Container registry"
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "[GHCR] Get metadata"
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_REPO }}

- name: "[GHCR] Build and push Docker image"
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
build-args: |
OPENJDK_VERSION=${{ matrix.jdk_version }}
CC_TAG=${{ steps.current_tag.outputs.current_tag }}
tags: |
${{ env.GHCR_REGISTRY }}/${{ env.GHCR_REPO }}:jdk${{ matrix.jdk_version }}-cc${{ steps.current_tag.outputs.current_tag }}
- name: "[GHCR] Generate artifact"
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_REPO }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

0 comments on commit 3896110

Please sign in to comment.