Skip to content

Commit

Permalink
Comments resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
luarredo committed Jan 7, 2025
1 parent 35469b1 commit 8f27921
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions docker/custom_docker_image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

trigger:
- trunk
tags:
include:
- v*

pool:
name: Azure Pipelines
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ide_extension/vscode/devsecops/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
},
"devsecops.groupName": {
"type": "string",
"default": "NU0429001_devsecops_engine_backend_dev",
"default": "Empty",
"description": "Variables group name"
},
"devsecops.releaseId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit 8f27921

Please sign in to comment.