Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
Upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdean-digicatapult committed Mar 1, 2023
1 parent d342a56 commit 206e4c7
Show file tree
Hide file tree
Showing 21 changed files with 1,168 additions and 1,795 deletions.
124 changes: 13 additions & 111 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,105 +29,17 @@ jobs:
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_OUTPUT
echo "ORG_NAME=$ORG_NAME" >> $GITHUB_OUTPUT
helm-lint:
runs-on: ubuntu-latest
needs: [preconditions]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.8.0
- uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (lint)
run: ct lint --validate-maintainers false --charts helm/${{ needs.preconditions.outputs.repo_name }}/ --chart-repos dscp-node=https://digicatapult.github.io/dscp-node/,dscp-ipfs=https://digicatapult.github.io/dscp-ipfs/

helm-test:
runs-on: ubuntu-latest
needs: [preconditions]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: '--debug'
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.8.0
- uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: 'v1.17.1'
kubernetes version: 'v1.19.2'
- name: Login to minikube docker registry
run: eval $(minikube -p minikube docker-env)
- name: Build Multi-arch
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
load: false
file: ./Dockerfile
platforms: linux/amd64, linux/arm64
tags: |
${{ needs.preconditions.outputs.repo_name }}:latest
labels: |
org.opencontainers.image.title=${{ needs.preconditions.outputs.repo_name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.revision=${{ github.sha }}
- name: Load and push image for testing
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
load: true
file: ./Dockerfile
platforms: linux/amd64
tags: |
${{ needs.preconditions.outputs.repo_name }}:latest
labels: |
org.opencontainers.image.title=${{ needs.preconditions.outputs.repo_name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.revision=${{ github.sha }}
- name: Run chart-testing (install)
run: ct install --charts helm/${{ needs.preconditions.outputs.repo_name }}/ --chart-repos dscp-node=https://digicatapult.github.io/dscp-node/,dscp-ipfs=https://digicatapult.github.io/dscp-ipfs/

lint:
name: Run lint
runs-on: ubuntu-latest
needs: [preconditions]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@master
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
node-version: 18.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
uses: actions/cache@v3
with:
Expand All @@ -150,11 +62,11 @@ jobs:
needs: [preconditions]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@master
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
node-version: 18.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
uses: actions/cache@v3
with:
Expand All @@ -181,11 +93,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@master
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
node-version: 18.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -227,8 +139,6 @@ jobs:
name: 'Publish package'
needs:
- preconditions
- helm-lint
- helm-test
- lint
- dependency-check
- tests
Expand Down Expand Up @@ -261,7 +171,7 @@ jobs:
username: ${{ secrets.DSCP_DOCKERHUB_USERNAME }}
password: ${{ secrets.DSCP_DOCKERHUB_TOKEN }}
- name: Publish multi-arch image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -282,14 +192,6 @@ jobs:
org.opencontainers.image.version=${{ needs.check-version.outputs.version }}
org.opencontainers.image.created=${{ needs.check-version.outputs.build_date }}
# Publish helm charts
- name: Publish Helm charts
uses: stefanprodan/helm-gh-pages@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
charts_dir: helm
helm_version: 3.8.0

# Build github release
- name: Build release version
uses: softprops/action-gh-release@v1
Expand Down
112 changes: 12 additions & 100 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,104 +23,16 @@ jobs:
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_OUTPUT
echo "ORG_NAME=$ORG_NAME" >> $GITHUB_OUTPUT
helm-lint:
runs-on: ubuntu-latest
needs: [repo_ids]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.8.0
- uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (lint)
run: ct lint --validate-maintainers false --charts helm/${{ needs.repo_ids.outputs.repo_name }}/ --chart-repos dscp-node=https://digicatapult.github.io/dscp-node/,dscp-ipfs=https://digicatapult.github.io/dscp-ipfs/

helm-test:
runs-on: ubuntu-latest
needs: [repo_ids]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: '--debug'
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.8.0
- uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: 'v1.17.1'
kubernetes version: 'v1.19.2'
- name: Login to minikube docker registry
run: eval $(minikube -p minikube docker-env)
- name: Build Multi-arch
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
load: false
file: ./Dockerfile
platforms: linux/amd64, linux/arm64
tags: |
${{ needs.repo_ids.outputs.repo_name }}:latest
labels: |
org.opencontainers.image.title=${{ needs.repo_ids.outputs.repo_name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.revision=${{ github.sha }}
- name: Load and push image for testing
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
load: true
file: ./Dockerfile
platforms: linux/amd64
tags: |
${{ needs.repo_ids.outputs.repo_name }}:latest
labels: |
org.opencontainers.image.title=${{ needs.repo_ids.outputs.repo_name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.revision=${{ github.sha }}
- name: Run chart-testing (install)
run: ct install --charts helm/${{ needs.repo_ids.outputs.repo_name }}/ --chart-repos dscp-node=https://digicatapult.github.io/dscp-node/,dscp-ipfs=https://digicatapult.github.io/dscp-ipfs/

lint:
name: Run lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@master
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
node-version: 18.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
uses: actions/cache@v3
with:
Expand All @@ -142,11 +54,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@master
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
node-version: 18.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
uses: actions/cache@v3
with:
Expand All @@ -173,11 +85,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@master
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
node-version: 18.x
- name: Use npm latest
run: npm install -g npm@latest
- name: Cache Node.js modules
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:16-alpine
FROM node:lts-alpine

COPY . .
ARG TARGETPLATFORM
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then apk add --no-cache python3 make g++; fi
RUN npm install -g npm@8.x.x
RUN npm install -g npm@latest

RUN npm ci --prod
EXPOSE 3001
Expand Down
2 changes: 1 addition & 1 deletion app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export async function createHttpServer() {
}
: {}

initialize({
await initialize({
app,
apiDoc: apiDoc,
consumesMiddleware: {
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
ipfs:
image: ipfs/go-ipfs:v0.16.0
image: ipfs/go-ipfs:v0.18.1
environment:
- |
IPFS_SWARM_KEY=/key/swarm/psk/1.0.0/
Expand All @@ -12,7 +12,7 @@ services:
- 8080:8080
- 5001:5001
ipfs-2:
image: ipfs/go-ipfs:v0.16.0
image: ipfs/go-ipfs:v0.18.1
environment:
- |
IPFS_SWARM_KEY=/key/swarm/psk/1.0.0/
Expand All @@ -23,7 +23,7 @@ services:
- 8081:8080
- 5002:5001
dscp-node:
image: digicatapult/dscp-node:v4.4.6
image: digicatapult/dscp-node:v4.5.1
command:
--base-path /data/
--dev
Expand Down
9 changes: 0 additions & 9 deletions helm/dscp-api/Chart.lock

This file was deleted.

22 changes: 0 additions & 22 deletions helm/dscp-api/Chart.yaml

This file was deleted.

Loading

0 comments on commit 206e4c7

Please sign in to comment.