How to use the spektate/lib/Deployment.getDeploymentsBasedOnFilters function in spektate

To help you get started, we’ve selected a few spektate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / spektate / src / cli / AccessHelper.ts View on Github external
public static getDeployments = (
    outputFormat: OUTPUT_FORMAT,
    environment?: string,
    imageTag?: string,
    p1Id?: string,
    commitId?: string,
    service?: string,
    deploymentId?: string
  ) => {
    Deployment.getDeploymentsBasedOnFilters(
      config.STORAGE_ACCOUNT_NAME,
      config.STORAGE_ACCOUNT_KEY,
      config.STORAGE_TABLE_NAME,
      config.STORAGE_PARTITION_KEY,
      srcPipeline,
      hldPipeline,
      clusterPipeline,
      environment,
      imageTag,
      p1Id,
      commitId,
      service,
      deploymentId
    ).then((deployments: Deployment[]) => {
      if (outputFormat === OUTPUT_FORMAT.JSON) {
        console.log(JSON.stringify(deployments));
github microsoft / spektate / src / cli / AccessHelper.ts View on Github external
public static getAuthorForCommitOrBuild(
    commitId?: string,
    buildId?: string,
    callback?: (author?: IAuthor) => void
  ) {
    Deployment.getDeploymentsBasedOnFilters(
      config.STORAGE_ACCOUNT_NAME,
      config.STORAGE_ACCOUNT_KEY,
      config.STORAGE_TABLE_NAME,
      config.STORAGE_PARTITION_KEY,
      srcPipeline,
      hldPipeline,
      clusterPipeline,
      undefined,
      undefined,
      buildId,
      commitId,
      undefined,
      undefined
    ).then((deployments: Deployment[]) => {
      if (deployments.length > 0 && callback) {
        deployments[0].fetchAuthor(callback);