Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/dependbot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json
version: 2
updates:
# deps
- package-ecosystem: npm
target-branch: 'master'
schedule:
interval: weekly
allow:
- dependency-type: production
directory: /
commit-message:
prefix: 'deps'
groups:
map-colonies:
patterns:
- '@map-colonies/*'
opentelemetry:
patterns:
- '@opentelemetry/*'
patch:
update-types:
- patch
# dev-deps
- package-ecosystem: npm
schedule:
interval: weekly
allow:
- dependency-type: development
directory: /
commit-message:
prefix: 'devdeps'
groups:
map-colonies:
patterns:
- '@map-colonies/*'
opentelemetry:
patterns:
- '@opentelemetry/*'
types:
patterns:
- '@types/*'
dev-patch:
update-types:
- patch

# github deps
- package-ecosystem: github-actions
schedule:
interval: weekly
commit-message:
prefix: 'ci'
directory: '/'
58 changes: 58 additions & 0 deletions .github/workflows/build-and-push.yaml
Comment thread
razbroc marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and push artifacts

on:
push:
tags:
- 'v*'

jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Artifactory Login
uses: MapColonies/shared-workflows/actions/artifactory-login@artifactory-login-v1.0.0
with:
registry: ${{ secrets.ACR_URL }}
username: ${{ secrets.ACR_PUSH_USER }}
password: ${{ secrets.ACR_PUSH_TOKEN }}

- name: Build Docker Image
id: build
uses: MapColonies/shared-workflows/actions/build-docker@build-docker-v1.1.0
with:
domain: raster
registry: ${{ secrets.ACR_URL }}

- name: Push Docker Image
uses: MapColonies/shared-workflows/actions/push-docker@push-docker-v1.0.1
with:
image_name: ${{ steps.build.outputs.docker_image_full_name }}
image_tag: ${{ steps.build.outputs.docker_image_tag }}

- name: Build and Push Helm Chart
uses: MapColonies/shared-workflows/actions/build-and-push-helm@build-and-push-helm-v1.0.1
with:

context: ./helm
domain: raster
registry: ${{ secrets.ACR_URL }}

- name: Update Artifacts File- Docker
uses: MapColonies/shared-workflows/actions/update-artifacts-file@update-artifacts-file-v1.1.1
with:
domain: raster
artifact_name: ${{ github.event.repository.name }}
artifact_tag: ${{ github.ref_name }}
type: docker
registry: ${{ secrets.ACR_URL }}
github_token: ${{ secrets.GH_PAT }}

- name: Update Artifacts File- Helm
uses: MapColonies/shared-workflows/actions/update-artifacts-file@update-artifacts-file-v1.1.1
with:
domain: raster
artifact_name: ${{ github.event.repository.name }}
artifact_tag: ${{ github.ref_name }}
type: helm
registry: ${{ secrets.ACR_URL }}
github_token: ${{ secrets.GH_PAT }}
32 changes: 0 additions & 32 deletions .github/workflows/build_and_push.yaml

This file was deleted.

99 changes: 47 additions & 52 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -1,83 +1,78 @@
name: pull_request

on: [pull_request]

jobs:
eslint:
name: Run eslint
name: Run TS Project eslint
runs-on: ubuntu-latest
strategy: &node-strategy
matrix:
node: [24.x]

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 16
- name: Run TS Project linters
uses: MapColonies/shared-workflows/actions/eslint@eslint-v1.0.1
with:
node_version: ${{ matrix.node }}

- name: Install dependencies
run: npm ci
helm-lint:
name: Run Helm lint Check
runs-on: ubuntu-latest

- name: Run linters
uses: wearerequired/lint-action@v1
with:
github_token: ${{ secrets.github_token }}
# Enable linters
eslint: true
prettier: true
eslint_extensions: ts

- name: OpenAPI Lint Checks
uses: nwestfall/openapi-action@v1.0.2
steps:
- name: Check out TS Project Git repository
uses: actions/checkout@v6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
file: ./openapi3.yaml
fetch-depth: 0

- name: Helm Lint Checks
uses: MapColonies/shared-workflows/actions/helm-lint@helm-lint-v1

security:
openapi-lint:
name: Run OpenAPI lint Check
runs-on: ubuntu-latest

strategy: *node-strategy

steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Check out TS Project Git repository
uses: actions/checkout@v6

- name: Init Nodejs
uses: MapColonies/shared-workflows/actions/init-npm@init-npm-v1
with:
node-version: ${{ matrix.node }}

- name: Lint OpenAPI
run: npx @redocly/cli lint --format=github-actions ./openapi3.yaml


tests:
name: Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.x, 18.x]

strategy: *node-strategy

steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Check out TS Project Git repository
uses: actions/checkout@v6


- name: Set up Node.js
uses: actions/setup-node@v1
- name: Init Nodejs
uses: MapColonies/shared-workflows/actions/init-npm@init-npm-v1
with:
node-version: ${{ matrix.node }}

- name: Install Node.js dependencies
run: npm ci

- name: Run tests
run: npm run test

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v6
with:
name: Test Reporters
path: reports/**
name: Test Reporters ${{ matrix.node }}
path: ./reports/**

build_image:
name: Build Image
build_docker_image:
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: build Docker image
run: docker build -t test-build:latest .
- name: Build and Push Docker image
uses: docker/build-push-action@v6
20 changes: 0 additions & 20 deletions .github/workflows/release-on-tag-push.yaml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/release-please.yaml
Comment thread
razbroc marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
branches:
- master
workflow_dispatch:

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GH_PAT }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12
v24
33 changes: 0 additions & 33 deletions .redocly.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.2.5"
}
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM node:16 as build

FROM node:24.0.0 AS build

WORKDIR /tmp/buildApp

Expand All @@ -9,9 +8,9 @@ RUN npm install
COPY . .
RUN npm run build

FROM node:16.14.2-alpine3.14 as production
FROM node:24.0.0-alpine3.21 AS production

RUN apk add dumb-init
RUN apk add --no-cache dumb-init python3 make g++

ENV NODE_ENV=production
ENV SERVER_PORT=8080
Expand Down
7 changes: 7 additions & 0 deletions openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ info:
license:
name: MIT
url: https://opensource.org/licenses/MIT
security: []
paths:
/resourceName:
get:
Expand All @@ -20,6 +21,12 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/resource'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
post:
operationId: createResource
tags:
Expand Down
Loading
Loading