Check this deploy.
766144
def check(self, radl):
        """"""

        if not radl.get_system_by_name(self.id):
            raise RADLParseException("Invalid system id in the deploy.", line=self.line)

        if self.vm_number < 0:
            raise RADLParseException("Invalid number of virtual machines to deploy.",
                                     line=self.line)
676257
def check(
    state,
    unused=False,
    style=False,
    ignore=None,
    args=None,
    **kwargs
):
    """"""
    from ..core import do_check

    do_check(
        three=state.three,
        python=state.python,
        system=state.system,
        unused=unused,
        ignore=ignore,
        args=args,
        pypi_mirror=state.pypi_mirror,
    )
128497
private function checkStatus()
    {
        if (!$this->running) {
            return;
        }

        if ($this->running) {
            foreach (proc_get_status($this->resource) as $key => $value) {
                if ($key == 'command') {
                    continue;
                }

                $this->$key = $value;
            }
        }

        if (!$this->running) {
            $this->cleanup();
        }
    }
1273621
def check(ctx):
    

    check_command = f"twine check {ctx.directory!s}/dist/*"
    report.info(ctx, "package.check", "checking package")
    ctx.run(check_command)
732886
public function main()
    {
        $this->validate();

        $codeDeploy = $this->getService();

        $config = [
            'applicationName' => $this->getApplication(),
            'currentDeploymentGroupName' => $this->getName(),
            'serviceRoleArn' => $this->getServiceRole()
        ];
        
        if ($this->autoScalingGroups) {
            $config['autoScalingGroups'] = $this->getAutoScalingGroups();
        }
        
        if ($this->ec2TagFilters) {
            $config['ec2TagFilters'] = $this->getEc2TagFilters();
        }

        if ($this->getDeploymentConfigName()) {
            $config['deploymentConfigName'] = $this->getDeploymentConfigName();
        }

        try {
            $codeDeploy
                ->getDeploymentGroup([
                    'applicationName' => $this->getApplication(),
                    'deploymentGroupName' => $this->getName()
                ]);
            // update
            if ($this->updateOnConflict) {
                $config['currentDeploymentGroupName'] = $this->getName();
                $codeDeploy->updateDeploymentGroup($config);
                $this->log('Deployment Group [' . $this->getName() . '] successfully updated.');
            } else {
                throw new \BuildException('Deployment Group [' . $this->getName() . '] already exists!');
            }
        } catch (CodeDeployException $e) {
            switch ($e->getAwsErrorCode()) {
                case 'ApplicationDoesNotExistException':
                    $codeDeploy->createApplication([
                        'applicationName' => $config['applicationName']
                    ]);
                    $this->log('Application [' . $config['applicationName'] . '] successfully created.');
                case 'DeploymentGroupDoesNotExistException':
                    // create deployment group
                    $config['deploymentGroupName'] = $this->getName();
                    $codeDeploy->createDeploymentGroup($config);
                    $this->log('Deployment Group [' . $this->getName() . '] successfully created.');
                    break;
                default:
                    throw $e;
            }
        }
    }
964055
async function deploy() {
  try {
    await browserifyDBCP();
    await uglify();
    const ipfsHash = await deployToIPFS(`${ deploymentFolder}/${ browserifyName}`);
    await pinToIPFS(ipfsHash);
    const ipnsHash = await deployToIpns(ipfsHash);
    deleteDeploymentFolder();

    console.log(`\nFinished deployment`);
    console.log(`IPFS: ${ ipfsHash }`);
    console.log(`IPNS: ${ ipnsHash }`);
  } catch (ex) {
    console.error(ex);
  }
}
576726
public function main()
    {
        $this->validate();

        $codeDeploy = $this->getService();

        $config = [
            'applicationName' => $this->getApplication(),
            'DeploymentGroupName' => $this->getName()
        ];
        
        try {
            $codeDeploy
                ->deleteDeploymentGroup([
                    'applicationName' => $this->getApplication(),
                    'deploymentGroupName' => $this->getName()
                ]);
            $this->log('Deployment Group [' . $this->getName() . '] has been deleted.');
        } catch (CodeDeployException $e) {
            if ($e->getAwsErrorCode() == 'DeploymentGroupDoesNotExistException') {
                $this->log('Deployment Group [' . $this->getName() . '] does not exist.');
            }
        }
    }
1204116
def deploy():
    

    init_tasks()

    if not has_hook("copy"):
        return report("No copy method has been defined")

    if not env.exists(paths.get_shared_path()):
        return report("You need to run setup before running deploy")

    run_hook("before_deploy")

    release_name = int(time.time()*1000)
    release_path = paths.get_releases_path(release_name)

    env.current_release = release_path

    try:
        run_hook("copy")
    except Exception as e:
        return report("Error occurred on copy. Aborting deploy", err=e)

    if not env.exists(paths.get_source_path(release_name)):
        return report("Source path not found '%s'" %
                      paths.get_source_path(release_name))

    try:
        run_hook("deploy")
    except Exception as e:
        message = "Error occurred on deploy, starting rollback..."

        logger.error(message)
        logger.error(e)

        run_task("rollback")
        return report("Error occurred on deploy")

    # Symlink current folder
    paths.symlink(paths.get_source_path(release_name),
                  paths.get_current_path())

    # Clean older releases
    if "max_releases" in env:
        cleanup_releases(int(env.max_releases))

    run_hook("after_deploy")

    if "public_path" in env:
        paths.symlink(paths.get_source_path(release_name), env.public_path)

    logger.info("Deploy complete")
563345
public function check()
    {
        $this->notify(Status::CHECK, $this->loaded);
        $envArgs = explode('|', (string) getenv($this->envAllowXdebug));

        if (empty($envArgs[0]) && $this->requiresRestart((bool) $this->loaded)) {
            // Restart required
            $this->notify(Status::RESTART);

            if ($this->prepareRestart()) {
                $command = $this->getCommand();
                $this->notify(Status::RESTARTING, $command);
                $this->restart($command);
            }
            return;
        }

        if (self::RESTART_ID === $envArgs[0] && count($envArgs) === 5) {
            // Restarting, so unset environment variable and use saved values
            $this->notify(Status::RESTARTED);

            Process::setEnv($this->envAllowXdebug);
            self::$inRestart = true;

            if (!$this->loaded) {
                // Skipped version is only set if xdebug is not loaded
                self::$skipped = $envArgs[1];
            }

            // Put restart settings in the environment
            $this->setEnvRestartSettings($envArgs);
            return;
        }

        $this->notify(Status::NORESTART);

        if ($settings = self::getRestartSettings()) {
            // Called with existing settings, so sync our settings
            $this->syncSettings($settings);
        }
    }
182759
function onDeployError(deploy) {
    if (typeof self.FLEETS[deploy.id] === 'undefined') return; //nothing else to do.
    var fleet = self.FLEETS[deploy.id];
    fleet.failed++;
    fleet.failed_total++;
    var allowedError = self.getFleetError(deploy.repo);
    if (allowedError.indexOf('%') === -1) { // we have a number.
      allowedError = parseInt(allowedError, 10);
    } else {  // we have a percentage.
      var perc = parseInt(allowedError.replace('%', ''), 10);
      allowedError = Math.floor(perc / 100 * fleet.total);
    }
    // IF we have a max error rate, we stop the deploy.
    if (fleet.failed_total >= allowedError) {
      self.emit('deploy.error', deploy);
      self.log('fatal', 'Error threshold ' + fleet.failed_total + ' reached for deploy ' + deploy.id + ' on ' + deploy.repo);
      clearTimeout(fleet._timeout);
      delete self.FLEETS[deploy.id];
      return;
    }
    // IF we're still acceptable, we run next.
    createFleet(deploy);
  }
885407
def check(self, check_all=True, do_reload=True):
        """"""
        with enaml.imports():
            super(EnamlReloader, self).check(check_all=check_all, do_reload=do_reload)
536620
public function setupIfNecessary()
    {
        // Check if local is ready for deployment
        return $this->modulable->on('local', function () {
            $primer = $this->modulable->executeTask('Primer');

            return $primer ?: $this->modulable->halt('Project is not ready for deploy. You were almost fired.');
        });

        if (!$this->isSetup()) {
            $this->explainer->error('Server is not ready, running Setup task');

            return $this->modulable->executeTask('Setup');
        }
    }
663641
public function main()
    {

        // load the interval we want to scan the directory
        $interval = $this->getInterval();

        // load the deployment directory
        $directory = $this->getDirectory();

        // log the configured deployment directory
        $this->getSystemLogger()->debug(sprintf('Start watching directory %s', $directory));

        // load the deployment flag
        $deploymentFlag = $this->getDeploymentFlag();

        // wait until the server has been successfully started at least once
        while ($this->getLastSuccessfullyDeployment($deploymentFlag) === 0) {
            $this->getSystemLogger()->debug(sprintf('%s is waiting for first successful deployment ...', __CLASS__));
            sleep($interval);
        }

        // load the initial hash value of the deployment directory
        $oldHash = $this->getDirectoryHash($directory);

        // watch the deployment directory
        while (true) {
            // load the actual hash value for the deployment directory
            $newHash = $this->getDirectoryHash($directory);

            // log the found directory hash value
            $this->getSystemLogger()->debug(sprintf("Comparing directory hash %s (previous) : %s (actual)", $oldHash, $newHash));

            // compare the hash values, if not equal restart the appserver
            if ($oldHash !== $newHash) {
                // log that changes have been found
                $this->getSystemLogger()->debug(sprintf('Found changes in directory %s', $directory));

                // log the UNIX timestamp of the last successful deployment
                $lastSuccessfullDeployment = $this->getLastSuccessfullyDeployment($deploymentFlag);

                // restart the appserver
                $this->restart();

                // wait until deployment has been finished
                while ($lastSuccessfullDeployment == $this->getLastSuccessfullyDeployment($deploymentFlag)) {
                    sleep($interval);
                }

                // set the directory new hash value after successful deployment
                $oldHash = $this->getDirectoryHash($directory);

                // log that the appserver has been restarted successful
                $this->getSystemLogger()->debug('appserver has successfully been restarted');

            } else {
                // if no changes has been found, wait a second
                sleep($interval);
            }
        }
    }
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
583455
def deploy(overwrite=False):
    
    check_settings()
    if overwrite:
        rmvirtualenv()
    deploy_funcs = [deploy_project,deploy_templates, deploy_static, deploy_media,  deploy_webconf, deploy_wsgi]
    if not patch_project() or overwrite:
        deploy_funcs = [deploy_db,mkvirtualenv,pip_install_requirements] + deploy_funcs
    for func in deploy_funcs: func()
256652
public static synchronized void deployment(Class<?> deployment) {
		Preconditions.checkArgument(deployment != null, 
				"Parameter 'deployment' must not be [" + deployment + "]");
		Preconditions.checkArgument(deployment.getAnnotation(Deployment.class) != null,
				"'deployment' [" + deployment + "] must be annotated with @Deployment");
		Jaguar.deployment = deployment;
		logger.info("Deployment has been set to [" + deployment.getSimpleName() + "]");
	}
965022
def check(self, radl):
        """"""
        SIMPLE_FEATURES = {
            "name": (str, lambda x, _: bool(x.value)),
            "path": (str, lambda x, _: bool(x.value)),
            "version": (str, is_version),
            "preinstalled": (str, ["YES", "NO"])
        }
        self.check_simple(SIMPLE_FEATURES, radl)