-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Incoming Request Ingest service with configuration, Docker suppor…
…t, and tests
- Loading branch information
Showing
33 changed files
with
5,689 additions
and
7 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 |
---|---|---|
|
@@ -613,6 +613,67 @@ jobs: | |
GIT_SHA=${{ github.sha }} | ||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}} | ||
incoming-request-ingest-docker-image-deploy: | ||
needs: [generate-build-number] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Docker Meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
oneuptime/incoming-request-ingest | ||
ghcr.io/oneuptime/incoming-request-ingest | ||
tags: | | ||
type=raw,value=release,enable=true | ||
type=semver,value=7.0.${{needs.generate-build-number.outputs.build_number}},pattern={{version}},enable=true | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.3.0 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Generate Dockerfile from Dockerfile.tpl | ||
run: npm run prerun | ||
|
||
# Build and deploy incoming-request-ingest. | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
file: ./IncomingRequestIngest/Dockerfile | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
GIT_SHA=${{ github.sha }} | ||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}} | ||
fluent-ingest-docker-image-deploy: | ||
needs: [generate-build-number] | ||
runs-on: ubuntu-latest | ||
|
@@ -1469,7 +1530,7 @@ jobs: | |
|
||
test-e2e-release-saas: | ||
runs-on: ubuntu-latest | ||
needs: [copilot-docker-image-deploy, fluent-ingest-docker-image-deploy, docs-docker-image-deploy, api-reference-docker-image-deploy, workflow-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, ingestor-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy] | ||
needs: [copilot-docker-image-deploy, fluent-ingest-docker-image-deploy, docs-docker-image-deploy, api-reference-docker-image-deploy, workflow-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, ingestor-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy, incoming-request-ingest-docker-image-deploy] | ||
env: | ||
CI_PIPELINE_ID: ${{github.run_number}} | ||
steps: | ||
|
@@ -1522,7 +1583,7 @@ jobs: | |
test-e2e-release-self-hosted: | ||
runs-on: ubuntu-latest | ||
# After all the jobs runs | ||
needs: [copilot-docker-image-deploy, fluent-ingest-docker-image-deploy, docs-docker-image-deploy, api-reference-docker-image-deploy, workflow-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, ingestor-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy] | ||
needs: [copilot-docker-image-deploy, incoming-request-ingest-docker-image-deploy, fluent-ingest-docker-image-deploy, docs-docker-image-deploy, api-reference-docker-image-deploy, workflow-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, ingestor-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy] | ||
env: | ||
CI_PIPELINE_ID: ${{github.run_number}} | ||
steps: | ||
|
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 |
---|---|---|
|
@@ -660,6 +660,67 @@ jobs: | |
GIT_SHA=${{ github.sha }} | ||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}} | ||
incoming-request-ingest-docker-image-deploy: | ||
needs: generate-build-number | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Docker Meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
oneuptime/incoming-request-ingest | ||
ghcr.io/oneuptime/incoming-request-ingest | ||
tags: | | ||
type=raw,value=test,enable=true | ||
type=semver,value=7.0.${{needs.generate-build-number.outputs.build_number}}-test,pattern={{version}},enable=true | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.3.0 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Generate Dockerfile from Dockerfile.tpl | ||
run: npm run prerun | ||
|
||
# Build and deploy incoming-request-ingest. | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
file: ./IncomingRequestIngest/Dockerfile | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
GIT_SHA=${{ github.sha }} | ||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}} | ||
fluent-ingest-docker-image-deploy: | ||
needs: generate-build-number | ||
runs-on: ubuntu-latest | ||
|
@@ -1404,7 +1465,7 @@ jobs: | |
test-helm-chart: | ||
runs-on: ubuntu-latest | ||
needs: [llm-docker-image-deploy, copilot-docker-image-deploy, docs-docker-image-deploy, worker-docker-image-deploy, workflow-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, api-reference-docker-image-deploy, test-server-docker-image-deploy, test-docker-image-deploy, ingestor-docker-image-deploy, probe-docker-image-deploy, haraka-docker-image-deploy, dashboard-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, nginx-docker-image-deploy, e2e-docker-image-deploy, fluent-ingest-docker-image-deploy] | ||
needs: [llm-docker-image-deploy, copilot-docker-image-deploy, docs-docker-image-deploy, worker-docker-image-deploy, workflow-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, api-reference-docker-image-deploy, test-server-docker-image-deploy, test-docker-image-deploy, ingestor-docker-image-deploy, probe-docker-image-deploy, haraka-docker-image-deploy, dashboard-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, nginx-docker-image-deploy, e2e-docker-image-deploy, fluent-ingest-docker-image-deploy, incoming-request-ingest-docker-image-deploy] | ||
env: | ||
CI_PIPELINE_ID: ${{github.run_number}} | ||
steps: | ||
|
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,21 @@ | ||
name: Incoming Request Ingest Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches-ignore: | ||
- 'hotfix-*' # excludes hotfix branches | ||
- 'release' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
env: | ||
CI_PIPELINE_ID: ${{github.run_number}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.3.0 | ||
- run: cd IncomingRequestIngest && npm install && npm run test | ||
|
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
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,35 @@ | ||
import { BASE_URL } from "../../Config"; | ||
import { Page, expect, test } from "@playwright/test"; | ||
import URL from "Common/Types/API/URL"; | ||
|
||
test.describe("check live and health check of the fluent ingest", () => { | ||
test("check if fluent ingest status is ok", async ({ page }: { page: Page }) => { | ||
await page.goto( | ||
`${URL.fromString(BASE_URL.toString()) | ||
.addRoute("/fluent-ingest/status") | ||
.toString()}`, | ||
); | ||
const content: string = await page.content(); | ||
expect(content).toContain('{"status":"ok"}'); | ||
}); | ||
|
||
test("check if fluent ingest is ready", async ({ page }: { page: Page }) => { | ||
await page.goto( | ||
`${URL.fromString(BASE_URL.toString()) | ||
.addRoute("/fluent-ingest/status/ready") | ||
.toString()}`, | ||
); | ||
const content: string = await page.content(); | ||
expect(content).toContain('{"status":"ok"}'); | ||
}); | ||
|
||
test("check if fluent ingest is live", async ({ page }: { page: Page }) => { | ||
await page.goto( | ||
`${URL.fromString(BASE_URL.toString()) | ||
.addRoute("/fluent-ingest/status/live") | ||
.toString()}`, | ||
); | ||
const content: string = await page.content(); | ||
expect(content).toContain('{"status":"ok"}'); | ||
}); | ||
}); |
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,35 @@ | ||
import { BASE_URL } from "../../Config"; | ||
import { Page, expect, test } from "@playwright/test"; | ||
import URL from "Common/Types/API/URL"; | ||
|
||
test.describe("check live and health check of the incoming request ingest", () => { | ||
test("check if incoming request ingest status is ok", async ({ page }: { page: Page }) => { | ||
await page.goto( | ||
`${URL.fromString(BASE_URL.toString()) | ||
.addRoute("/incoming-request-ingest/status") | ||
.toString()}`, | ||
); | ||
const content: string = await page.content(); | ||
expect(content).toContain('{"status":"ok"}'); | ||
}); | ||
|
||
test("check if incoming request ingest is ready", async ({ page }: { page: Page }) => { | ||
await page.goto( | ||
`${URL.fromString(BASE_URL.toString()) | ||
.addRoute("/incoming-request-ingest/status/ready") | ||
.toString()}`, | ||
); | ||
const content: string = await page.content(); | ||
expect(content).toContain('{"status":"ok"}'); | ||
}); | ||
|
||
test("check if incoming request ingest is live", async ({ page }: { page: Page }) => { | ||
await page.goto( | ||
`${URL.fromString(BASE_URL.toString()) | ||
.addRoute("/incoming-request-ingest/status/live") | ||
.toString()}`, | ||
); | ||
const content: string = await page.content(); | ||
expect(content).toContain('{"status":"ok"}'); | ||
}); | ||
}); |
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.