From 3b5022be0ac239b647e3bf28e98e049e2690c6f0 Mon Sep 17 00:00:00 2001 From: Jean-Francois HOVINNE <jean-francois.hovinne@ext.ec.europa.eu> Date: Tue, 14 Nov 2023 16:03:35 +0000 Subject: [PATCH] docs: Update readme, add license (fixes #2) --- .gitlab-ci.yml | 4 ++++ README.md | 33 +++++++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d72973..fdc8ddb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,11 +3,15 @@ build nodejs: - ecgalaxy-docker image: name: index.docker.io/library/amazonlinux:2 + only: + refs: + - master script: - ./init-environment - NODE_MAJOR_VERSION="${NODE_MAJOR_VERSION:=20}" - NODE_VERSION=$(python3 get-nodejs-latest.py ${NODE_MAJOR_VERSION}) - ./build-nodejs-version ${NODE_VERSION} 1> /dev/null + - curl -sL -o /opt/nodejs/${NODE_VERSION}/LICENSE https://raw.githubusercontent.com/nodejs/node/main/LICENSE - mkdir -p artifacts - tar -czf artifacts/nodejs-v${NODE_VERSION}.tar.gz /opt/nodejs/${NODE_VERSION} - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file artifacts/nodejs-v${NODE_VERSION}.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${NODE_VERSION}/nodejs-v${NODE_VERSION}.tar.gz"' diff --git a/README.md b/README.md index db5b4e7..cde1a28 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,32 @@ -# amazonlinux2-nodejs +amazonlinux2-nodejs +=================== -A GitLab pipeline to build Node.js for Amazon Linux 2. +A GitLab pipeline to build [Node.js](https://nodejs.org/) 18.x and 20.x for Amazon Linux 2. + +Rationale +--------- + +Starting from 18.x, official Node.js LTS builds cannot be used on Amazon Linux 2, due to +binary incompatibilities (missing glibc symbol versions). + +AWS recommends to build those Node.js versions from source, when using Amazon Linux 2 (AL2). + +Implementation +-------------- + +The pipeline launches an `amazonlinux:2` container and: + +* Installs prerequisites +* Fetches the latest release tag for a specific Node.js major version +* Builds this release from source code +* Publishes the build to this project's package registry + +Original work +------------- + +Original code provided by AWS. + +Author Information +------------------ + +ECGALAXY team. -- GitLab