Skip to content

Commit

Permalink
Merge pull request #687 from benjsmi/upgrade-os-and-runtimes
Browse files Browse the repository at this point in the history
Upgrade underlying runtimes/os.
  • Loading branch information
ckpaliwal authored Apr 10, 2024
2 parents 87866cc + 976920b commit 4ceed90
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 50 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/apollo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/athena.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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/
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/grpc-web-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/stitch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
13 changes: 4 additions & 9 deletions docker/console/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 .
Expand All @@ -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
Expand All @@ -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

Expand Down
8 changes: 2 additions & 6 deletions docker/grpc-web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
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 && \
go build

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
Expand Down

0 comments on commit 4ceed90

Please sign in to comment.