Chore: move to node 18 (#58570)

* bump node version to 18

* update folder to 18.x

* update README for m1 instructions

* update drone

* update unit test

* update README
This commit is contained in:
Ashley Harrison 2022-11-11 11:34:00 +00:00 committed by GitHub
parent 891ae91c70
commit 0a9129cf90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 203 additions and 200 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
FROM node:16-alpine3.15 as js-builder
FROM node:18-alpine3.15 as js-builder
ENV NODE_OPTIONS=--max_old_space_size=8000

View File

@ -1,4 +1,4 @@
FROM node:16-alpine3.15 as js-builder
FROM node:18-alpine3.15 as js-builder
ENV NODE_OPTIONS=--max_old_space_size=8000

View File

@ -18,7 +18,7 @@ We recommend using [Homebrew](https://brew.sh/) for installing any missing depen
```
brew install git
brew install go
brew install node@16
brew install node@18
npm install -g yarn
```

View File

@ -431,7 +431,7 @@
]
},
"engines": {
"node": ">= 16"
"node": ">= 18"
},
"packageManager": "yarn@3.2.4"
}

View File

@ -71,6 +71,7 @@ beforeEach(() => {
config.featureToggles.publicDashboards = true;
mockDashboard = new DashboardModel({
uid: 'mockDashboardUid',
timezone: 'utc',
});
mockPanel = new PanelModel({
@ -145,7 +146,7 @@ describe('SharePublic', () => {
await renderSharePublicDashboard({ panel: mockPanel, dashboard: mockDashboard, onDismiss: () => {} });
await screen.findByText('Welcome to Grafana public dashboards alpha!');
expect(screen.getByText('2022-08-30 00:00:00 to 2022-09-04 01:59:59')).toBeInTheDocument();
expect(screen.getByText('2022-08-30 00:00:00 to 2022-09-04 00:59:59')).toBeInTheDocument();
});
it('when modal is opened, then loader spinner appears and inputs are disabled', async () => {
mockDashboard.meta.hasPublicDashboard = true;

View File

@ -105,7 +105,7 @@ FROM debian:buster-20220822
ENV GOVERSION=1.19.3 \
PATH=/usr/local/go/bin:$PATH \
GOPATH=/go \
NODEVERSION=16.14.0-1nodesource1 \
NODEVERSION=18.12.0-1nodesource1 \
YARNVERSION=1.22.19-1
# Use ARG so as not to persist environment variable in image
@ -141,7 +141,7 @@ RUN apt-get update && \
gem install --conservative -N fpm && \
ln -s /usr/bin/llvm-dsymutil-6.0 /usr/bin/dsymutil && \
curl -fsS https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
curl -O https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_${NODEVERSION}_amd64.deb &&\
curl -O https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_${NODEVERSION}_amd64.deb &&\
dpkg -i nodejs_${NODEVERSION}_amd64.deb &&\
rm nodejs_${NODEVERSION}_amd64.deb &&\
curl -fsS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \

View File

@ -14,3 +14,5 @@ In order to build and publish the Grafana build Docker image, execute the follow
docker build -t grafana/build-container:<VERSION> .
docker push grafana/build-container:<VERSION>
```
If you're running on a machine that has an ARM chip (Apple M1/M2, etc.), add `--platform linux/amd64` to the `docker build` command. It can take approximately four hours for an initial build to complete. Due to caching, subsequent builds take less time.

View File

@ -1,7 +1,7 @@
load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket')
grabpl_version = 'v3.0.16'
build_image = 'grafana/build-container:1.6.4'
build_image = 'grafana/build-container:1.6.5'
publish_image = 'grafana/grafana-ci-deploy:1.3.3'
deploy_docker_image = 'us.gcr.io/kubernetes-dev/drone/plugins/deploy-image'
alpine_image = 'alpine:3.15.6'