djencks commented on pull request #667: URL: https://github.com/apache/camel-website/pull/667#issuecomment-966448315
What is your goal here? Is it that the jenkins build should be able to run without running yarn install? And anyone else (e.g. me with my mac) will probably have to run yarn install in order to build the website locally? I think your suggestion of running yarn install isn’t sufficient since it doesn’t run dedupe: my update:dependencies script will probably be sufficient. I ran the first two lines of your script and then yarn update:dependencies from my PR and got a lot of .yarn/unplugged changes: now running yarn build-all outside docker fails. There are no .yarn/cache changes and running yarn check:dependencies succeeds. After both operations there are a few uncommitted changes in .yarn/unplugged. Then, restarting the docker container and running yarn check:dependencies in it succeeds and produces what looks like (git status) the same list of changed .yarn/unplugged files. Since yarn doesn’t report errors I’m running echo $? to find the exit code. This is the first time I’ve succeeded using docker, but I don’t think that running this locally is going to produce the desired results for anyone running on a new mac ARM based laptop. Conceptually I think we need the GitHub PR check to generate an additional PR when running yarn check:dependencies succeeds but leaves uncommitted changes. Alternatively perhaps the jenkins job could run yarn install —immutable —immutable-cache. Meanwhile I’ve written a script to do this and committed the results. > On Nov 11, 2021, at 12:22 AM, Zoran Regvart ***@***.***> wrote: > > > We need to be careful about binaries in the cache, we could end up with MacOS binaries (Mach-O) in the cache instead of Linux (ELF). Best rebuild the cache within the Docker container, there is a Dockerfile in the root of the repository that you can use. The same is used on ci-builds.a.o. Something like this: > > $ docker build -t camel-website . > $ docker run --rm -it -v $(pwd):/work:Z --entrypoint bash --workdir /work camel-website > $ yarn workspaces foreach install > The Z might not be required/work on a Mac, it's about SELinux labeling, and be careful about permissions on the .yarn directory, they might end up being owned by root. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub <https://github.com/apache/camel-website/pull/667#issuecomment-966084940>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAELDXX6QO2OIEWYTV76ZSDULN4MPANCNFSM5HYKMJNQ>. > -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
