cs-codex-dist-tests/ProjectPlugins/CodexContractsPlugin/CodexContractsContainerReci...

32 lines
1.2 KiB
C#
Raw Normal View History

using GethPlugin;
using KubernetesWorkflow;
using KubernetesWorkflow.Recipe;
2023-11-07 11:02:17 +00:00
using Logging;
2023-09-15 14:27:08 +00:00
namespace CodexContractsPlugin
{
public class CodexContractsContainerRecipe : ContainerRecipeFactory
{
2024-03-13 09:57:35 +00:00
public static string DockerImage { get; } = "codexstorage/codex-contracts-eth:latest-dist-tests";
2023-09-19 11:58:45 +00:00
2023-09-15 14:27:08 +00:00
public const string MarketplaceAddressFilename = "/hardhat/deployments/codexdisttestnetwork/Marketplace.json";
public const string MarketplaceArtifactFilename = "/hardhat/artifacts/contracts/Marketplace.sol/Marketplace.json";
public override string AppName => "codex-contracts";
2023-09-19 11:58:45 +00:00
public override string Image => DockerImage;
2023-09-15 14:27:08 +00:00
protected override void Initialize(StartupConfig startupConfig)
{
var config = startupConfig.Get<CodexContractsContainerConfig>();
2024-09-23 08:52:12 +00:00
var address = config.GethNode.StartResult.Container.GetAddress(GethContainerRecipe.HttpPortTag);
SetSchedulingAffinity(notIn: "false");
AddEnvVar("DISTTEST_NETWORK_URL", address.ToString());
2023-09-15 14:27:08 +00:00
AddEnvVar("HARDHAT_NETWORK", "codexdisttestnetwork");
AddEnvVar("KEEP_ALIVE", "1");
}
}
}