STAGE command that generates all artifacts for the deploy
338857
public function deployArtifactsGenerate()
    {
        $this->startTimer();

        $this->printStageInfo('GENERATE ASSETS');

        $this->printTaskInfo('SET PRODUCTION MODE');
        $this->taskMagentoSetProductionMode()->run();

        $this->printTaskInfo('MAGENTO SETUP DI COMPILE');
        $this->taskMagentoSetupDiCompile()->run();

        $this->printTaskInfo('COMPOSER DUMP AUTOLOAD');
        $this->taskMagentoDumpAutoload()->run();

        $this->printTaskInfo('MAGENTO SETUP STATIC CONTENT DEPLOY');
        $this->taskMagentoSetupStaticContentDeploy()->run();

        $this->printTaskInfo('GENERATE ARTIFACTS');
        $this->taskArtifactCreatePackages()->run();

        $this->stopTimer();
        $this->printRuntime(__FUNCTION__);
    }
1296117
protected function prepareDir() {
    $this->say("Preparing artifact directory...");
    $deploy_dir = $this->deployDir;
    $this->taskDeleteDir($deploy_dir)
      ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE)
      ->run();
    $this->taskFilesystemStack()
      ->mkdir($this->deployDir)
      ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE)
      ->stopOnFail()
      ->run();
    $this->taskExecStack()
      ->dir($deploy_dir)
      ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE)
      ->stopOnFail()
      ->exec("git init")
      ->exec("git config --local core.excludesfile false")
      ->exec("git config --local core.fileMode true")
      ->run();
    $this->say("Global .gitignore file is being disabled for this repository to prevent unexpected behavior.");
  }
167760
function deploy(mode, target, system, containerDef, container, out, cb) {
    var executor = prepareAndGetExecutor(target, out, 'deploying');
    executor.deploy(mode, target, system, containerDef, container, out, function(err) {
      cb(err);
    });
  }
625438
def stdout(self):
        '''
        
        '''
        stdout_path = os.path.join(self.config.artifact_dir, 'stdout')
        if not os.path.exists(stdout_path):
            raise AnsibleRunnerException("stdout missing")
        return open(os.path.join(self.config.artifact_dir, 'stdout'), 'r')
249531
def generate_artifacts(context = {})
      @cmd = context['cmd']
      @cmd_args = context['cmd_args'] || []
      @config = Chef::Config.merge!(@cmd.config)
      return unless @cmd && cookbook_path
      run_create_cookbook
      create_attr_file(
        cookbook_path,
        cookbook_contents
      )
    end
804373
def deploy(remote, assets_to_s3):
    

    header("Deploying...")

    if assets_to_s3:
        for mod in get_deploy_assets2s3_list(CWD):
            _assets2s3(mod)

    remote_name = remote or "ALL"
    print("Pushing application's content to remote: %s " % remote_name)
    hosts = get_deploy_hosts_list(CWD, remote or None)
    git_push_to_master(cwd=CWD, hosts=hosts, name=remote_name)
    print("Done!")
40863
def run(self):
        
        for build_dir in self.build_dirs:
            if os.path.isdir(build_dir):
                sys.stdout.write('Removing %s%s' % (build_dir, os.linesep))
                shutil.rmtree(build_dir)

        for (root, dirs, files) in os.walk(self.cwd):
            for name in files:
                fullpath = os.path.join(root, name)
                if any(fullpath.endswith(ext) for ext in self.build_artifacts):
                    sys.stdout.write('Removing %s%s' % (fullpath, os.linesep))
                    os.remove(fullpath)
678820
def render_from_repo(repo_path, to_path, template_params, settings_dir):
    
    TEMPLATE_PROJECT_FOLDER_PLACEHOLDER_NAME = 'deployer_project'

    repo_path = repo_path.rstrip('/')
    to_path = to_path.rstrip('/')
    files_to_render = get_template_filelist(repo_path, ignore_folders=[TEMPLATE_PROJECT_FOLDER_PLACEHOLDER_NAME])


    # rendering generic deploy files
    for single_file_path in files_to_render:
        source_file_path = single_file_path
        dest_file_path = source_file_path.replace(repo_path, to_path)

        render_from_single_file(source_file_path, dest_file_path, template_params)

    settings_template_dir = os.path.join(repo_path, TEMPLATE_PROJECT_FOLDER_PLACEHOLDER_NAME)
    settings_files = get_template_filelist(settings_template_dir)

    # rendering settings file
    for single_file_path in settings_files:
        source = single_file_path
        dest = single_file_path.replace(settings_template_dir, settings_dir)
        render_from_single_file(source, dest, template_params)
316661
protected function taskArtifactCreatePackages()
    {
        $rootDir      = getcwd();
        $tarBin       = $this->config(Config::KEY_ENV . '/' . Config::KEY_TAR_BIN);
        $gitDir       = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_GIT_DIR);
        $artifactsDir = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_ARTIFACTS_DIR);

        /** @var array $artifacts */
        $artifacts = $this->config(Config::KEY_DEPLOY . '/' . Config::KEY_ARTIFACTS);

        /** @var RoboFile|CollectionBuilder $collection */
        $collection = $this->collectionBuilder();
        $collection->progressMessage('cleanup old packages');

        // Ensure artifacts-dir is present
        $collection->taskFilesystemStack()->mkdir($artifactsDir);

        // Cleanup old tars
        foreach ($artifacts as $artifactName => $artifactConfig) {
            $file = "$artifactsDir/$artifactName";

            $task = $collection->taskFilesystemStack();
            $task->remove($file);
        }

        // Create Tars
        $collection->progressMessage('creating packages');
        foreach ($artifacts as $artifactName => $artifactConfig) {
            $dir = $artifactConfig['dir'];

            $artifactPath = "$rootDir/$artifactsDir/$artifactName";

            $tarOptions = '';
            if (array_key_exists('options', $artifactConfig)) {
                $options    = $artifactConfig['options'];
                $tarOptions = implode(' ', $options);
            }

            $tarCmd = "$tarBin $tarOptions -czf $artifactPath $dir";
            $task   = $collection->taskExec($tarCmd);
            $task->dir($gitDir);
        }

        return $collection;
    }
49466
public void deployArtifact(DeployArtifact deployArtifact) throws DeployException {
        log.debug("deploy artifact: {} ", deployArtifact.getNotation());
        
        RepositoryClient repoClient = new RepositoryClient(this.getLocalRepoPath());
        
        DeployRequest deployRequest = new DeployRequest();
        deployRequest.addArtifact(deployArtifact.getJarArtifact());
        if (deployArtifact.getPomArtifact() != null) {
            deployRequest.addArtifact(deployArtifact.getPomArtifact());
        }
        deployRequest.setRepository(deployArtifact.getRemoteRepo());

        log.debug("deploying artifact {}", deployArtifact.getNotation());
        try {
            repoClient.deploy(deployRequest);
        } catch (DeploymentException e) {
            log.error("Failed to deploy artifact", e);
            throw new DeployException(e);
        }
    }
602107
async function deploy() {
  // Initialize a new repository
  await makeDir('build');
  await spawn('git', ['init', '--quiet'], options);

  // Changing a remote's URL
  let isRemoteExists = false;
  try {
    await spawn(
      'git',
      ['config', '--get', `remote.${remote.name}.url`],
      options,
    );
    isRemoteExists = true;
  } catch (error) {
    /* skip */
  }
  await spawn(
    'git',
    ['remote', isRemoteExists ? 'set-url' : 'add', remote.name, remote.url],
    options,
  );

  // Fetch the remote repository if it exists
  let isRefExists = false;
  try {
    await spawn(
      'git',
      ['ls-remote', '--quiet', '--exit-code', remote.url, remote.branch],
      options,
    );
    isRefExists = true;
  } catch (error) {
    await spawn('git', ['update-ref', '-d', 'HEAD'], options);
  }
  if (isRefExists) {
    await spawn('git', ['fetch', remote.name], options);
    await spawn(
      'git',
      ['reset', `${remote.name}/${remote.branch}`, '--hard'],
      options,
    );
    await spawn('git', ['clean', '--force'], options);
  }

  // Build the project in RELEASE mode which
  // generates optimized and minimized bundles
  process.argv.push('--release');
  if (remote.static) process.argv.push('--static');
  await run(require('./build').default); // eslint-disable-line global-require
  if (process.argv.includes('--static')) {
    await cleanDir('build/*', {
      nosort: true,
      dot: true,
      ignore: ['build/.git', 'build/public'],
    });
    await moveDir('build/public', 'build');
  }

  // Push the contents of the build folder to the remote server via Git
  await spawn('git', ['add', '.', '--all'], options);
  try {
    await spawn('git', ['diff', '--cached', '--exit-code', '--quiet'], options);
  } catch (error) {
    await spawn(
      'git',
      ['commit', '--message', `Update ${new Date().toISOString()}`],
      options,
    );
  }
  await spawn(
    'git',
    ['push', remote.name, `master:${remote.branch}`, '--set-upstream'],
    options,
  );

  // Check if the site was successfully deployed
  const response = await fetch(remote.website);
  console.info(
    `${remote.website} => ${response.status} ${response.statusText}`,
  );
}
998800
def describe(self):
        """"""
        for stage, corunners in self.get_deployers():
            print self.name, "STAGE ", stage
            for d in corunners:
                print d.__class__.__name__, ",".join(
                        [p[1].__name__ for p in d.phases]
                        )
627992
private void prepareJavaSERuntime(final List<File> artifacts) throws MojoExecutionException {
        final File artifact = getProjectJarArtifact(artifacts);
        if (artifact == null) {
            return;
        }
        switch (runtimeSetting.getOsEnum()) {
            case Windows:
                // Windows: Generate web.config to staging folder
                try {
                    WebAppUtils.generateWebConfigFile(artifact.getName(), log, stagingDirectoryPath, this.getClass());
                } catch (IOException e) {
                    throw new MojoExecutionException("Failed to generate web.config file");
                }
                break;
            case Linux:
                // Linux: Rename project artifact to app.jar
                log.info(String.format(RENAMING_MESSAGE, artifact.getAbsolutePath(), DEFAULT_LINUX_JAR_NAME));
                artifact.renameTo(new File(artifact.getParent(), DEFAULT_LINUX_JAR_NAME));
                break;
            default:
                return;
        }
    }
126156
def _generate_api_gateway_deployment(self):
        
        # finally, the deployment
        # this resource MUST come last
        dep_on = []
        for rtype in sorted(self.tf_conf['resource'].keys()):
            for rname in sorted(self.tf_conf['resource'][rtype].keys()):
                dep_on.append('%s.%s' % (rtype, rname))
        self.tf_conf['resource']['aws_api_gateway_deployment']['depl'] = {
            'rest_api_id': '${aws_api_gateway_rest_api.rest_api.id}',
            'description': self.description,
            'stage_name': self.config.stage_name,
            'depends_on': dep_on
        }
        self.tf_conf['output']['deployment_id'] = {
            'value': '${aws_api_gateway_deployment.depl.id}'
        }
377494
public function deploy($version, $stage)
    {
        $deploymentStrategy = $this->getContainer()->get('deployment_strategy');

        $result = $deploymentStrategy->deploy($version, $stage);

        $this->dispatch(AccompliEvents::DEPLOY_COMMAND_COMPLETE);

        return $result;
    }
902023
def generate_all_deps(self, target: Target):
        """"""
        yield from (self.targets[dep_name]
                    for dep_name in self.generate_dep_names(target))
657233
function generateRelease() {
    ReleaseOps.generateRelease();
    const releaseInfo = JSON.parse(cat(".eslint-release-info.json"));

    echo("Generating site");
    target.gensite();
    generateBlogPost(releaseInfo);
    commitSiteToGit(`v${releaseInfo.version}`);
}