Skip to content

bump nodejs to next lts #198

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

Merged
merged 4 commits into from
Jan 8, 2024
Merged

bump nodejs to next lts #198

merged 4 commits into from
Jan 8, 2024

Conversation

esron
Copy link
Contributor

@esron esron commented Dec 26, 2023

This upgrades the base and test images to use node 18.
It also fixes some of the build problems that come with node 18.
This is a substitute to #194 due to visual-qontract being in the hands of functional-stream-1 now.

@esron
Copy link
Contributor Author

esron commented Dec 26, 2023

Even tho the pipeline is passing the tests are not passing.

As can be seen by the last lines of the output

12:54:17 #9 59.79 FAIL src/App.test.js
12:54:17 #9 59.79   ��� Test suite failed to run
12:54:17 #9 59.79 
12:54:17 #9 59.79     Jest encountered an unexpected token
12:54:17 #9 59.79 
12:54:17 #9 59.79     This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
12:54:17 #9 59.79 
12:54:17 #9 59.79     By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
12:54:17 #9 59.79 
12:54:17 #9 59.79     Here's what you can do:
12:54:17 #9 59.79      ��� To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
12:54:17 #9 59.79      ��� If you need a custom transformation specify a "transform" option in your config.
12:54:17 #9 59.79      ��� If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
12:54:17 #9 59.79 
12:54:17 #9 59.79     You'll find more details and examples of these config options in the docs:
12:54:17 #9 59.79     https://jestjs.io/docs/en/configuration.html
12:54:17 #9 59.79 
12:54:17 #9 59.79     Details:
12:54:17 #9 59.79 
12:54:17 #9 59.79     /opt/visual-qontract/node_modules/react-markdown/index.js:6
12:54:17 #9 59.79     export {uriTransformer} from './lib/uri-transformer.js'
12:54:17 #9 59.79     ^^^^^^
12:54:17 #9 59.79 
12:54:17 #9 59.79     SyntaxError: Unexpected token 'export'
12:54:17 #9 59.79 
12:54:17 #9 59.79       at new Script (node:vm:94:7)
12:54:17 #9 59.79       at Object.<anonymous> (src/pages/elements/Scorecard.js:3:1)
12:54:17 #9 59.79 
12:54:17 #9 59.79 Test Suites: 1 failed, 1 total
12:54:17 #9 59.79 Tests:       0 total
12:54:17 #9 59.79 Snapshots:   0 total
12:54:17 #9 59.79 Time:        8.618s
12:54:17 #9 59.79 Ran all test suites.
12:54:17 #9 59.83 Done in 12.70s.
12:54:40 #9 DONE 82.7s
12:54:40 
12:54:40 #10 exporting to image
12:54:40 #10 exporting layers
12:54:51 #10 exporting layers 10.9s done
12:54:51 #10 writing image sha256:62431b2754390393bf4c7c459b4959cac144f7e0fb3d30ee75ac44eb1324ab47 done
12:54:51 #10 naming to docker.io/library/visual-qontract-test done
12:54:51 #10 DONE 10.9s
12:54:51 This is a S2I nodejs-18 rhel base image:
12:54:51 To use it, install S2I: https://github.com/openshift/source-to-image
12:54:51 
12:54:51 Sample invocation:
12:54:51 
12:54:51 s2i build https://github.com/sclorg/s2i-nodejs-container.git --context-dir=18/test/test-app/ /nodejs-18-rhel7 nodejs-sample-app
12:54:51 
12:54:51 You can then run the resulting image via:
12:54:51 podman run -p 8080:8080 nodejs-sample-app
12:54:51 [app-sre-visual-qontract-gh-pr-check] $ /bin/sh -xe /tmp/jenkins1071934483637069467.sh
12:54:51 + '[' -z '' ']'
12:54:51 + exit
12:54:51 Setting status of 095d535ebaf54befe1d9bdf87fe74dcc8b16f234 to SUCCESS with url https://ci.ext.devshift.net/job/app-sre-visual-qontract-gh-pr-check/113/ and message: ' '

@esron esron force-pushed the nodejs-bump branch 2 times, most recently from e22f8dc to f064920 Compare January 2, 2024 18:26
Copy link
Contributor

@hemslo hemslo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@esron esron merged commit f818e51 into app-sre:master Jan 8, 2024
@esron esron deleted the nodejs-bump branch January 8, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants