Skip to content
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

TECH-1635 Revert most layer changes #70

Merged
merged 3 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ if [ -d ./jahia-module ]; then
fi
cd ..
fi
YARN_VERSION=${YARN_VERSION:-1.22.22}
YARN_VERSION=${YARN_VERSION:-1.22.19}

docker build --build-arg YARN_VERSION=${YARN_VERSION} -f $BASEDIR/env.Dockerfile -t ${TESTS_IMAGE} .
24 changes: 13 additions & 11 deletions env.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,27 @@ FROM cypress/browsers:node-20.10.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.

ARG MAVEN_VER="3.8.1"
ARG MAVEN_BASE_URL="https://archive.apache.org/dist/maven/maven-3"
ARG YARN_VERSION="1.22.22"
ARG YARN_VERSION="1.22.19"

RUN apt-get update && apt-get install -y jq curl ; \
adduser --disabled-password jahians ; \
mkdir -p /home/jahians/run-artifacts /home/jahians/results /home/jahians/cypress/plugins; \
npm install -g corepack ; \
corepack enable
RUN apt-get update && apt-get install -y jq curl

RUN adduser --disabled-password jahians

USER jahians
WORKDIR /home/jahians

COPY --chown=jahians:jahians . /home/jahians
COPY --chown=jahians:jahians package.json yarn.lock /home/jahians/

RUN mkdir -p /home/jahians/run-artifacts /home/jahians/results /home/jahians/cypress/plugins

#CI=true reduces the verbosity of the installation logs
RUN CI=true yarn set version ${YARN_VERSION} ; \
yarn install; \
/home/jahians/node_modules/.bin/cypress install
yarn install
Copy link
Member

@Fgerthoffert Fgerthoffert Mar 18, 2024

Choose a reason for hiding this comment

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

Not keeping the --non-interactive ?

Previously:


CI=true yarn install --non-interactive

https://github.com/Jahia/jahia-cypress/blob/2755897be8f8a9aa5daf0230afbefe1fe0b356ca/env.Dockerfile#L18C5-L18C43

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's deprecated in Yarn v4


COPY --chown=jahians:jahians . /home/jahians

RUN CI=true /home/jahians/node_modules/.bin/cypress install

# Exit 0 is used to not fail if the maven.settings.xml file is not present
RUN mkdir -p .m2; cp maven.settings.xml .m2/settings.xml; exit 0
RUN mkdir -p .m2; cp maven.settings.xml .m2/settings.xml; exit 0

CMD /bin/bash -c /home/jahians/env.run.sh
Loading