Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[versions] bump node and golang to modern versions #10241

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.22.7
18.15.0
10 changes: 5 additions & 5 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ Once you have go installed run the following to install gobind

#### Install Node

Currently Node.js v12.x is required in order to work with this repo.
Currently Node.js v18.x is required in order to work with this repo.

Install `nvm` (allows you to manage multiple versions of Node) by following the [instructions here](https://github.com/nvm-sh/nvm).

Once `nvm` is successfully installed, restart the terminal and run the following commands to install the `npm` versions that [celo-monorepo](https://github.com/celo-org/celo-monorepo) will need:

```bash
# restart the terminal after installing nvm
nvm install 12
nvm alias default 12
nvm install 18
nvm alias default 18
```

### MacOS
Expand Down Expand Up @@ -114,8 +114,8 @@ source ~/.bashrc
With Rust binaries in your PATH you should be able to run:

```bash
rustup install 1.42.0
rustup default 1.42.0
rustup install 1.68.2
rustup default 1.68.2
```

If you're building Geth for Android, you need a NDK that has a cross-compilation toolchain. We need version 19.
Expand Down
5 changes: 2 additions & 3 deletions dockerfiles/celotool/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12
FROM node:18
WORKDIR /celo-monorepo

# Needed for gsutil
Expand Down Expand Up @@ -63,9 +63,8 @@ RUN yarn build

ENV PATH="/celo-monorepo/packages/celotool/bin:${PATH}"

COPY --from=golang:1.16-stretch /usr/local/go/ /usr/local/go/
COPY --from=golang:1.19-stretch /usr/local/go/ /usr/local/go/

ENV PATH="/usr/local/go/bin:${PATH}"

CMD ["celotooljs.sh"]

10 changes: 5 additions & 5 deletions dockerfiles/circleci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM circleci/node:10
FROM circleci/node:18
MAINTAINER Connor McEwen <[email protected]>

RUN sudo apt-get update -y
Expand All @@ -16,17 +16,17 @@ RUN export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
sudo apt-get update -y && sudo apt-get install google-cloud-sdk -y

RUN sudo wget https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz && \
sudo tar xf go1.13.5.linux-amd64.tar.gz -C /usr/local
RUN sudo wget https://dl.google.com/go/go1.19.7.linux-amd64.tar.gz && \
sudo tar xf go1.19.7.linux-amd64.tar.gz -C /usr/local

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

ENV PATH="/usr/local/go/bin:/home/circleci/.cargo/bin:${PATH}"

RUN go version

RUN rustup install 1.41.0 && \
rustup default 1.41.0
RUN rustup install 1.68.2 && \
rustup default 1.68.2

RUN mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/cli-standalone/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Example build command:
#
# VERSION=x.y.z; docker build . --build-arg VERSION=$VERSION -t gcr.io/celo-testnet/celocli-standalone:$VERSION
FROM node:10-alpine
FROM node:18-alpine

# Install cli install dependencies.
RUN apk add --no-cache python git make gcc g++ bash libusb-dev linux-headers eudev-dev
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ADD https://www.googleapis.com/storage/v1/b/genesis_blocks/o/${celo_env}?alt=med
ADD https://www.googleapis.com/storage/v1/b/static_nodes/o/${celo_env}?alt=media /celo/static-nodes.json

# Build Celocli
FROM node:10-alpine as node
FROM node:18-alpine as node

ARG celo_env

Expand All @@ -46,7 +46,7 @@ WORKDIR /celo-monorepo/
RUN npm install @celo/celocli

# Build the combined image
FROM node:10-alpine as final_image
FROM node:18-alpine as final_image

ARG network_name="alfajores"
ARG network_id="44787"
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/cloudbuild/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12
FROM node:18

RUN apt-get update -y
RUN apt-get install lsb-release libudev-dev libusb-dev -y --no-install-recommends apt-utils
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/leaderboard/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12
FROM node:18
WORKDIR /celo-monorepo

# ensure yarn.lock is evaluated by kaniko cache diff
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/metadata-crawler/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12
FROM node:18
WORKDIR /celo-monorepo

RUN apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/phone-number-privacy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ COPY packages/sdk/wallets/wallet-local packages/sdk/wallets/wallet-local
COPY packages/sdk/wallets/wallet-remote packages/sdk/wallets/wallet-remote

##### Main stage
FROM node:12
FROM node:18

WORKDIR /celo-phone-number-privacy/

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/docs/command-line-interface/introduction.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/docs/sdk/docs/contractkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ npm install @celo/contractkit
yarn add @celo/contractkit
```

You will need Node.js v12.x. or greater.
You will need Node.js v18.x. or greater.

To start working with contractkit you need a `kit` instance:

Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/contractkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ npm install @celo/contractkit
yarn add @celo/contractkit
```

You will need Node.js v12.x. or greater.
You will need Node.js v18.x. or greater.

To start working with contractkit you need a `kit` instance:

Expand Down