skipcheck

TM1 Testcontainers · Docs · Where TM1 comes from

Tm1WebSource

using Skipcheck.Tm1.Testcontainers;

Where a Tm1WebContainer gets TM1 Web from.

The tm1-web image contains no IBM software, so every container needs one of these. They mirror Tm1Source, with TM1_WEB_ settings, and the image's own sources (see the image's README).

Discover finds one from the environment. Each setting is read first as a system property and then as an environment variable, under the same name. The names match the tm1-server compose settings. The first source found wins, in this order:

  1. TM1_WEB_PRIVATE_IMAGE: an image with TM1 Web built in (Tm1WebSource.PrivateImage)
  2. TM1_WEB_HOME_DIR: an installed tm1web folder (Tm1WebSource.InstallDir)
  3. TM1_WEB_INSTALL_VOLUME: a Docker volume holding an install (Tm1WebSource.InstallVolume)
  4. TM1_WEB_BUNDLE_DIR, optionally with TM1_WEB_BUNDLE: a folder holding IBM's bundle, and the file name to use from it (Tm1WebSource.Bundle)
  5. TM1_WEB_BUNDLE_URL, optionally with TM1_WEB_BUNDLE_SHA256: a download link for the bundle (Tm1WebSource.BundleUrl)
  6. TM1_BUNDLE_DIR, if it also holds a TM1 Web bundle (or TM1_WEB_BUNDLE names one in it): the same downloads folder as TM1, as in the compose setup

Members

PrivateImageSetting staticThe setting naming an image with TM1 Web built in.
HomeDir staticThe setting naming an installed tm1web folder.
InstallVolumeSetting staticThe setting naming a Docker volume holding an install.
BundleDir staticThe setting naming the folder holding IBM's bundle.
BundleSetting staticThe setting naming the bundle file in BundleDir (the newest otherwise).
BundleUrlSetting staticThe setting holding a download link for the bundle.
BundleSha256 staticThe setting holding the bundle's SHA-256, checked after the download.
DescribeWhere TM1 comes from, for logs.
Discover staticThe first source set, from AppContext switches or environment variables; null when none is.
Discover staticThe first source set, looking settings up with lookup, in this order.

PrivateImageSetting

static
const string PrivateImageSetting

The setting naming an image with TM1 Web built in.

HomeDir

static
const string HomeDir

The setting naming an installed tm1web folder.

InstallVolumeSetting

static
const string InstallVolumeSetting

The setting naming a Docker volume holding an install.

BundleDir

static
const string BundleDir

The setting naming the folder holding IBM's bundle.

BundleSetting

static
const string BundleSetting

The setting naming the bundle file in BundleDir (the newest otherwise).

BundleUrlSetting

static
const string BundleUrlSetting

The setting holding a download link for the bundle.

BundleSha256

static
const string BundleSha256

The setting holding the bundle's SHA-256, checked after the download.

Describe

string Describe()

Where TM1 comes from, for logs: never a URL's credentials or query string.

Discover

static
Tm1WebSource? Discover()

The first source set, from AppContext switches or environment variables; null when none is.

Throws

ArgumentException
A source is set but wrong (a folder that isn't there, say): a test should fail on that, not skip.

Discover

static
Tm1WebSource? Discover(Func<string, string?> lookup)

The first source set, looking settings up with lookup, in this order: TM1_WEB_PRIVATE_IMAGE, TM1_WEB_HOME_DIR, TM1_WEB_INSTALL_VOLUME, TM1_WEB_BUNDLE_DIR (with TM1_WEB_BUNDLE), TM1_WEB_BUNDLE_URL (with TM1_WEB_BUNDLE_SHA256), then TM1_BUNDLE_DIR if it holds a tm1web-*_bundle.tar.gz or tm1web-*-linuxi38664h.zip (or TM1_WEB_BUNDLE is set). Blank settings count as unset.