-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding sample push gateway url * Using public reusable tasks * Scape generated files * setup driver kubernetes * Add input to reusable action * Fix metrics instantiation and labels * Fix build * Adding the other workflows * Apply ronny PR comments * Fix formatting * Add error as a counter * Use push instead of PushAdd * change jobname * keep process.env access bundles together * fixed env resolution * Add metric labels globally * adding labels gloabally --------- Co-authored-by: Ronny Esterluss <ronny.esterluss@hoprnet.org>
- Loading branch information
1 parent
d273083
commit cd6b01c
Showing
7 changed files
with
279 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Merge PR | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: merge | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
merge: | ||
name: Merge PR | ||
runs-on: self-hosted-hoprnet-small | ||
if: github.event.pull_request.merged == true | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: hoprnet/hopr-workflows/actions/setup-node-js@master | ||
with: | ||
node-version: 20 | ||
|
||
- name: Setup GCP | ||
id: gcp | ||
uses: hoprnet/hopr-workflows/actions/setup-gcp@master | ||
with: | ||
google-credentials: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }} | ||
login-artifact-registry: 'true' | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver: kubernetes | ||
|
||
- name: Build and push docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
tags: europe-west3-docker.pkg.dev/hoprassociation/docker-images/uhttp-latency-monitor:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: Close release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_type: | ||
description: 'Next version type' | ||
required: true | ||
type: choice | ||
default: 'patch' | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
|
||
concurrency: | ||
group: release | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
release: | ||
name: Close release | ||
runs-on: self-hosted-hoprnet-small | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: hoprnet/hopr-workflows/actions/setup-node-js@master | ||
with: | ||
node-version: 20 | ||
|
||
- name: Setup GCP | ||
id: gcp | ||
uses: hoprnet/hopr-workflows/actions/setup-gcp@master | ||
with: | ||
google-credentials: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }} | ||
login-artifact-registry: 'true' | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver: kubernetes | ||
|
||
- name: Building | ||
run: yarn build | ||
|
||
- name: Linting | ||
run: yarn lint:ci | ||
|
||
- name: Formatting | ||
run: yarn format:ci | ||
|
||
- name: Testing | ||
run: yarn test | ||
|
||
- name: Setup environment variables | ||
id: environment | ||
run: | | ||
PACKAGE_VERSION=$(node -p "require('./package.json').version") | ||
echo "release_version=${PACKAGE_VERSION}" >> $GITHUB_OUTPUT | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body_path: changelog.md | ||
name: 'uhttp-latency-monitor - v${{ steps.environment.outputs.release_version }}' | ||
tag_name: v${{ steps.environment.outputs.release_version }} | ||
|
||
|
||
- name: Build and push docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
tags: europe-west3-docker.pkg.dev/hoprassociation/docker-images/uhttp-latency-monitor:${{ steps.environment.outputs.release_version }} | ||
|
||
- name: Bump Version | ||
id: bump | ||
run: | | ||
npm version ${{ inputs.release_type }} --no-git-tag-version | ||
BUMP_VERSION=$(node -p "require('./package.json').version") | ||
echo "bump_version=${BUMP_VERSION}" >> $GITHUB_OUTPUT | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.GH_RUNNER_TOKEN }} | ||
commit-message: 'Bump to version ${{ steps.bump.outputs.bump_version }}' | ||
base: main | ||
title: 'Open release ${{ steps.bump.outputs.bump_version }}' | ||
body: 'The scope of this PR is to bump the new release ${{ steps.bump.outputs.bump_version }}' | ||
branch: bot/open-${{ inputs.release_type }}-${{ steps.bump.outputs.bump_version }} | ||
delete-branch: true | ||
assignees: ${{ github.actor }} | ||
team-reviewers: '@hoprnet/hopr-products-team' | ||
|
||
- name: Notify new release | ||
uses: zulip/github-actions-zulip/send-message@v1 | ||
with: | ||
api-key: ${{ secrets.ZULIP_API_KEY }} | ||
email: ${{ secrets.ZULIP_EMAIL }} | ||
organization-url: 'https://hopr.zulipchat.com' | ||
type: 'stream' | ||
to: 'Releases' | ||
topic: 'main' | ||
content: | | ||
I'm thrilled to inform the new **uhttp-latency-monitor** version **${{ steps.environment.outputs.current_version }}** has been released. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,4 @@ coverage/ | |
|
||
# dependencies | ||
node_modules/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Created by github pipeline | ||
gha-creds-*.json |
Oops, something went wrong.