public void Build()
        {
            // Build the JobConfiguration
            JobConfiguration jobConfiguration = new JobConfiguration(_runsOn);

            foreach (var keyValue in _jobEnvironmentVariables)
            {
                jobConfiguration.AddEnvVar(keyValue.Key, keyValue.Value);
            }

            // Build the Steps
            _stepsBuilder.Build();
            Step[] steps = _stepsBuilder.Collect().ToArray();


            // Build the Job
            if (_jobName == null)
            {
                _jobName = Guid.NewGuid().ToString();
            }
            _currentJob = new Job(_jobId, _jobName, jobConfiguration, steps);
            // Add the job dependencies
            foreach (var job in _dependsOn)
            {
                _currentJob.AddDependency(job);
            }
        }
 private void AddStepsToGlobalConfig()
 {
     if (_stepsBuilder != null)
     {
         _stepsBuilder.Build();
         foreach (Step s in _stepsBuilder.Collect())
         {
             _globalConfiguration.AddStep(s);
         }
     }
 }