Deploy the apigateway to a particular stage
353974
def deploy_gateway(collector):
    """"""
    configuration = collector.configuration
    aws_syncr = configuration['aws_syncr']
    aws_syncr, amazon, stage, gateway = find_gateway(aws_syncr, configuration)
    gateway.deploy(aws_syncr, amazon, stage)

    if not configuration['amazon'].changes:
        log.info("No changes were made!!")
763339
def activate_api_deployment(restApiId, stageName, deploymentId,
                            region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        response = conn.update_stage(restApiId=restApiId, stageName=stageName,
                                     patchOperations=[{'op': 'replace',
                                                       'path': '/deploymentId',
                                                       'value': deploymentId}])
        return {'set': True, 'response': _convert_datetime_str(response)}
    except ClientError as e:
        return {'set': False, 'error': __utils__['boto3.get_error'](e)}
596898
def deploy(self):
        '''
            
        '''
        if not os.path.exists(self.path):
            makedirs(self.path)

        link(self.vault_path, self.real_path)
1235551
def stage():
    """"""
    common_conf()
    env.user = settings.LOGIN_USER_STAGE
    env.machine = 'stage'
    env.host_string = settings.HOST_STAGE
    env.hosts = [env.host_string, ]
636065
def run(self):
        

        self.sanity_check()

# TODO - check for devel
#        if not self.version:
#            raise Exception("no version")
# XXX check attr exist
        if not self.release_environment:
            raise Exception("no instance name")

        time_start = time.time()

        cwd = os.getcwd()

        who = getpass.getuser()
        self._make_outdirs()

        append_notices = ""
        if hasattr(self, 'opt_end'):
            append_notices = ". shortened push, only to %s stage" % self.opt_end
        if self.is_devel:
            append_notices += ". devel build"
        if hasattr(self, 'append_notices'):
            append_notices += self.append_notices

        line = "%s %s %s by %s%s" % (
            sys.argv[0], self.version, self.release_environment, who, append_notices)
        b = 'deploy begin %s' % line
        e = 'deploy done %s' % line

        if self.chatty:
            self.alact(b)

        ok = False
        stage_passed = None
        try:
            for stage in self.stages[self.stage_start:self.stage_end]:
                self.debug_msg("stage %s starting" % (stage,))
                getattr(self, stage)()
                self.chdir(cwd)
                stage_passed = stage
                self.debug_msg("stage %s complete" % (stage,))
            ok = True
        finally:
            if not ok:
                if self.chatty:
                    if not stage_passed:
                        self.alact(
                            'deploy failed %s. completed no stages' % line)
                    else:
                        self.alact('deploy failed %s. completed %s' %
                                   (line, stage_passed))
        self.status_msg('[OK]')
        if self.chatty:
            self.alact('%s in %0.3f sec' % (e, time.time() - time_start))

        return 0
762053
def do_load(self, arg):
        """"""
        from os import path
        import json
        fullpath = path.expanduser(arg)
        if path.isfile(fullpath):
            with open(fullpath) as f:
                data = json.load(f)

            #Now, reparse the staging directories that were present in the saved session.
            for stagepath in data["tests"]:
                self.do_parse(stagepath)
            self.args = data["args"]
658631
def deploy(self, iid):
        '''
            
        '''
        for index in iid:
            target = Target.getTarget(index)

            if target:
                verbose('Deploying id {} from {} to {} with the name {}'
                        .format(index, target.vault_path, target.path, target.name))
                target.deploy()

        verbose('Deploy complete')
177421
def upload_artifacts(self):
        """"""
        deploy_strategy = self.properties["deploy_strategy"]

        mirror = False
        if deploy_strategy == "mirror":
            mirror = True

        self._upload_artifacts_to_path(mirror=mirror)
        if deploy_strategy == "highlander":
            self._sync_to_uri(self.s3_latest_uri)
        elif deploy_strategy == "canary":
            self._sync_to_uri(self.s3_canary_uri)
        elif deploy_strategy == "alpha":
            self._sync_to_uri(self.s3_alpha_uri)
        elif deploy_strategy == "mirror":
            pass  # Nothing extra needed for mirror deployments
        else:
            raise NotImplementedError
821595
function deployToDevice (appPath, target, extraArgs) {
    // Deploying to device...
    if (target) {
        return spawn('ios-deploy', ['--justlaunch', '-d', '-b', appPath, '-i', target].concat(extraArgs));
    } else {
        return spawn('ios-deploy', ['--justlaunch', '--no-wifi', '-d', '-b', appPath].concat(extraArgs));
    }
}
736948
public function publishAPIRoutes()
    {
        $routesPath = __DIR__.'/../../../../templates/routes/api_routes.stub';

        $apiRoutesPath = Config::get('generator.path_api_routes', app_path('Http/api_routes.php'));

        $this->publishFile($routesPath, $apiRoutesPath, 'api_routes.php');
    }
789074
def deploy(project_name):
    """"""
    request_log = requestlog.RequestLog
    header_addon = HeaderControl
    fault_wrapper = FaultWrapper
    application = handler.SdkHandler()

    # currently we have 3 middleware
    for middleware in (header_addon,
                       fault_wrapper,
                       request_log,
                       ):
        if middleware:
            application = middleware(application)

    return application
330219
public void stageStandard(AppEngineWebXmlProjectStageConfiguration config)
      throws AppEngineException {
    Preconditions.checkNotNull(config);
    Preconditions.checkNotNull(config.getSourceDirectory());
    Preconditions.checkNotNull(config.getStagingDirectory());

    List<String> arguments = new ArrayList<>();

    arguments.addAll(AppCfgArgs.get("enable_quickstart", config.getEnableQuickstart()));
    arguments.addAll(AppCfgArgs.get("disable_update_check", config.getDisableUpdateCheck()));
    arguments.addAll(AppCfgArgs.get("enable_jar_splitting", config.getEnableJarSplitting()));
    arguments.addAll(AppCfgArgs.get("jar_splitting_excludes", config.getJarSplittingExcludes()));
    arguments.addAll(AppCfgArgs.get("compile_encoding", config.getCompileEncoding()));
    arguments.addAll(AppCfgArgs.get("delete_jsps", config.getDeleteJsps()));
    arguments.addAll(AppCfgArgs.get("enable_jar_classes", config.getEnableJarClasses()));
    arguments.addAll(AppCfgArgs.get("disable_jar_jsps", config.getDisableJarJsps()));
    if (config.getRuntime() != null) {
      // currently only java7 is allowed without --allow_any_runtime
      arguments.addAll(AppCfgArgs.get("allow_any_runtime", true));
      arguments.addAll(AppCfgArgs.get("runtime", config.getRuntime()));
    }
    arguments.add("stage");
    arguments.add(config.getSourceDirectory().toString());
    arguments.add(config.getStagingDirectory().toString());

    Path dockerfile = config.getDockerfile();

    try {

      if (dockerfile != null && Files.exists(dockerfile)) {
        Files.copy(
            dockerfile,
            config.getSourceDirectory().resolve(dockerfile.getFileName()),
            StandardCopyOption.REPLACE_EXISTING);
      }

      runner.run(arguments);

      // TODO : Move this fix up the chain (appcfg)
      if (config.getRuntime() != null && config.getRuntime().equals("java")) {
        Path appYaml = config.getStagingDirectory().resolve("app.yaml");
        Files.write(
            appYaml,
            "\nruntime_config:\n  jdk: openjdk8\n".getBytes(StandardCharsets.UTF_8),
            StandardOpenOption.APPEND);
      }

    } catch (IOException | ProcessHandlerException e) {
      throw new AppEngineException(e);
    }
  }
129931
def create_pipeline_stage(self, pipeline_key, name, **kwargs):
		'''
		'''
		#req sanity check
		if not (pipeline_key and name):
			return requests.codes.bad_request, None

		uri = '/'.join([
						self.api_uri,
						self.pipelines_suffix,
						pipeline_key,
						self.stages_suffix])
		
		kwargs.update({'name':name})

		new_box = StreakStage(**kwargs)
		
		code, data = self._req('put', uri, new_box.to_dict(rw = True))
		
		return code, data
60757
private function setProperGateway()
    {
        if (isset($this->config['dry_run'])) {
            if ($this->config['dry_run']) {
                $this->setUrl($this->sandboxUrl);
                $this->feedbackUrl = $this->feedbackSandboxUrl;

            } else {
                $this->setUrl($this->productionUrl);
                $this->feedbackUrl = $this->feedbackProductionUrl;
            }
        }
    }
518914
public function deployDeploy(
        $stage,
        $branchOrTag,
        $opts = [
            self::OPT_DEPLOYER_PARALLEL => false,
        ]
    ) {
        // use string parallel due as robo always submits this string for both triggers
        $parallelMode = $opts['parallel'];

        $this->startTimer();

        $this->printStageInfo('DEPLOYER DEPLOY');

        $task = $this->taskDeployerDeploy($stage, $branchOrTag);
        if ($parallelMode === true) {
            $task->parallel();
        }

        $task->run();

        $this->stopTimer();
        $this->printRuntime(__FUNCTION__);
    }
941558
def move(candidate_id, member_id, stage)
      post_request("candidates/#{candidate_id}/move") do |request|
        request.body = { member_id: member_id, target_stage: stage }.to_json
      end
    end
769227
@TaskAction
  public void stageAction() throws AppEngineException {
    getProject().delete(appYamlExtension.getStagingDirectory());
    getProject().mkdir(appYamlExtension.getStagingDirectory().getAbsolutePath());

    AppYamlProjectStaging staging = new AppYamlProjectStaging();
    staging.stageArchive(appYamlExtension.toAppYamlProjectStageConfiguration());
  }