Skip to content

Commit

Permalink
chore: Align terraform infrastructure and lib pipelines for tfenv usa…
Browse files Browse the repository at this point in the history
…ge (#73)

Jira EPMDEDP-12853

Related #73

Change-Id: Id0d17ffc83dbd94e24cb16613a2042cb63bc844f
  • Loading branch information
Oleksandr Taruraiev committed Nov 17, 2023
1 parent 4bd9410 commit 4f49d49
Show file tree
Hide file tree
Showing 20 changed files with 105 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
params:
- name: EXTRA_COMMANDS
value: |
if [ -f .terraform-version ]; then
tfenv install
else
tfenv install "$(params.terraform_default_version)";
tfenv use "$(params.terraform_default_version)";
fi
terraform init
chown -R $(whoami):$(whoami) .
pre-commit run --all-files
workspaces:
Expand All @@ -28,6 +35,13 @@
params:
- name: EXTRA_COMMANDS
value: |
if [ -f .terraform-version ]; then
tfenv install
else
tfenv install "$(params.terraform_default_version)";
tfenv use "$(params.terraform_default_version)";
fi
terraform init
chown -R $(whoami):$(whoami) .
pre-commit run --all-files
workspaces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gerrit-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gerrit-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ spec:
type: string
- name: targetBranch
description: Target branch of Merge Request
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gerrit-review-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "github-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "github-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ spec:
- name: gitsha
description: "commit sha"
type: string
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "github-review-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gitlab-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gitlab-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ spec:
- name: gitfullrepositoryname
description: "repository full name"
type: string
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gitlab-review-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gerrit-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gerrit-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ spec:
type: string
- name: targetBranch
description: Target branch of Merge Request
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gerrit-review-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "github-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "github-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ spec:
- name: gitsha
description: "commit sha"
type: string
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "github-review-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gitlab-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ spec:
- name: JIRA_SERVER
description: "Jira server name"
default: ""
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gitlab-build-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ spec:
- name: gitfullrepositoryname
description: "repository full name"
type: string
- name: terraform_default_version
type: string
default: "1.4.5"
description: The default terraform version used if the `.terraform-version` file does not exist in the repository.

tasks:

{{- include "gitlab-review-start" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
type: string
- name: BASE_IMAGE
type: string
default: epamedp/tekton-pre-commit:0.1.4
default: epamedp/tekton-pre-commit:0.1.5
description: The terraform-check image.
steps:
- name: terraform
Expand Down

0 comments on commit 4f49d49

Please sign in to comment.