Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1,108 changes: 934 additions & 174 deletions .evergreen.yml

Large diffs are not rendered by default.

126 changes: 69 additions & 57 deletions .evergreen/evergreen.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,51 @@ const EXECUTABLE_PKG_INFO = [
executableOsId: 'linux-x64',
compileBuildVariant: 'linux_x64_build',
distributionBuildVariants: [
{ name: 'linux-x64', packageOn: 'linux_package', smokeTestKind: 'none' },
{ name: 'debian-x64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu18.04-deb', 'ubuntu20.04-deb', 'debian9-deb', 'debian10-deb', 'debian11-deb'] },
{ name: 'linux-x64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu20.04-tgz'] },
{ name: 'debian-x64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu18.04-deb', 'ubuntu20.04-deb', 'ubuntu22.04-deb', 'debian9-deb', 'debian10-deb', 'debian11-deb'] },
{ name: 'rhel7-x64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['centos7-rpm', 'amazonlinux2-rpm'] },
{ name: 'rhel8-x64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['rocky8-rpm', 'fedora34-rpm'] },
{ name: 'suse-x64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['suse12-rpm', 'suse15-rpm'] },
{ name: 'amzn1-x64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['amazonlinux1-rpm'] }
]
},
{
executableOsId: 'linux-x64-openssl11',
compileBuildVariant: 'linux_x64_build_openssl11',
distributionBuildVariants: [
{ name: 'linux-x64-openssl11', packageOn: 'linux_package', smokeTestKind: 'none' },
{ name: 'debian-x64-openssl11', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu20.04-deb', 'debian10-deb', 'debian11-deb'] },
{ name: 'rhel7-x64-openssl11', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['centos7-epel-rpm', 'amazonlinux2-rpm'] },
{ name: 'rhel8-x64-openssl11', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['rocky8-rpm', 'fedora34-rpm'] }
]
},
{
executableOsId: 'linux-x64-openssl3',
compileBuildVariant: 'linux_x64_build_openssl3',
distributionBuildVariants: [
{ name: 'linux-x64-openssl3', packageOn: 'linux_package', smokeTestKind: 'none' },
{ name: 'debian-x64-openssl3', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu22.04-deb'] },
{ name: 'rhel8-x64-openssl3', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['rocky8-epel-rpm'] }
]
},
{
executableOsId: 'linux-arm64',
compileBuildVariant: 'linux_arm64_build',
distributionBuildVariants: [
{ name: 'linux-arm64', packageOn: 'linux_package', smokeTestKind: 'none' },
{ name: 'debian-arm64', packageOn: 'linux_package', smokeTestKind: 'debextract' },
{ name: 'rhel8-arm64', packageOn: 'linux_package', smokeTestKind: 'rpmextract' },
{ name: 'amzn2-arm64', packageOn: 'linux_package', smokeTestKind: 'rpmextract' }
{ name: 'linux-arm64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu20.04-tgz'] },
{ name: 'debian-arm64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu18.04-deb', 'ubuntu20.04-deb', 'ubuntu22.04-deb', 'debian10-deb', 'debian11-deb'] },
{ name: 'rhel8-arm64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['rocky8-rpm', 'fedora34-rpm'] },
{ name: 'amzn2-arm64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['amazonlinux2-rpm'] }
]
},
{
executableOsId: 'linux-arm64-openssl11',
compileBuildVariant: 'linux_arm64_build_openssl11',
distributionBuildVariants: [
{ name: 'linux-arm64-openssl11', packageOn: 'linux_package', smokeTestKind: 'none' },
{ name: 'debian-arm64-openssl11', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu20.04-deb', 'debian10-deb', 'debian11-deb'] },
{ name: 'rhel8-arm64-openssl11', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['rocky8-rpm', 'fedora34-rpm'] },
{ name: 'amzn2-arm64-openssl11', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['amazonlinux2-rpm'] }
]
},
{
Expand Down Expand Up @@ -799,7 +828,7 @@ tasks:
<% for (const { distributionBuildVariants } of EXECUTABLE_PKG_INFO) {
for (const { name, packageOn, smokeTestKind, smokeTestDockerfiles } of distributionBuildVariants) if (smokeTestKind !== 'none') {
for (const dockerfile of smokeTestDockerfiles || ['']) { %>
- name: pkg_test_<% out(`${smokeTestKind}_${(dockerfile || name).replace(/[-.]/g, '_')}`) %>
- name: pkg_test_<% out(`${smokeTestKind}_${name}${dockerfile ? `_${dockerfile}` : ''}`.replace(/[-.]/g, '_')) %>
tags: ["smoke-test"]
depends_on:
- name: package_and_upload_artifact_<% out(name.replace(/-/g, '_')) %>
Expand Down Expand Up @@ -921,8 +950,6 @@ buildvariants:
executable_os_id: darwin-arm64
tasks:
- name: compile_artifact
# - name: e2e_tests_darwin_arm64
# No E2E test for now because there are no server releases to run them against

- name: linux_unit
display_name: "Ubuntu 18.04 x64 (Unit tests)"
Expand All @@ -945,20 +972,11 @@ buildvariants:
display_name: "Ubuntu 18.04 x64 (Packaging)"
run_on: ubuntu1804-small
tasks:
- name: package_and_upload_artifact_linux_x64
- name: package_and_upload_artifact_debian_x64
- name: package_and_upload_artifact_rhel7_x64
- name: package_and_upload_artifact_rhel8_x64
- name: package_and_upload_artifact_suse_x64
- name: package_and_upload_artifact_amzn1_x64
- name: package_and_upload_artifact_linux_s390x
- name: package_and_upload_artifact_rhel7_s390x
- name: package_and_upload_artifact_linux_arm64
- name: package_and_upload_artifact_debian_arm64
- name: package_and_upload_artifact_rhel8_arm64
- name: package_and_upload_artifact_amzn2_arm64
- name: package_and_upload_artifact_linux_ppc64le
- name: package_and_upload_artifact_rhel8_ppc64le
<% for (const { executableOsId, distributionBuildVariants } of EXECUTABLE_PKG_INFO) {
for (const { name: distributionBuildVariant } of distributionBuildVariants) {
if (executableOsId.startsWith('linux')) { %>
- name: package_and_upload_artifact_<% out(distributionBuildVariant.replace(/-/g, '_')) %>
<% } } } %>
- name: linux_x64_build
display_name: "RHEL 7.0 x64 (build)"
run_on: rhel70-build
Expand Down Expand Up @@ -1027,6 +1045,12 @@ buildvariants:
run_on: rhel80-small
tasks:
- name: e2e_tests_linux_x64
- name: e2e_rhel83_x64
display_name: "RHEL 8.3 x64 (E2E Tests, FIPS-available OS)"
run_on: rhel83-fips
tasks:
- name: e2e_tests_linux_x64
- name: e2e_tests_linux_x64_openssl11
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This doesn’t (shouldn’t?) yet test mongosh in FIPS mode, it’s only that the OS itself is set up to support FIPS.

- name: e2e_ubuntu1804_x64
display_name: "Ubuntu 18.04 x64 (E2E Tests)"
run_on: ubuntu1804-small
Expand All @@ -1037,6 +1061,7 @@ buildvariants:
run_on: ubuntu2004-small
tasks:
- name: e2e_tests_linux_x64
- name: e2e_tests_linux_x64_openssl11
- name: e2e_debian9_x64
display_name: "Debian 9 x64 (E2E Tests)"
run_on: debian92-small
Expand All @@ -1047,11 +1072,13 @@ buildvariants:
run_on: debian10-small
tasks:
- name: e2e_tests_linux_x64
- name: e2e_tests_linux_x64_openssl11
- name: e2e_debian11_x64
display_name: "Debian 11 x64 (E2E Tests)"
run_on: debian11-small
tasks:
- name: e2e_tests_linux_x64_unstable
- name: e2e_tests_linux_x64_openssl11_unstable
- name: e2e_amazon1_x64
display_name: "Amazon Linux 1 x64 (E2E Tests)"
run_on: amazon1-2018-small
Expand Down Expand Up @@ -1082,6 +1109,7 @@ buildvariants:
run_on: ubuntu2004-arm64-small
tasks:
- name: e2e_tests_linux_arm64
- name: e2e_tests_linux_arm64_openssl11
- name: e2e_amazon2_arm64
display_name: "Amazon Linux 2 arm64 (E2E Tests)"
run_on: amazon2-arm64-small
Expand Down Expand Up @@ -1137,22 +1165,26 @@ buildvariants:
tasks:
- name: compile_artifact

- name: pkg_smoke_tests_docker
display_name: "package smoke tests (Docker)"
- name: pkg_smoke_tests_docker_x64
display_name: "package smoke tests (x64 Docker)"
run_on: ubuntu1804-small
tasks:
- name: pkg_test_docker_centos7_rpm
- name: pkg_test_docker_rocky8_rpm
- name: pkg_test_docker_fedora34_rpm
- name: pkg_test_docker_suse12_rpm
- name: pkg_test_docker_suse15_rpm
- name: pkg_test_docker_amazonlinux1_rpm
- name: pkg_test_docker_amazonlinux2_rpm
- name: pkg_test_docker_debian9_deb
- name: pkg_test_docker_debian10_deb
- name: pkg_test_docker_debian11_deb
- name: pkg_test_docker_ubuntu18_04_deb
- name: pkg_test_docker_ubuntu20_04_deb
<% for (const { distributionBuildVariants, executableOsId } of EXECUTABLE_PKG_INFO) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was wondering, is there a way to move this heavy logic outside of yaml? Seems hard to understand the code here and also a bit intimidating to change.

If we are using something like lodash.template or similar I'd prefer something like this with more helpers:

<% for ( const dockerfile of getSmokeTestDockerfiles(EXECUTABLE_PKG_INFO)) { %>
  - name: pkg_test_<%= asTaskName('pkg_test', dockerfile) %>
<% } %>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mh yeah, we could look into using lodash.template at some point, and we can also add helper functions for simplifying this.

It’s definitely easier not to outsource everything from the YAML here though; it has been very helpful to have a single source of truth for how our CI jobs are defined.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, that's a good point, I mainly find it hard to parse, probably just having helpers to make the code "lighter" would be enough.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It absolutely is hard to parse! I don’t want to act like it isn’t :)

I’ll definitely think about it, for now my main goal here is getting everything to work tbh

if (executableOsId.includes('linux-x64')) {
for (const { name, smokeTestKind, smokeTestDockerfiles } of distributionBuildVariants) if (smokeTestKind !== 'none') {
for (const dockerfile of smokeTestDockerfiles || []) { %>
- name: pkg_test_<% out(`${smokeTestKind}_${name}${dockerfile ? `_${dockerfile}` : ''}`.replace(/[-.]/g, '_')) %>
<% } } } } %>
- name: pkg_smoke_tests_docker_arm64
display_name: "package smoke tests (arm64 Docker)"
run_on: ubuntu1804-arm64-small
tasks:
<% for (const { distributionBuildVariants, executableOsId } of EXECUTABLE_PKG_INFO) {
if (executableOsId.includes('linux-arm64')) {
for (const { name, smokeTestKind, smokeTestDockerfiles } of distributionBuildVariants) if (smokeTestKind !== 'none') {
for (const dockerfile of smokeTestDockerfiles || []) { %>
- name: pkg_test_<% out(`${smokeTestKind}_${name}${dockerfile ? `_${dockerfile}` : ''}`.replace(/[-.]/g, '_')) %>
<% } } } } %>
- name: pkg_smoke_tests_win32
display_name: "package smoke tests (win32)"
run_on: ubuntu1804-small
Expand All @@ -1174,26 +1206,6 @@ buildvariants:
run_on: macos-1100-arm64
tasks:
- name: pkg_test_macos_darwin_arm64
- name: pkg_smoke_tests_ubuntu1804_arm64
display_name: "package smoke tests (Ubuntu 18.04 arm64)"
run_on: ubuntu1804-arm64-small
tasks:
- name: pkg_test_debextract_debian_arm64
- name: pkg_smoke_tests_ubuntu2004_arm64
display_name: "package smoke tests (Ubuntu 20.04 arm64)"
run_on: ubuntu2004-arm64-small
tasks:
- name: pkg_test_debextract_debian_arm64
- name: pkg_smoke_tests_amazon2_arm64
display_name: "package smoke tests (RHEL 8.2 arm64)"
run_on: rhel82-arm64-small
tasks:
- name: pkg_test_rpmextract_rhel8_arm64
- name: pkg_smoke_tests_rhel82_arm64
display_name: "package smoke tests (Amazon Linux 2 arm64)"
run_on: amazon2-arm64-small
tasks:
- name: pkg_test_rpmextract_amzn2_arm64
- name: pkg_smoke_tests_rhel72_s390x
display_name: "package smoke tests (RHEL 7.2 s390x)"
run_on: rhel72-zseries-small
Expand Down
30 changes: 25 additions & 5 deletions config/build.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ const COPYRIGHT = `${new Date().getYear() + 1900} MongoDB, Inc.`;
*/
const MANPAGE_NAME = 'mongosh.1.gz'

/**
* The package identifier (not executable identifier), e.g. 'debian-x64-openssl11'.
*/
const DISTRIBUTION_BUILD_VARIANT = process.env.DISTRIBUTION_BUILD_VARIANT;

/**
* The shared-openssl suffix for the current package identifer, e.g. 'openssl11'.
*/
const SHARED_OPENSSL_TAG = DISTRIBUTION_BUILD_VARIANT?.match?.(/-(openssl\d*)$/)?.[1] || '';

/**
* Export the configuration for the build.
*/
Expand All @@ -101,7 +111,7 @@ module.exports = {
triggeringGitTag: process.env.TRIGGERED_BY_GIT_TAG,
platform: os.platform(),
execNodeVersion: process.env.NODE_JS_VERSION || `^${process.version.slice(1)}`,
distributionBuildVariant: process.env.DISTRIBUTION_BUILD_VARIANT,
distributionBuildVariant: DISTRIBUTION_BUILD_VARIANT,
notarySigningKeyName: process.env.NOTARY_SIGNING_KEY_NAME,
notaryAuthToken: process.env.NOTARY_AUTH_TOKEN,
repo: {
Expand Down Expand Up @@ -151,10 +161,20 @@ module.exports = {
},
metadata: {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This may need to be restructured a bit for actually releasing these artifacts, but for now this works.

name: 'mongosh',
rpmName: 'mongodb-mongosh',
debName: 'mongodb-mongosh',
providesName: 'mongodb-shell',
providesVersion: '2.0',
rpmName: 'mongodb-mongosh' + (SHARED_OPENSSL_TAG ? `-shared-${SHARED_OPENSSL_TAG}` : ''),
debName: 'mongodb-mongosh' + (SHARED_OPENSSL_TAG ? `-shared-${SHARED_OPENSSL_TAG}` : ''),
provides: [
{ name: 'mongodb-shell', version: '2.0' },
...(
SHARED_OPENSSL_TAG ?
[{ name: 'mongodb-mongosh', version: CLI_REPL_PACKAGE_JSON.version }] :
[]
)
],
debDepends: 'libc6 (>= 2.17), libgssapi-krb5-2' + (
SHARED_OPENSSL_TAG === 'openssl11' ? ', libssl1.1' :
SHARED_OPENSSL_TAG === 'openssl3' ? ', libssl3' : ''
),
fullName: 'MongoDB Shell',
version: CLI_REPL_PACKAGE_JSON.version,
description: CLI_REPL_PACKAGE_JSON.description,
Expand Down
8 changes: 6 additions & 2 deletions packages/build/src/config/build-variant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
*/
export type Distro = 'win32' | 'win32msi' | 'darwin' | 'linux' | 'debian' | 'rhel7' | 'rhel8' | 'suse' | 'amzn1' | 'amzn2';
export type Arch = 'x64' | 's390x' | 'arm64' | 'ppc64le';
export type BuildVariant = `${Distro}-${Arch}`;
export type OpenSSLTag = '' | '-openssl11' | '-openssl3';
export type BuildVariant = `${Distro}-${Arch}${OpenSSLTag}`;

export const ALL_BUILD_VARIANTS: readonly BuildVariant[] = Object.freeze([
'win32-x64', 'win32msi-x64',
Expand All @@ -20,7 +21,10 @@ export const ALL_BUILD_VARIANTS: readonly BuildVariant[] = Object.freeze([
] as const);

export function validateBuildVariant(variant?: BuildVariant): asserts variant is BuildVariant {
if (typeof variant === 'undefined' || !ALL_BUILD_VARIANTS.includes(variant)) {
if (
typeof variant === 'undefined' ||
!ALL_BUILD_VARIANTS.includes(variant.replace(/-openssl(11|3)$/, '') as BuildVariant)
) {
throw new Error(`${variant} is not a valid build variant identifier`);
}
}
Expand Down
13 changes: 12 additions & 1 deletion packages/build/src/packaging/package/debian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,19 @@ export async function createDebianPackage(
const dir = await generateDirFromTemplate(templateDir, {
...pkg.metadata,
size,
debianArch: getDebArchName(arch)
debianArch: getDebArchName(arch),
provides: pkg.metadata.provides.map(({ name, version }) => `${name} (= ${version})`).join(', ')
});

// dpkg wants the package data to be in a directory with the same name as the package
await fs.mkdir(path.join(dir, pkg.metadata.debName), { recursive: true });
for (const templateDirEntry of await fs.readdir(dir)) {
if (templateDirEntry === pkg.metadata.debName) continue;
await fs.rename(
path.join(dir, templateDirEntry),
path.join(dir, pkg.metadata.debName, templateDirEntry));
}

const docFiles = [
...pkg.otherDocFilePaths,
...pkg.binaries.map(({ license }) => license)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface PackageInformation {
fullName: string;
copyright: string;
icon: string;
provides: { name: string, version: string }[];
};
debTemplateDir: string;
rpmTemplateDir: string;
Expand Down
3 changes: 2 additions & 1 deletion packages/build/src/packaging/package/redhat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export async function createRedhatPackage(
licenseRpm,
installscriptRpm,
filelistRpm: filelistRpm.join('\n'),
version
version,
provides: pkg.metadata.provides.map(({ name, version }) => `${name} = ${version}`).join(', ')
});
// Copy all files that we want to ship into the BUILD directory.
for (const { sourceFilePath } of pkg.binaries) {
Expand Down
1 change: 1 addition & 0 deletions packages/build/test/fixtures/pkgconf.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module.exports = {
maintainer: 'Somebody <somebody@example.org>',
name: 'foobar',
debName: 'foobar',
provides: [],
rpmName: 'foobar',
manufacturer: 'Some Random Company Inc.'
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: {{debName}}
Provides: {{providesName}} (= {{providesVersion}})
Provides: {{provides}}
Version: {{version}}
Section: utils
Priority: optional
Expand All @@ -8,5 +8,4 @@ Installed-Size: {{size}}
Maintainer: {{maintainer}}
Homepage: {{homepage}}
Description: {{description}}
Depends: libc6 (>= 2.17), libgssapi-krb5-2
Recommends: libsasl2-2, libcurl4, libssl1.1
Depends: {{debDepends}}
2 changes: 1 addition & 1 deletion packaging/rpm-template/SPECS/mongodb-mongosh.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%define _libexecdir %{_exec_prefix}/libexec

Name: {{rpmName}}
Provides: {{providesName}} = {{providesVersion}}
Provides: {{provides}}
Version: {{version}}
Release: 1%{?dist}
Group: Development/Tools
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/amazonlinux1-rpm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG artifact_url=""
ADD ${artifact_url} /tmp
ADD node_modules /usr/share/mongodb-csfle-library-version/node_modules
RUN yum repolist
RUN yum install -y /tmp/*mongosh-*.x86_64.rpm
RUN yum install -y /tmp/*mongosh*.rpm
RUN /usr/bin/mongosh --version
RUN env MONGOSH_RUN_NODE_SCRIPT=1 mongosh /usr/share/mongodb-csfle-library-version/node_modules/.bin/mongodb-csfle-library-version /usr/lib64/mongosh_csfle_v1.so | grep -q ^mongo_csfle_v1-
ENTRYPOINT [ "mongosh" ]
2 changes: 1 addition & 1 deletion scripts/docker/amazonlinux2-rpm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG artifact_url=""
ADD ${artifact_url} /tmp
ADD node_modules /usr/share/mongodb-csfle-library-version/node_modules
RUN yum repolist
RUN yum install -y /tmp/*mongosh-*.x86_64.rpm
RUN yum install -y /tmp/*mongosh*.rpm
RUN /usr/bin/mongosh --version
RUN env MONGOSH_RUN_NODE_SCRIPT=1 mongosh /usr/share/mongodb-csfle-library-version/node_modules/.bin/mongodb-csfle-library-version /usr/lib64/mongosh_csfle_v1.so | grep -q ^mongo_csfle_v1-
ENTRYPOINT [ "mongosh" ]
13 changes: 13 additions & 0 deletions scripts/docker/centos7-epel-rpm.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM centos:7

ARG artifact_url=""
ADD ${artifact_url} /tmp
ADD node_modules /usr/share/mongodb-csfle-library-version/node_modules
RUN yum repolist
# epel-release so that openssl11 is installable
RUN yum install -y epel-release
RUN yum repolist
RUN yum install -y /tmp/*mongosh*.rpm
RUN /usr/bin/mongosh --version
RUN env MONGOSH_RUN_NODE_SCRIPT=1 mongosh /usr/share/mongodb-csfle-library-version/node_modules/.bin/mongodb-csfle-library-version /usr/lib64/mongosh_csfle_v1.so | grep -q ^mongo_csfle_v1-
ENTRYPOINT [ "mongosh" ]
Loading