2023-10-23 15:28:20 +02:00
|
|
|
|
using GethPlugin;
|
|
|
|
|
using KubernetesWorkflow;
|
2023-11-12 10:07:23 +01:00
|
|
|
|
using KubernetesWorkflow.Recipe;
|
2023-11-07 12:02:17 +01:00
|
|
|
|
using Logging;
|
2023-09-15 16:27:08 +02:00
|
|
|
|
|
|
|
|
|
namespace CodexContractsPlugin
|
|
|
|
|
{
|
|
|
|
|
public class CodexContractsContainerRecipe : ContainerRecipeFactory
|
|
|
|
|
{
|
2024-03-13 10:57:35 +01:00
|
|
|
|
public static string DockerImage { get; } = "codexstorage/codex-contracts-eth:latest-dist-tests";
|
2023-09-19 13:58:45 +02:00
|
|
|
|
|
2023-09-15 16:27:08 +02: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 13:58:45 +02:00
|
|
|
|
public override string Image => DockerImage;
|
2023-09-15 16:27:08 +02:00
|
|
|
|
|
|
|
|
|
protected override void Initialize(StartupConfig startupConfig)
|
|
|
|
|
{
|
|
|
|
|
var config = startupConfig.Get<CodexContractsContainerConfig>();
|
|
|
|
|
|
2024-09-23 10:52:12 +02:00
|
|
|
|
var address = config.GethNode.StartResult.Container.GetAddress(GethContainerRecipe.HttpPortTag);
|
2023-10-23 15:28:20 +02:00
|
|
|
|
|
2023-11-27 19:06:04 +02:00
|
|
|
|
SetSchedulingAffinity(notIn: "false");
|
2023-11-14 10:16:00 +01:00
|
|
|
|
|
2023-10-23 16:12:45 +02:00
|
|
|
|
AddEnvVar("DISTTEST_NETWORK_URL", address.ToString());
|
2023-09-15 16:27:08 +02:00
|
|
|
|
AddEnvVar("HARDHAT_NETWORK", "codexdisttestnetwork");
|
|
|
|
|
AddEnvVar("KEEP_ALIVE", "1");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|