Skip to content

Commit

Permalink
fix: separate out into separate jobs in attempt to make validation work
Browse files Browse the repository at this point in the history
getting error:
> Job terraform: Step references task 'ManualValidation'
> at version '0.198.0' which is not valid for the given job target.
  • Loading branch information
angela-tran committed Aug 24, 2023
1 parent 46d5cc8 commit c5ea724
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions experiment-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ stages:
pool:
vmImage: ubuntu-latest
jobs:
- job: terraform
- job: Terraform Plan
variables:
- name: OTHER_SOURCE
value: $[variables['System.PullRequest.SourceBranch']]
Expand All @@ -30,8 +30,6 @@ stages:
- name: TARGET
value: $[variables['System.PullRequest.TargetBranch']]
steps:
- bash: |
echo $(IS_TAG)
# set the workspace variable at runtime (rather than build time) so that all the necessary variables are available, and we can use Python
# https://learn.microsoft.com/en-us/azure/devops/pipelines/process/set-variables-scripts?view=azure-devops&tabs=bash#about-tasksetvariable
- bash: |
Expand Down Expand Up @@ -93,6 +91,8 @@ stages:
script: echo "terraform plan"
# the plan is done as part of the apply (below), so don't bother doing it twice
condition: notIn(variables['Build.SourceBranchName'], 'dev', 'test', 'prod')
- job: Wait for approval
steps:
# - task: TerraformTaskV3@
- task: ManualValidation@0
timeoutInMinutes: "1440" # task times out in 1 day
Expand All @@ -101,6 +101,8 @@ stages:
[email protected]
instructions: "Please review the output of Terraform plan before approving."
onTimeout: "reject"
- job: Terraform Apply
steps:
- task: Bash@3
displayName: Terraform apply
inputs:
Expand Down

0 comments on commit c5ea724

Please sign in to comment.