diff --git a/.github/workflows/apollo.yml b/.github/workflows/apollo.yml index 1a026e45..5aeec4d1 100644 --- a/.github/workflows/apollo.yml +++ b/.github/workflows/apollo.yml @@ -14,9 +14,9 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: 18.x - run: npm ci --legacy-peer-deps @@ -26,19 +26,19 @@ jobs: name: NPM Audit runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: 16.x + node-version: 18.x - run: npm audit --production build-code: name: Build code runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x - run: npm ci --legacy-peer-deps @@ -48,8 +48,8 @@ jobs: name: Unit tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x - run: npm ci --legacy-peer-deps diff --git a/.github/workflows/athena.yml b/.github/workflows/athena.yml index 94668a62..9496c32a 100644 --- a/.github/workflows/athena.yml +++ b/.github/workflows/athena.yml @@ -10,22 +10,22 @@ defaults: shell: bash env: - DB_CONNECTION_STRING: http://127.0.0.1:5984/ + DB_CONNECTION_STRING: http://admin:password@127.0.0.1:5984/ jobs: test-suite: name: Test suite runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: 18.x - name: Setup CouchDB - uses: cobot/couchdb-action@v4 + uses: iamssen/couchdb-github-action@master with: - couchdb version: '2.3.1' + couchdb-version: '3.3' - run: curl ${{ env.DB_CONNECTION_STRING }} - run: npm config set registry https://registry.npmjs.org/ - run: npm ci @@ -37,15 +37,15 @@ jobs: name: Start Athena runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: 18.x - name: Setup CouchDB - uses: cobot/couchdb-action@v4 + uses: iamssen/couchdb-github-action@master with: - couchdb version: '2.3.1' + couchdb-version: '3.3' - run: curl ${{ env.DB_CONNECTION_STRING }} - run: npm config set registry https://registry.npmjs.org/ - run: npm ci @@ -55,7 +55,7 @@ jobs: name: NPM Audit runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v1 with: @@ -66,9 +66,9 @@ jobs: name: Validate OpenAPI runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: 18.x - run: npm config set registry https://registry.npmjs.org/ @@ -83,9 +83,9 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: 18.x - run: npm ci diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index c3e51d18..c7dde7b8 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -12,8 +12,8 @@ jobs: matrix: project: [apollo, athena, stitch] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x - name: Audit NPM @@ -25,11 +25,11 @@ jobs: name: Detect Secrets runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: 3.11 - - uses: actions/setup-node@v2 + python-version: 3.12 + - uses: actions/setup-node@v4 with: node-version: 18.x - name: Install detect-secrets diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8e25a6c6..c0e094ba 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,7 +9,7 @@ jobs: docker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build run: ./docker/build_image.sh diff --git a/.github/workflows/grpc-web-docker.yml b/.github/workflows/grpc-web-docker.yml index fadc2b3e..e56e2e34 100644 --- a/.github/workflows/grpc-web-docker.yml +++ b/.github/workflows/grpc-web-docker.yml @@ -7,7 +7,7 @@ jobs: grpc-web: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build run: docker build -t ghcr.io/hyperledger-labs/grpc-web:latest -f docker/grpc-web/Dockerfile . diff --git a/.github/workflows/stitch.yml b/.github/workflows/stitch.yml index fdec2f80..8d529fd4 100644 --- a/.github/workflows/stitch.yml +++ b/.github/workflows/stitch.yml @@ -14,8 +14,8 @@ jobs: name: Build code and test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x - run: npm ci @@ -26,9 +26,9 @@ jobs: name: NPM Audit runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: 18.x - run: npm audit --prod diff --git a/docker/console/Dockerfile b/docker/console/Dockerfile index b54eb921..163e2c34 100644 --- a/docker/console/Dockerfile +++ b/docker/console/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi8/nodejs-18 as client +FROM registry.access.redhat.com/ubi9/nodejs-18 as client ENV STITCH_DIR=/home/stitch ENV APOLLO_DIR=/home/apollo @@ -32,11 +32,6 @@ RUN ls -l $STITCH_DIR/dist # --------------------- # --- Build Apollo --- # --------------------- -# we need to add python for apollo's npm install when using redhat's node 12 image -USER 0 -RUN dnf install python2 -y \ - && export PATH="$PATH:/usr/bin/python2" - USER 1001 WORKDIR $APOLLO_DIR COPY --chown=1001:0 ./apollo . @@ -57,7 +52,7 @@ RUN ls -l $APOLLO_DIR/build # ---------------------------- # ------- Server Setup ------- # ---------------------------- -FROM registry.access.redhat.com/ubi8/nodejs-18 as server +FROM registry.access.redhat.com/ubi9/nodejs-18 as server ENV STITCH_DIR=/home/stitch ENV APOLLO_DIR=/home/apollo ENV SERVER_HOME=/home/athena @@ -83,11 +78,11 @@ WORKDIR $SERVER_HOME COPY --chown=1001:0 ./athena $SERVER_HOME USER 0 -RUN (dnf update || true)\ +RUN (dnf update -y || true)\ && npm ci --omit dev \ # Make sure we can see what packages are getting installed && npm ls --production > npm_ls_prod.txt \ - && (dnf clean all || true) + && (dnf clean all -y || true) RUN chmod -R 777 ./logs RUN chmod -R 777 ./_backups diff --git a/docker/grpc-web/Dockerfile b/docker/grpc-web/Dockerfile index b627fc2f..416f460a 100644 --- a/docker/grpc-web/Dockerfile +++ b/docker/grpc-web/Dockerfile @@ -1,12 +1,8 @@ -FROM golang:1.14-alpine as builder +FROM golang:1.21.9-alpine as builder RUN apk update && apk add --no-cache alpine-sdk bash curl git ca-certificates openssl musl-dev && \ rm -rf /var/lib/apt/lists/* -# RUN apt install -y \ -# openssl - -RUN go get -u github.com/golang/dep/cmd/dep RUN git clone https://github.com/improbable-eng/grpc-web.git /go/src/github.com/improbable-eng/grpc-web RUN cd /go/src/github.com/improbable-eng/grpc-web/go/grpcwebproxy && \ @@ -14,7 +10,7 @@ RUN cd /go/src/github.com/improbable-eng/grpc-web/go/grpcwebproxy && \ RUN cd /go/src/github.com/improbable-eng/grpc-web/misc && ./gen_cert.sh -FROM golang:1.14-alpine +FROM golang:1.21.9-alpine COPY --from=builder /go/src/github.com/improbable-eng/grpc-web/go/grpcwebproxy/grpcwebproxy /usr/bin/grpcwebproxy COPY --from=builder /go/src/github.com/improbable-eng/grpc-web/misc/localhost.crt /certs/localhost.crt