Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const srcPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN,
config.SOURCE_REPO_ACCESS_TOKEN
? config.SOURCE_REPO_ACCESS_TOKEN
: config.AZURE_PIPELINE_ACCESS_TOKEN
);
const hldPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
true,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
const clusterPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
if (config.MANIFEST && config.GITHUB_MANIFEST_USERNAME) {
const manifestRepo: IRepository = new GitHub(
config.GITHUB_MANIFEST_USERNAME,
config.MANIFEST,
config.MANIFEST_ACCESS_TOKEN
);
// const manifestRepo: Repository = new AzureDevOpsRepo(config.AZURE_ORG, config.AZURE_PROJECT, config.MANIFEST, config.MANIFEST_ACCESS_TOKEN);
manifestRepo.getManifestSyncState().then((syncCommits: any) => {
this.setState({ manifestSyncStatuses: syncCommits });
});
} else if (config.MANIFEST) {
: config.AZURE_PIPELINE_ACCESS_TOKEN
);
const hldPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
true,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
const clusterPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
if (config.MANIFEST && config.GITHUB_MANIFEST_USERNAME) {
const manifestRepo: IRepository = new GitHub(
config.GITHUB_MANIFEST_USERNAME,
config.MANIFEST,
config.MANIFEST_ACCESS_TOKEN
);
// const manifestRepo: Repository = new AzureDevOpsRepo(config.AZURE_ORG, config.AZURE_PROJECT, config.MANIFEST, config.MANIFEST_ACCESS_TOKEN);
manifestRepo.getManifestSyncState().then((syncCommits: any) => {
this.setState({ manifestSyncStatuses: syncCommits });
});
} else if (config.MANIFEST) {
const manifestRepo: IRepository = new AzureDevOpsRepo(
config.AZURE_ORG,
config.AZURE_PROJECT,
config.MANIFEST,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
manifestRepo.getManifestSyncState().then((syncCommit: any) => {
// const manifestRepo: Repository = new AzureDevOpsRepo(config.AZURE_ORG, config.AZURE_PROJECT, config.MANIFEST, config.MANIFEST_ACCESS_TOKEN);
manifestRepo.getManifestSyncState().then((syncCommits: any) => {
this.setState({ manifestSyncStatuses: syncCommits });
});
} else if (config.MANIFEST) {
const manifestRepo: IRepository = new AzureDevOpsRepo(
config.AZURE_ORG,
config.AZURE_PROJECT,
config.MANIFEST,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
manifestRepo.getManifestSyncState().then((syncCommit: any) => {
this.setState({ manifestSyncStatuses: syncCommit });
});
}
Deployment.getDeployments(
config.STORAGE_ACCOUNT_NAME,
config.STORAGE_ACCOUNT_KEY,
config.STORAGE_TABLE_NAME,
config.STORAGE_PARTITION_KEY,
srcPipeline,
hldPipeline,
clusterPipeline,
undefined
).then((deployments: Deployment[]) => {
this.setState({ deployments });
this.setState({ filteredDeployments: this.state.deployments });
this.processQueryParams();
this.updateFilteredDeployments();
this.getAuthors();
if (!this.filterState.defaultApplied) {
this.filter.setFilterItemState("authorFilter", {
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
if (config.MANIFEST && config.GITHUB_MANIFEST_USERNAME) {
const manifestRepo: IRepository = new GitHub(
config.GITHUB_MANIFEST_USERNAME,
config.MANIFEST,
config.MANIFEST_ACCESS_TOKEN
);
// const manifestRepo: Repository = new AzureDevOpsRepo(config.AZURE_ORG, config.AZURE_PROJECT, config.MANIFEST, config.MANIFEST_ACCESS_TOKEN);
manifestRepo.getManifestSyncState().then((syncCommits: any) => {
this.setState({ manifestSyncStatuses: syncCommits });
});
} else if (config.MANIFEST) {
const manifestRepo: IRepository = new AzureDevOpsRepo(
config.AZURE_ORG,
config.AZURE_PROJECT,
config.MANIFEST,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
manifestRepo.getManifestSyncState().then((syncCommit: any) => {
this.setState({ manifestSyncStatuses: syncCommit });
});
}
Deployment.getDeployments(
config.STORAGE_ACCOUNT_NAME,
config.STORAGE_ACCOUNT_KEY,
config.STORAGE_TABLE_NAME,
config.STORAGE_PARTITION_KEY,
srcPipeline,
hldPipeline,
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));
public static initializePipelines() {
srcPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
hldPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
true,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
clusterPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN
!config.STORAGE_ACCOUNT_KEY ||
!config.STORAGE_TABLE_NAME ||
!config.STORAGE_PARTITION_KEY
) {
return;
}
const srcPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN,
config.SOURCE_REPO_ACCESS_TOKEN
? config.SOURCE_REPO_ACCESS_TOKEN
: config.AZURE_PIPELINE_ACCESS_TOKEN
);
const hldPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
true,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
const clusterPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
if (config.MANIFEST && config.GITHUB_MANIFEST_USERNAME) {
const manifestRepo: IRepository = new GitHub(
config.GITHUB_MANIFEST_USERNAME,
config.MANIFEST,
config.MANIFEST_ACCESS_TOKEN
public static initializePipelines() {
srcPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
hldPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
true,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
clusterPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
}
private updateDeployments = () => {
if (
!config.AZURE_ORG ||
!config.AZURE_PROJECT ||
!config.STORAGE_ACCOUNT_NAME ||
!config.STORAGE_ACCOUNT_KEY ||
!config.STORAGE_TABLE_NAME ||
!config.STORAGE_PARTITION_KEY
) {
return;
}
const srcPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN,
config.SOURCE_REPO_ACCESS_TOKEN
? config.SOURCE_REPO_ACCESS_TOKEN
: config.AZURE_PIPELINE_ACCESS_TOKEN
);
const hldPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
true,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
const clusterPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
public static initializePipelines() {
srcPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
hldPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
true,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
clusterPipeline = new AzureDevOpsPipeline(
config.AZURE_ORG,
config.AZURE_PROJECT,
false,
config.AZURE_PIPELINE_ACCESS_TOKEN
);
}