-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into always-use-dbname
Signed-off-by: Lorenzo Mangani <[email protected]>
- Loading branch information
Showing
29 changed files
with
6,370 additions
and
2,185 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,8 @@ jobs: | |
build: | ||
name: 'Build & Publish' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: 'actions/checkout@v3' | ||
- uses: actions/checkout@v4.1.1 | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: Update Package to Release version | ||
|
@@ -29,9 +28,9 @@ jobs: | |
shell: bash | ||
run: | | ||
if [ "$SECRET" == "" ]; then | ||
echo ::set-output name=secretspresent::false | ||
echo "secretspresent=false" >> $GITHUB_OUTPUT | ||
else | ||
echo ::set-output name=secretspresent::true | ||
echo "secretspresent=true" >> $GITHUB_OUTPUT | ||
fi | ||
env: | ||
SECRET: ${{ secrets.NPM_TOKEN }} | ||
|
@@ -41,43 +40,51 @@ jobs: | |
node-version: 18 | ||
- name: Publish to NPM | ||
if: ${{ steps.checksecrets.outputs.secretspresent }} | ||
continue-on-error: true | ||
run: | | ||
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} | ||
npm install | ||
npm publish --access public | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
|
||
node: | ||
name: 'Build & Publish Node' | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: Check Docker secret presence | ||
id: checkdocker | ||
shell: bash | ||
run: | | ||
if [ "$SECRET" == "" ]; then | ||
echo ::set-output name=secretspresent::false | ||
echo "secretspresent=false" >> $GITHUB_OUTPUT | ||
else | ||
echo ::set-output name=secretspresent::true | ||
echo "secretspresent=true" >> $GITHUB_OUTPUT | ||
fi | ||
env: | ||
SECRET: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Set up Docker QEMU | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/setup-qemu-action@v2 | ||
uses: docker/setup-qemu-action@v3.0.0 | ||
with: | ||
platforms: amd64, arm64 | ||
- name: Set up Docker Buildx | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v3.0.0 | ||
|
||
- name: Login to DockerHub | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/login-action@v2.0.0 | ||
uses: docker/login-action@v3.0.0 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push to Docker Hub | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/build-push-action@v3.0.0 | ||
uses: docker/build-push-action@v5.0.0 | ||
with: | ||
platforms: linux/amd64, linux/arm64 | ||
push: true | ||
|
@@ -86,7 +93,55 @@ jobs: | |
qxip/qryn:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} | ||
qxip/cloki:latest | ||
qxip/cloki:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} | ||
- name: Log in to the GHCR registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push to GHCR | ||
uses: docker/[email protected] | ||
with: | ||
platforms: linux/amd64, linux/arm64 | ||
file: ./Dockerfile | ||
push: true | ||
tags: | | ||
ghcr.io/metrico/qryn:latest | ||
ghcr.io/metrico/qryn:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} | ||
bun: | ||
name: 'Build & Publish Bun' | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: Check Docker secret presence | ||
id: checkdocker | ||
shell: bash | ||
run: | | ||
if [ "$SECRET" == "" ]; then | ||
echo "secretspresent=false" >> $GITHUB_OUTPUT | ||
else | ||
echo "secretspresent=true" >> $GITHUB_OUTPUT | ||
fi | ||
env: | ||
SECRET: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Set up Docker QEMU | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/[email protected] | ||
with: | ||
platforms: amd64, arm64 | ||
- name: Set up Docker Buildx | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push to Docker Hub (bun) | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/[email protected] | ||
|
@@ -97,28 +152,14 @@ jobs: | |
tags: | | ||
qxip/qryn:bun | ||
qxip/qryn:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}-bun | ||
qxip/cloki:bun | ||
qxip/cloki:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}-bun | ||
- name: Log in to the GHCR registry | ||
uses: docker/login-action@v2.0.0 | ||
uses: docker/login-action@v3.0.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push to GHCR | ||
uses: docker/[email protected] | ||
with: | ||
platforms: linux/amd64, linux/arm64 | ||
file: ./Dockerfile | ||
push: true | ||
tags: | | ||
ghcr.io/metrico/qryn:latest | ||
ghcr.io/metrico/qryn:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} | ||
- name: Build and push to GHCR (bun) | ||
uses: docker/build-push-action@v3.0.0 | ||
uses: docker/build-push-action@v5.0.0 | ||
with: | ||
platforms: linux/amd64, linux/arm64 | ||
file: ./Dockerfile_bun | ||
|
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,65 @@ | ||
name: 'Manual Bun CI+CD' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
TAG_NAME: | ||
description: 'Release Version Tag (0.0.0)' | ||
required: true | ||
|
||
jobs: | ||
bun: | ||
name: 'Build & Publish Bun' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: 'actions/[email protected]' | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: Check Docker secret presence | ||
id: checkdocker | ||
shell: bash | ||
run: | | ||
if [ "$SECRET" == "" ]; then | ||
echo "secretspresent=false" >> $GITHUB_OUTPUT | ||
else | ||
echo "secretspresent=true" >> $GITHUB_OUTPUT | ||
fi | ||
env: | ||
SECRET: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Set up Docker QEMU | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/[email protected] | ||
with: | ||
platforms: amd64, arm64 | ||
- name: Set up Docker Buildx | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/[email protected] | ||
- name: Login to DockerHub | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push to Docker Hub (bun) | ||
if: ${{ steps.checkdocker.outputs.secretspresent }} | ||
uses: docker/[email protected] | ||
with: | ||
platforms: linux/amd64, linux/arm64 | ||
file: ./Dockerfile_bun | ||
push: true | ||
tags: | | ||
qxip/qryn:bun | ||
- name: Log in to the GHCR registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push to GHCR (bun) | ||
uses: docker/[email protected] | ||
with: | ||
platforms: linux/amd64, linux/arm64 | ||
file: ./Dockerfile_bun | ||
push: true | ||
tags: | | ||
ghcr.io/metrico/qryn:bun |
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 |
---|---|---|
|
@@ -15,32 +15,43 @@ on: | |
- '**.md' | ||
- '**.yml' | ||
- '**.yaml' | ||
workflow_dispatch: | ||
inputs: | ||
clickhouse_tag: | ||
description: 'Tag for ClickHouse (23.8-alpine)' | ||
required: false | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18, 16.x, 20] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
services: | ||
clickhouse: | ||
image: "clickhouse/clickhouse-server:${{ github.event.inputs.clickhouse_tag || '23.8-alpine' }}" | ||
ports: | ||
- 8123:8123 | ||
- 9000:9000 | ||
steps: | ||
- run: docker run --name clickhouse -p 9000:9000 -p 8123:8123 -d clickhouse/clickhouse-server:23.8-alpine | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
uses: actions/setup-node@v4.0.0 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm install | ||
- run: npm run postinstall | ||
- run: git submodule init | ||
- run: git submodule update | ||
- name: Workflow Telemetry | ||
uses: runforesight/[email protected] | ||
- env: | ||
CLICKHOUSE_DB: loki | ||
CLICKHOUSE_TSDB: loki | ||
CLICKHOUSE_DB: qryn | ||
CLICKHOUSE_TSDB: qryn | ||
INTEGRATION_E2E: 1 | ||
CLOKI_EXT_URL: 127.0.0.1:3100 | ||
QRYN_LOGIN: a | ||
QRYN_PASSWORD: b | ||
run: node qryn.mjs >/dev/stdout & npm run test --forceExit |
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
Oops, something went wrong.