Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/babel/traverse-7.23.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy authored Aug 30, 2024
2 parents 1add407 + d527d79 commit e974a1d
Show file tree
Hide file tree
Showing 89 changed files with 2,154 additions and 2,166 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/docker-push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,28 @@ jobs:
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: novyl/jtl-reporter-be

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
labels: novyl/jtl-reporter-be:${{ github.event.release.tag_name }}
tags: novyl/jtl-reporter-be:${{ github.event.release.tag_name }}
13 changes: 10 additions & 3 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,28 @@ jobs:
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: novyl/jtl-reporter-be

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
labels: novyl/jtl-reporter-be:latest
tags: novyl/jtl-reporter-be:latest
tags: novyl/jtl-reporter-be:latest
55 changes: 0 additions & 55 deletions .github/workflows/scorecards-analysis.yml

This file was deleted.

8 changes: 1 addition & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ jobs:
- name: Install modules
run: npm install
- name: Build the docker-compose stack
run: docker-compose -f docker-compose.testing.yaml up -d
# - name: Run contract tests
# run: npm run test:contract
# env:
# ENVIRONMENT: CI
# JWT_TOKEN: 123
# JWT_TOKEN_LOGIN: 456
run: docker compose -f docker-compose.testing.yaml up -d
- name: Run integration tests
run: npm run test:integration
env:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.16.0-alpine3.17 as builder
FROM node:20.8.0-alpine3.17 as builder

RUN apk --update add git build-base

Expand All @@ -8,15 +8,15 @@ COPY package.json package-lock.json ./

RUN npm install

COPY tsconfig.json custom-typings.d.ts openapi.json ./
COPY tsconfig.json custom-typings.d.ts ./

COPY /migrations ./migrations

COPY /src ./src/

RUN npm run build

FROM node:18.16.0-alpine3.17
FROM node:20.8.0-alpine3.17

ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.7.2/wait /wait
RUN chmod +x /wait
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# jtl-reporter-be
JtlReporter backend service. The main repository with all instruction can be found [here](https://github.com/ludeknovy/jtl-reporter).
JtlReporter backend service. The main repository with all instructions can be found [here](https://github.com/ludeknovy/jtl-reporter).

# Prerequisites
* Nodejs v16
* Nodejs v18

# Development

Expand Down
33 changes: 33 additions & 0 deletions migrations/1698218100284_scenario-share-token.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const { PgLiteral } = require("node-pg-migrate")
exports.up = (pgm) => {
pgm.createTable({ schema: "jtl", name: "scenario_share_tokens" }, {
id: {
type: "uuid",
"default": new PgLiteral("uuid_generate_v4()"),
notNull: true,
primaryKey: true,
},
token: {
type: "text",
notNull: true,
"default": null,
},
note: {
type: "varchar(200)",
notNull: true,
"default": null,
},
created_by: {
type: "uuid",
"default": null,
references: { schema: "jtl", name: "users" },
notNull: true,
},
scenario_id: {
type: "uuid",
"default": null,
references: { schema: "jtl", name: "scenario" },
notNull: true,
},
})
}
9 changes: 9 additions & 0 deletions migrations/1709293652942_min-test-duration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
exports.up = (pgm) => {
pgm.addColumn({ schema: "jtl", name: "scenario" }, {
min_test_duration: {
type: "smallint",
"default": 5,
notNull: true,
},
})
}
11 changes: 11 additions & 0 deletions migrations/1709293662942_notification-type.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
exports.up = (pgm) => {
pgm.createType("notification_type", ["report_detail", "degradation"] )
pgm.addColumn({ schema: "jtl", name: "notifications" }, {
notification_type: {
type: "notification_type",
"default": "report_detail",
notNull: true,
},
})
pgm.renameColumn({ schema: "jtl", name: "notifications" }, "type", "channel")
}
Loading

0 comments on commit e974a1d

Please sign in to comment.