-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: separate out into separate jobs in attempt to make validation work
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
1 parent
46d5cc8
commit ae96cd2
Showing
1 changed file
with
5 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ stages: | |
pool: | ||
vmImage: ubuntu-latest | ||
jobs: | ||
- job: terraform | ||
- job: "Plan" | ||
variables: | ||
- name: OTHER_SOURCE | ||
value: $[variables['System.PullRequest.SourceBranch']] | ||
|
@@ -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: | | ||
|
@@ -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: "ManualApproval" | ||
steps: | ||
# - task: TerraformTaskV3@ | ||
- task: ManualValidation@0 | ||
timeoutInMinutes: "1440" # task times out in 1 day | ||
|
@@ -101,6 +101,8 @@ stages: | |
[email protected] | ||
instructions: "Please review the output of Terraform plan before approving." | ||
onTimeout: "reject" | ||
- job: "Apply" | ||
steps: | ||
- task: Bash@3 | ||
displayName: Terraform apply | ||
inputs: | ||
|