Skip to content

Commit

Permalink
fix(ci): use rpm instead of zypper to install mongosh in suse docker …
Browse files Browse the repository at this point in the history
…images (#2056)
  • Loading branch information
gribnoysup authored Jul 5, 2024
1 parent 37046e1 commit b9479b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion scripts/docker/suse12-rpm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ ARG artifact_url=""
ADD ${artifact_url} /tmp
ADD node_modules /usr/share/mongodb-crypt-library-version/node_modules
RUN zypper --no-gpg-checks --non-interactive refresh
RUN zypper --no-gpg-checks --non-interactive install /tmp/*mongosh*.rpm
# For some reason zypper ignores half of the files listed for installation in
# the rpm package (in particular the man files are not copied over as expected),
# using rpm directly seems to fix the issue
RUN rpm -i /tmp/*mongosh*.rpm
RUN /usr/bin/mongosh --build-info
RUN env MONGOSH_RUN_NODE_SCRIPT=1 mongosh /usr/share/mongodb-crypt-library-version/node_modules/.bin/mongodb-crypt-library-version /usr/lib64/mongosh_crypt_v1.so | grep -Eq '^mongo_(crypt|csfle)_v1-'
ENTRYPOINT [ "mongosh" ]
5 changes: 4 additions & 1 deletion scripts/docker/suse15-rpm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ ADD node_modules /usr/share/mongodb-crypt-library-version/node_modules
RUN zypper --no-gpg-checks --non-interactive addrepo https://download.opensuse.org/repositories/openSUSE:Leap:15.1:Update/standard/openSUSE:Leap:15.1:Update.repo
RUN zypper --no-gpg-checks --non-interactive refresh
RUN zypper --no-gpg-checks --non-interactive install man
RUN zypper --no-gpg-checks --non-interactive install /tmp/*mongosh*.rpm
# For some reason zypper ignores half of the files listed for installation in
# the rpm package (in particular the man files are not copied over as expected),
# using rpm directly seems to fix the issue
RUN rpm -i /tmp/*mongosh*.rpm
RUN /usr/bin/mongosh --build-info
RUN env MONGOSH_RUN_NODE_SCRIPT=1 mongosh /usr/share/mongodb-crypt-library-version/node_modules/.bin/mongodb-crypt-library-version /usr/lib64/mongosh_crypt_v1.so | grep -Eq '^mongo_(crypt|csfle)_v1-'
RUN man mongosh | grep -q tlsAllowInvalidCertificates
Expand Down

0 comments on commit b9479b1

Please sign in to comment.