I have a pipeline (MainPipeline) which triggers another one (DependantPipeline).
MainPipeline correctly published terraform_src
artifact:
However my DependantPipeline can’t read it, I suppose my mistake somewhere in one of the pipeline definitions. I think I can ommit MainPipeline definition since it does the job, so my DependantPipeline.yml
trigger: none
resources:
repositories:
- repository: Pipelines
type: git
name: Pipelines
ref: test/pipeline
pipelines:
- pipeline: MainPipeline
project: DEV
source: 'dev-crunch'
trigger:
branches:
include:
- test/pipeline
extends:
template: /cicd/pipeline.yml@Pipelines
parameters:
variablesTemplate: devops/variables/global_variables.yml@self
buildJobs: devops/build_jobs.yml@self
devEnvironment: dev
devVariables: devops/variables/dev_variables.yml@self
deployEnvironmentTemplate: devops/deploy_environment.yml@self
That file is responsible for terraform plan where error appears, called deploy.yml:
[...]
- task: TerraformCLI@0
displayName: 'Terraform Plan'
name: plan
inputs:
command: plan
publishPlanResults: 'Terraform-Plan-${{parameters.env}}-$(System.StageAttempt)'
workingDirectory: '$(Pipeline.Workspace)/${{parameters.artifactName}}/terraform'
# commandOptions: '-out=$(Build.ArtifactStagingDirectory)/terraform/terraform.tfplan -detailed-exitcode'
commandOptions: '-out=$(Build.ArtifactStagingDirectory)/terraform/terraform.tfplan -compact-warnings -detailed-exitcode -input=false -var-file=./config/$(projectId).tfvars'
providerGoogleCredentials: ${{parameters.terraformServiceConnection}}
allowTelemetryCollection: false
Which in turn leads to that error:
However, when I take a look at Azure DevOps DependantPipeline artifacts I see:
Without any content >
, just the reference to the terraform_src
.
Would someone resolve me that issue? I can provide more yml definitions if needed.