OperationCode / operationcode_old_site

Our open source website. We're on a mission to help the military community learn software development, enter the tech industry, and code the future.
https://www.operationcode.org/
MIT License
229 stars 155 forks source link

Upgrade yarn in front-end CI #764

Closed kylemh closed 6 years ago

kylemh commented 7 years ago

Currently on v0.24.something

We can upgrade to latest with no breaking changes, and receive performance benefits and bug fixes.

jjhampton commented 6 years ago

The Docker build on CI is running yarn v0.24.4 - and I believe this is because we're specifying in the front-end Dockerfile to pull from the node:7 tag (NodeJS v7.10.1) on Docker Hub:

# Dockerfile
FROM node:7

The Node v7 Docker tags were removed from the official docker-node repo, since Node v7.10.1 is no longer maintained: https://github.com/nodejs/docker-node/commit/a2600f4e0e4af5abd4a8e2a88cf46337500dbe7c

Interestingly enough, the Node v7.10.1 tags aren't even listed anymore in Docker Hub, though you can still pull them: https://hub.docker.com/r/library/node/tags/ related discussion on docker-node repo

Node v8 Docker tag from the docker-node installs the newer version of Yarn (1.5.1). My local dev machine is running this version of Yarn and it works well: https://github.com/nodejs/docker-node/blob/master/8/Dockerfile

I suggest that we pull from node:8 in the Dockerfile (which uses Node v8.11.1) instead. That's the version that most current devs should be running on their machines (assuming they're staying up-to-date w/ Node), and is the active Node LTS. We also should avoid running odd-numbered Node versions (more unstable), since only even-numbered versions are eligible for LTS support (4,6,8, etc): https://github.com/nodejs/Release#release-plan

Upgrading to Node v8.11.1 will install the new version of Yarn (specified in this issue). I'm also seeing some inconsistencies w/ yarn install and the version of Yarn being used on step 8 when comparing various Docker builds on local dev machines (see Gist logs linked in https://github.com/OperationCode/operationcode_frontend/pull/946) and build logs from CI - I'm hoping this would fix that.

We can give this a shot by changing one line in the front-end Dockerfile - thoughts? @kylemh @ohaiwalt

kylemh commented 6 years ago

https://github.com/OperationCode/operationcode_frontend/blob/master/Dockerfile

Cowboy commit ðŸ¤