From 8f27921727399f5108b98f94e8aa7acbf3b537ff Mon Sep 17 00:00:00 2001 From: luarredo Date: Tue, 7 Jan 2025 10:53:43 -0500 Subject: [PATCH] Comments resolved --- docker/custom_docker_image.yml | 12 +++++++----- ide_extension/vscode/devsecops/package.json | 2 +- .../infraestructure/drivenAdapter/ImageScanner.ts | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docker/custom_docker_image.yml b/docker/custom_docker_image.yml index 00b6f95e..369284e8 100644 --- a/docker/custom_docker_image.yml +++ b/docker/custom_docker_image.yml @@ -1,6 +1,8 @@ trigger: -- trunk + tags: + include: + - v* pool: name: Azure Pipelines @@ -10,23 +12,23 @@ steps: - task: connect-agent@2 displayName: 'Hosted agent' inputs: - hostedAgentService: 90469226-70c7-4fd9-acf1-a6f54739e00a + hostedAgentService: $(agent-id) - script: | - version=$(python3 -c "import sys; sys.path.append('tools/devsecops_engine_tools'); import version; print(version.version)") + version=$(Build.SourceBranch) echo "##vso[task.setvariable variable=RELEASE_VERSION]$version" displayName: 'Set lib version from version.py' - script: echo "Release version is $(RELEASE_VERSION)" displayName: 'Use the release version' -- script: python3 docker/get_files_ad.py $(repo-owner-ad) "$(project-ad)" NU0429001_DevSecOps_Remote_Config /engine_sast/engine_iac/ConfigTool.json $(ad-at) path +- script: python3 docker/get_files_ad.py $(repo-owner-ad) "$(project-ad)" $(remote-config-repo) /engine_sast/engine_iac/ConfigTool.json $(ad-at) path displayName: 'Get Custom Remote Config' - script: python3 docker/get_files_gh.py $(repo-owner) $(project) rules $(gh-at) rules displayName: 'Get Custom IAC Rules' -- script: docker build --build-arg VERSION=$(RELEASE_VERSION) -t artifactory.apps.bancolombia.com/devops/devsecops-engine-tools:$(RELEASE_VERSION) -f docker/Dockerfile . && docker tag artifactory.apps.bancolombia.com/devops/devsecops-engine-tools:$(RELEASE_VERSION) artifactory.apps.bancolombia.com/devops/devsecops-engine-tools:$(RELEASE_VERSION) +- script: docker build --build-arg VERSION=$(RELEASE_VERSION) -t $(artifactory-url)/devops/devsecops-engine-tools:$(RELEASE_VERSION) -f docker/Dockerfile . && docker tag artifactory.apps.bancolombia.com/devops/devsecops-engine-tools:$(RELEASE_VERSION) artifactory.apps.bancolombia.com/devops/devsecops-engine-tools:$(RELEASE_VERSION) displayName: 'Build Docker Image' - task: ArtifactoryDocker@1 diff --git a/ide_extension/vscode/devsecops/package.json b/ide_extension/vscode/devsecops/package.json index b01e4b73..82cfb90e 100644 --- a/ide_extension/vscode/devsecops/package.json +++ b/ide_extension/vscode/devsecops/package.json @@ -63,7 +63,7 @@ }, "devsecops.groupName": { "type": "string", - "default": "NU0429001_devsecops_engine_backend_dev", + "default": "Empty", "description": "Variables group name" }, "devsecops.releaseId": { diff --git a/ide_extension/vscode/devsecops/src/infraestructure/drivenAdapter/ImageScanner.ts b/ide_extension/vscode/devsecops/src/infraestructure/drivenAdapter/ImageScanner.ts index bac7e997..9402e952 100644 --- a/ide_extension/vscode/devsecops/src/infraestructure/drivenAdapter/ImageScanner.ts +++ b/ide_extension/vscode/devsecops/src/infraestructure/drivenAdapter/ImageScanner.ts @@ -7,7 +7,7 @@ import IScannerGateway from "../../domain/model/gateways/IScannerGateway"; export class ImageScanner implements IScannerGateway{ scan(elementToScan: string, outputChannel: OutputChannel): void { - exec(`/usr/local/bin/docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ~/dev/bancolombia/NU0429001_DevSecOps_Remote_Config:/app/custom_remote_config devsecops-engine-tools:10 devsecops-engine-tools --platform_devops local --remote_config_repo docker_default_remote_config --tool engine_container --token_engine_container 3F9F5v15/Vsf7JOwg1Y9Vz3OeWg= --image_to_scan ${elementToScan}`, (error, stdout, stderr) => { + exec(`/usr/local/bin/docker run --rm -v /var/run/docker.sock:/var/run/docker.sock devsecops-engine-tools:10 devsecops-engine-tools --platform_devops local --remote_config_repo docker_default_remote_config --tool engine_container --image_to_scan ${elementToScan}`, (error, stdout, stderr) => { if (error) { console.error(`exec error: ${error}`); console.error(`stderr: ${stderr}`);