#!/usr/bin/env node
import "dotenv/config"; // Load Envars
import Qualiteer from "qualiteer";
import { Initiator, Executor } from "qualiteer/clients";

// Start server
const qltr = new Qualiteer();
await qltr.start();

const url = process.env.QUALITEER_URL;

// Create an initiator and make a job request
const primary = new Initiator(url);
const job = {
  type: "compound",
  testName: "primary",
  pipelineTriggers: "secondary",
  name: "testing",
  image: "node",
};

const launchJob = () =>
  primary.newPipelineJob(job, null, () => console.log("Primary Job Concluded"));
launchJob();
