Uploaded image for project: 'FOLIO'
  1. FOLIO
  2. FOLIO-3432

Update NodeJS to Active LTS (v16) in GitHub Actions images



    • DevOps Sprint 139, DevOps Sprint 140, DevOps Sprint 141, DevOps Sprint 142
    • FOLIO DevOps
    • TBD


      Summary: Use NodeJS's Active LTS (v16 as of February 2022) in GitHub Actions CI images, by setting NODEJS_VERSION: '16' in /.github/actions/build-npm* and changing related values accordingly for NodeJS 16/NPM 8 compatibility. There are four changes in total in the .github/workflows files:

      1. replace
        NODEJS_VERSION: '12'


        NODEJS_VERSION: '16'
      2. below FOLIO_NPM_REGISTRY, in build-npm-release.yml add
        FOLIO_NPM_REGISTRY_AUTH: '//repository.folio.org/repository/npm-folio/'

        and in build-npm.yml add

        FOLIO_NPM_REGISTRY_AUTH: '//repository.folio.org/repository/npm-folioci/'
      3. replace
        npm config set _auth $NODE_AUTH_TOKEN


        npm config set $FOLIO_NPM_REGISTRY_AUTH:_auth $NODE_AUTH_TOKEN
      4. in multiple locations, replace
        uses: actions/setup-node@v2


        uses: actions/setup-node@v3

      This is also a good time to remove engines.node from package.json because that is a statement of production compatibility and in production this is not a node app. Although we leverage node in development to run lint, tests, compile translations, etc., node is not a production dependency.

      Details: While investigating some recent UI test failures in CI, we discovered the build-npm.yml files used by most UI repos pin the NodeJS version to v12 (e.g. from ui-requests), a release that is nearing EOL. We’d like to stick to the Active LTS (v16 at present), which I think will happen automatically if we unset the node-version, or if we accept the default version. I don't have strong feelings about the "right" approach; I am sympathetic to avoiding defaults in order to directly control the env as much as possible, but also to the fact that we have many UI apps and issuing 60+ "bump Node's Active LTS version" PRs every year is no fun.

      Additional relevant links originally provided by julianladisch:

      TestRail: Results


          Issue Links



                ankitasen Ankita Sen
                zburke Zak_Burke
                0 Vote for this issue
                7 Start watching this issue



                  TestRail: Runs

                    TestRail: Cases