lib/iapi-idlc-sdk-core.rb



require 'tmpdir'
require 'zip'

require 'iapi-idlc-sdk-core/version'
require 'iapi-idlc-sdk-core/helpers'
require 'iapi-idlc-sdk-core/utility'
require 'iapi-idlc-sdk-core/workspace'
require 'iapi-idlc-sdk-core/zip'
require 'iapi-idlc-sdk-core/restclient'

module Idlc
  stage = ENV.fetch('IDLC_STAGE', 'prod')
  # Service Definitions
  SERVICES = {
    'us-east-1' => {
      'build' => {
        'endpoint' => 'build.orchestrate.imageapi.com',
        'stage' => stage,
        'publish_bucket' => "service-build-#{stage}-build-artifacts"
      },
      'config' => {
        'endpoint' => 'config.orchestrate.imageapi.com',
        'stage' => stage
      },
      'deploy' => {
        'endpoint' => 'deploy.orchestrate.imageapi.com',
        'stage' => stage
      },
      'status' => {
        'endpoint' => 'status.orchestrate.imageapi.com',
        'stage' => stage
      },
      'auth' => {
        'endpoint' => 'auth.orchestrate.imageapi.com',
        'stage' => stage
      }
    },
    'us-gov-west-1' => {
      'build' => {
        'endpoint' => 'build.orchestrate-us-gov.imageapi.com',
        'stage' => 'govcloud',
        'publish_bucket' => 'service-build-govcloud-build-artifacts'
      },
      'config' => {
        'endpoint' => 'config.orchestrate-us-gov.imageapi.com',
        'stage' => 'govcloud'
      },
      'deploy' => {
        'endpoint' => 'deploy.orchestrate-us-gov.imageapi.com',
        'stage' => 'govcloud'
      },
      'status' => {
        'endpoint' => 'status.orchestrate-us-gov.imageapi.com',
        'stage' => 'govcloud'
      },
      'auth' => {
        'endpoint' => 'auth.orchestrate-us-gov.imageapi.com',
        'stage' => 'govcloud'
      }
    }
  }.freeze
end