diff --git a/.pipelines/cg-pipeline.yaml b/.pipelines/cg-pipeline.yaml new file mode 100644 index 0000000..f4e5b7b --- /dev/null +++ b/.pipelines/cg-pipeline.yaml @@ -0,0 +1,56 @@ +trigger: none + +extends: + template: v2/OneBranch.Official.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates + parameters: + cloudvault: # https://aka.ms/obpipelines/cloudvault + enabled: false # set to true to enable cloudvault + runmode: stage # linux can run CloudVault upload as a separate stage + dependsOn: linux_build + artifacts: + - drop_linux_stage_linux_job + + globalSdl: # https://aka.ms/obpipelines/sdl + # tsa: + # enabled: true # SDL results of non-official builds aren't uploaded to TSA by default. + # credscan: + # suppressionsFile: $(Build.SourcesDirectory)\.config\CredScanSuppressions.json + policheck: + break: true # always break the build on policheck issues. You can disable it by setting to 'false' + # suppression: + # suppressionFile: $(Build.SourcesDirectory)\.gdn\global.gdnsuppress + + stages: + - stage: linux_stage + jobs: + - job: linux_job + pool: + type: docker + os: linux + variables: # More settings at https://aka.ms/obpipelines/yaml/jobs + ob_outputDirectory: '$(Build.SourcesDirectory)/out' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts + + steps: # These steps will be run in unrestricted container's network + - task: onebranch.pipeline.imagebuildinfo@1 + displayName: Build the victim image + inputs: + repositoryName: microsoft/defender-for-cloud/attacksimulation/victim + dockerFileRelPath: Images/victim/Dockerfile + dockerFileContextPath: Images/victim + registry: ghcr.io + saveImageToPath: victim.tar + buildkit: 0 + enable_network: true + build_tag: latest + + - task: onebranch.pipeline.imagebuildinfo@1 + displayName: Build the attacker image + inputs: + repositoryName: microsoft/defender-for-cloud/attacksimulation/attacker + dockerFileRelPath: Images/attacker/Dockerfile + dockerFileContextPath: Images/attacker + registry: ghcr.io + saveImageToPath: attacker.tar + buildkit: 0 + enable_network: true + build_tag: latest