Skip to content

Commit e594694

Browse files
authored
Merge branch 'main-enterprise' into primetheus/repo-variables
2 parents 613359b + 3e5d4fe commit e594694

85 files changed

Lines changed: 12890 additions & 4944 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/javascript-node/.devcontainer/base.Dockerfile
22
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
3-
ARG VARIANT=16-bullseye
4-
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
3+
ARG VARIANT=20-bookworm
4+
FROM mcr.microsoft.com/devcontainers/javascript-node:1-${VARIANT}
55

66
# [Optional] Uncomment this section to install additional OS packages.
77
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
8-
&& apt-get -y install --no-install-recommends python pip
8+
&& apt-get -y install --no-install-recommends python3 python3-pip
99

1010
# [Optional] Uncomment if you want to install an additional version of node using nvm
1111
# ARG EXTRA_NODE_VERSION=10
@@ -17,6 +17,14 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
1717
# Update npm
1818
RUN npm install -g npm
1919
# Intall aws cli
20-
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install
20+
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && \
21+
unzip awscliv2.zip && \
22+
sudo ./aws/install && \
23+
rm -rf ./aws && \
24+
rm awscliv2.zip
2125
# Install sam cli
22-
RUN pip install aws-sam-cli
26+
RUN curl -L "https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-$(dpkg --print-architecture).zip" -o "aws-sam-cli.zip" && \
27+
unzip aws-sam-cli.zip -d sam-installation && \
28+
sudo ./sam-installation/install && \
29+
rm -rf ./sam-installation && \
30+
rm aws-sam-cli.zip

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
88
// Append -bullseye or -buster to pin to an OS version.
99
// Use -bullseye variants on local arm64/Apple Silicon.
10-
"args": { "VARIANT": "16-bullseye" }
10+
"args": { "VARIANT": "20-bookworm" }
1111
},
1212

1313
"settings": {},
@@ -34,4 +34,4 @@
3434

3535
"remoteUser": "node",
3636

37-
}
37+
}

.eslintrc.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,16 @@
88
"standard"
99
],
1010
"parserOptions": {
11-
"ecmaVersion": 12
11+
"ecmaVersion": 13
1212
},
1313
"rules": {
1414
},
15-
"ignorePatterns": ["test/**/*.js"]
15+
"overrides": [
16+
{
17+
"files": ["test/**/*.js"],
18+
"env": {
19+
"jest": true
20+
}
21+
}
22+
]
1623
}

.github/actions/codeql-analysis/action.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/create-pre-release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ env:
3131
REGISTRY: ghcr.io
3232
IMAGE_NAME: ${{ github.repository }}
3333

34+
permissions:
35+
contents: write
36+
packages: write
37+
3438
jobs:
3539
build:
3640
if: ${{ github.actor != 'dependabot'}}
@@ -46,15 +50,15 @@ jobs:
4650
cache: 'npm'
4751
- run: npm install
4852
- name: Set up Docker Buildx
49-
uses: docker/setup-buildx-action@v3
53+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2
5054
- name: Log in to the Container registry
51-
uses: docker/login-action@v3
55+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
5256
with:
5357
registry: ${{ env.REGISTRY }}
5458
username: ${{ github.actor }}
5559
password: ${{ secrets.GITHUB_TOKEN }}
5660
- name: Build Docker Image Locally
57-
uses: docker/build-push-action@master
61+
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0
5862
with:
5963
context: .
6064
file: ./Dockerfile
@@ -73,15 +77,15 @@ jobs:
7377
- run: echo "${{ github.ref }}"
7478
- name: Tag a final release
7579
id: prerelease
76-
uses: actionsdesk/semver@0.6.0-rc.10
80+
uses: actionsdesk/semver@82aa4310e4e21c59cd0020007a4278e733e81dcb
7781
with:
7882
bump: ${{ inputs.bump }}
7983
prerelease: ${{ inputs.prerelease }}
8084
prelabel: ${{ inputs.prelabel }}
8185
commitish: ${{ github.ref }}
8286
- name: Push Docker Image
8387
if: ${{ success() }}
84-
uses: docker/build-push-action@master
88+
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0
8589
with:
8690
context: .
8791
file: ./Dockerfile

.github/workflows/create-release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ env:
99
REGISTRY: ghcr.io
1010
IMAGE_NAME: ${{ github.repository }}
1111

12+
permissions:
13+
contents: write
14+
packages: write
15+
1216
jobs:
1317
build:
1418
if: ${{ github.actor != 'dependabot'}}
@@ -24,15 +28,15 @@ jobs:
2428
cache: "npm"
2529
- run: npm install
2630
- name: Set up Docker Buildx
27-
uses: docker/setup-buildx-action@v3
31+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2
2832
- name: Log in to the Container registry
29-
uses: docker/login-action@v3
33+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
3034
with:
3135
registry: ${{ env.REGISTRY }}
3236
username: ${{ github.actor }}
3337
password: ${{ secrets.GITHUB_TOKEN }}
3438
- name: Build Docker Image Locally
35-
uses: docker/build-push-action@master
39+
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0
3640
with:
3741
context: .
3842
file: ./Dockerfile
@@ -50,12 +54,12 @@ jobs:
5054
curl http://localhost:3000
5155
- name: Tag a final release
5256
id: finalrelease
53-
uses: actionsdesk/semver@0.6.0-rc.10
57+
uses: actionsdesk/semver@82aa4310e4e21c59cd0020007a4278e733e81dcb
5458
with:
5559
bump: final
5660
- name: Push Docker Image
5761
if: ${{ success() }}
58-
uses: docker/build-push-action@master
62+
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0
5963
with:
6064
context: .
6165
file: ./Dockerfile
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Delete old releases
2+
permissions: write-all
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
beforeDate:
8+
type: string
9+
required: true
10+
description: YYYY-MM-DD - All releases before this date are deleted.
11+
default: "2024-01-01"
12+
13+
jobs:
14+
delete-releases:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Delete releases
18+
run: |
19+
for i in $(gh release list --repo https://github.com/$GITHUB_REPOSITORY --json createdAt,tagName --limit 1000 | jq --arg date $BEFORE_DATE '.[] | select(.createdAt < $date ) | .tagName' | tr -d '"'); do gh release delete $i -y --cleanup-tag --repo https://github.com/$GITHUB_REPOSITORY ; done
20+
echo Deleted releases before $BEFORE_DATE in https://github.com/$GITHUB_REPOSITORY >> $GITHUB_STEP_SUMMARY
21+
env:
22+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
BEFORE_DATE: ${{ inputs.beforeDate }}
24+
25+

.github/workflows/deploy-k8s.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,35 +29,35 @@ jobs:
2929
steps:
3030
- name: Checkout repository
3131
uses: actions/checkout@v4
32-
- uses: azure/login@v1
32+
- uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5
3333
with:
3434
client-id: ${{ secrets.AZURE_CLIENT_ID }}
3535
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
3636
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
37-
- uses: azure/aks-set-context@v3
37+
- uses: azure/aks-set-context@c7eb093e5a5d47caa333f64974d5fd1cd4bf069d
3838
with:
3939
resource-group: ${{env.AZURE_RESOURCE_GROUP}}
4040
cluster-name: ${{env.AZURE_AKS_CLUSTER}}
4141
id: login
4242
- run: |
4343
kubectl get deployment
4444
- name: app-env
45-
uses: azure/k8s-create-secret@v4
45+
uses: azure/k8s-create-secret@6e0ba8047235646753f2a3a3b359b4d0006ff218
4646
with:
4747
namespace: 'default'
4848
secret-type: 'generic'
4949
arguments: --from-literal=APP_ID=${{ secrets.APP_ID }} --from-literal=PRIVATE_KEY=${{ secrets.PRIVATE_KEY }} --from-literal=WEBHOOK_SECRET=${{ secrets.WEBHOOK_SECRET }}
5050
secret-name: app-env
5151
- name: Set imagePullSecret
52-
uses: azure/k8s-create-secret@v4
52+
uses: azure/k8s-create-secret@6e0ba8047235646753f2a3a3b359b4d0006ff218
5353
with:
5454
namespace: ${{env.AZURE_AKS_NAMESPACE}}
5555
container-registry-url: ${{env.IMAGE_REGISTRY_URL}}
5656
container-registry-username: ${{ secrets.DOCKER_USERNAME }}
5757
container-registry-password: ${{ secrets.DOCKER_PASSWORD }}
5858
secret-name: 'image-pull-secret'
5959
id: create-secret
60-
- uses: Azure/k8s-deploy@v4.10
60+
- uses: Azure/k8s-deploy@v5
6161
with:
6262
namespace: ${{env.AZURE_AKS_NAMESPACE}}
6363
manifests: |

.github/workflows/node-ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Node.js CI
22
on:
33
pull_request:
44

5+
permissions:
6+
contents: read
7+
58
concurrency:
69
group: ${{ github.workflow }}-${{ github.ref }}
710
cancel-in-progress: true
@@ -15,7 +18,12 @@ jobs:
1518
- name: Setup node
1619
uses: actions/setup-node@v4
1720
with:
18-
node-version: 16.x
21+
node-version: ${{ matrix.node-version }}
1922
cache: npm
2023
- run: npm install
2124
- run: npm run test:unit:ci
25+
strategy:
26+
matrix:
27+
node-version:
28+
- 18
29+
- 20

.github/workflows/rc-release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Tag a rc release
3636
if: ${{ !github.event.pull_request.head.repo.fork }}
3737
id: rcrelease
38-
uses: actionsdesk/semver@0.6.0-rc.10
38+
uses: actionsdesk/semver@82aa4310e4e21c59cd0020007a4278e733e81dcb
3939
with:
4040
prerelease: withBuildNumber
4141
prelabel: rc
@@ -60,23 +60,23 @@ jobs:
6060
- run: echo ${{ github.actor }}
6161

6262
- name: Log in to the Container registry
63-
uses: docker/login-action@v3
63+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
6464
with:
6565
registry: ${{ env.REGISTRY }}
6666
username: ${{ github.actor }}
6767
password: ${{ secrets.GITHUB_TOKEN }}
6868

6969
- name: Extract metadata
7070
id: meta
71-
uses: docker/metadata-action@v5
71+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804
7272
with:
7373
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
7474
- name: Set up QEMU
75-
uses: docker/setup-qemu-action@v3
75+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
7676
- name: Set up Docker Buildx
77-
uses: docker/setup-buildx-action@v3
77+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2
7878
- name: Build and push Docker image
79-
uses: docker/build-push-action@master
79+
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0
8080
with:
8181
context: .
8282
push: true

0 commit comments

Comments
 (0)