This file contains hidden or 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
datasources: | |
datasources.yaml: | |
apiVersion: 1 | |
datasources: | |
- name: Prometheus | |
type: prometheus | |
url: http://prometheus-server.monitoring.svc.cluster.local | |
access: proxy | |
isDefault: false | |
- name: Loki |
This file contains hidden or 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
import {promises as fs} from 'fs'; | |
import * as path from 'path'; | |
import puppeteer, {Browser} from 'puppeteer'; | |
import pLimit from "p-limit"; | |
import {chunkArray} from "../../common/arrayHelper"; | |
import {sleep} from "../../common/sleep"; | |
interface URLResult { | |
originalUrl: string; | |
finalUrl: string; |
This file contains hidden or 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
# Stage 1 - Building the app | |
FROM node:lts as builder | |
ENV CI=true | |
WORKDIR /site | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . |
This file contains hidden or 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
name: Build and Push Docker Image | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest |
This file contains hidden or 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
import semver from 'semver'; | |
import fs from "fs"; | |
function bumpVersion(currentVersion: string, release: 'major' | 'minor' | 'patch'): string { | |
const newVersion = semver.inc(currentVersion, release); | |
if (!newVersion) { | |
throw new Error('Failed to bump version'); | |
} | |
return newVersion; | |
} |
This file contains hidden or 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
/** | |
* Shuffles the elements of an array in place using the Fisher-Yates algorithm. | |
* | |
* @param {T[]} array - The array to be shuffled. | |
* @return {T[]} The shuffled array. | |
*/ | |
export function shuffleArray<T>(array: T[]): T[] { | |
for (let i = array.length - 1; i > 0; i--) { | |
const j = Math.floor(Math.random() * (i + 1)); | |
[array[i], array[j]] = [array[j], array[i]]; |