Skip to content
Snippets Groups Projects
Commit d6a18ddb authored by Julian's avatar Julian
Browse files

Move NodeJS and Meteor install to .gitlab-ci.yml

Previously, NodeJS and Meteor versions were hard-coded in a special Dockerfile
for building meteor applications. Recently RocketChat began overly precise
version checks during the build process. This made regular manual changes of
the versions necessary. The versions are now extracted from the source tree.

Closes #3
parent f69e525f
No related branches found
No related tags found
No related merge requests found
Pipeline #16610 waiting for manual action
......@@ -16,10 +16,25 @@ autoupdate:
.build:binary:
extends: .build
image: registry.git.cccv.de/infra/packages/docker-images/meteor
image: registry.git.cccv.de/infra/packages/docker-images/bullseye
script:
- meteor --version
- git clone --depth 1 --branch ${UPSTREAM_VERSION} https://github.com/RocketChat/Rocket.Chat rocketchat
- NODEJS_VERSION="$(jq -r .engines.node rocketchat/package.json)"
- METEOR_VERSION="$(cut -d@ -f2 rocketchat/apps/meteor/.meteor/release)"
- wget -q "https://deb.nodesource.com/node_14.x/pool/main/n/nodejs/nodejs_${NODEJS_VERSION}-deb-1nodesource1_amd64.deb" -O nodejs.deb
- apt-get -qq install ./nodejs.deb
# NodeJS < 14.9.0 did not contain corepack
- test -e /usr/bin/corepack || npm install -g corepack
# Install/enable yarn
- corepack enable
- rm nodejs.deb
- wget -q "https://static-meteor.netdna-ssl.com/packages-bootstrap/${METEOR_VERSION}/meteor-bootstrap-os.linux.x86_64.tar.gz" -O meteor-bootstrap.tar.gz
# The package only contains an ".meteor" directory that ends up in "/root/.meteor"
- tar -C ~/ -xzf meteor-bootstrap.tar.gz
- rm meteor-bootstrap.tar.gz
- export METEOR_ALLOW_SUPERUSER=true
- export PATH=$PATH:/root/.meteor
- meteor --version
- cd rocketchat && YARN_CHECKSUM_BEHAVIOR=update yarn install --json && git diff yarn.lock && cd ..
- cd rocketchat && yarn build:ci -- --directory $(pwd)/../build && cd ..
- cd build/bundle/programs/server/ && npm install --production && cd ../../../..
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment