2
0
mirror of synced 2025-02-10 07:27:14 +00:00
cs-codex-dist-tests/DistTestCore/Marketplace/CodexContractsContainerRecipe.cs
Eric Mastro 050bb85d27
add arch preprocessor directive
Add preprocessor directive that checks if the current platform architecture is ARM64.

The preprocessor directive checks for ARM64 architecture and changes which docker image to load in the recipes.

# Conflicts:
#	DistTestCore/Codex/CodexContainerRecipe.cs
2023-05-02 15:19:28 +10:00

30 lines
1.1 KiB
C#

using KubernetesWorkflow;
namespace DistTestCore.Marketplace
{
public class CodexContractsContainerRecipe : ContainerRecipeFactory
{
#if Arm64
public const string DockerImage = "emizzle/codex-contracts-deployment:latest";
#else
public const string DockerImage = "thatbenbierens/codex-contracts-deployment";
#endif
public const string MarketplaceAddressFilename = "/usr/app/deployments/codexdisttestnetwork/Marketplace.json";
public const string MarketplaceArtifactFilename = "/usr/app/artifacts/contracts/Marketplace.sol/Marketplace.json";
protected override string Image => DockerImage;
protected override void Initialize(StartupConfig startupConfig)
{
var config = startupConfig.Get<CodexContractsContainerConfig>();
var ip = config.BootstrapNodeIp;
var port = config.JsonRpcPort.Number;
AddEnvVar("DISTTEST_NETWORK_URL", $"http://{ip}:{port}");
AddEnvVar("HARDHAT_NETWORK", "codexdisttestnetwork");
AddEnvVar("KEEP_ALIVE", "1");
}
}
}