Skip to content

Commit

Permalink
added 160_t
Browse files Browse the repository at this point in the history
  • Loading branch information
Houssem Dellai committed Oct 28, 2023
1 parent 8ab275c commit e6db31b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
10 changes: 10 additions & 0 deletions 160_azure_devops_project/commands.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Create PAT token in Azure DevOps
# Replace it in providers.tf file

terraform init

terraform plan -out tfplan

terraform apply tfplan

terraform destroy
24 changes: 11 additions & 13 deletions 160_azure_devops_project/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,21 @@ resource "azuredevops_workitem" "issue" {
resource "azuredevops_workitem" "user-story" {
project_id = azuredevops_project.project.id
title = "Creating Login Page"
type = "User Story" # Bug, Epic, Feature, Issue, Task, Test Case, User Story
state = "Active" # New, Active, Resolved, and Closed
type = "User Story" # Bug, Epic, Feature, Issue, Task, Test Case, User Story
state = "Active" # New, Active, Resolved, and Closed
tags = ["frontend", "mobile-app"]
}

resource "azuredevops_workitem" "task" {
project_id = azuredevops_project.project.id
title = "Creating Authorisation Server"
type = "Task" # Bug, Epic, Feature, Issue, Task, Test Case, User Story
tags = ["api", "authorisation"]

title = "Creating Authorisation Server"
type = "Task" # Bug, Epic, Feature, Issue, Task, Test Case, User Story
tags = ["api", "authorisation"]
}

# import existing Git repository

resource "azuredevops_git_repository" "import-repo" {
project_id = azuredevops_project.project.id
name = "Imported Repository"
Expand All @@ -106,19 +108,15 @@ resource "azuredevops_git_repository" "import-repo" {
}

resource "azuredevops_build_definition" "pipeline-imported" {
project_id = azuredevops_project.project.id
name = "CI-CD Pipeline Matrix"
path = "\\webapp"
project_id = azuredevops_project.project.id
name = "CI-CD Pipeline Matrix"
path = "\\webapp"
agent_pool_name = "Azure Pipelines"

ci_trigger {
use_yaml = true
}

# pull_request_trigger {
# use_yaml = true
# }

features {
skip_first_run = false
}
Expand Down
8 changes: 4 additions & 4 deletions 160_azure_devops_project/providers.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
terraform {
required_providers {
azuredevops = {
source = "microsoft/azuredevops"
source = "microsoft/azuredevops"
version = "0.10.0"
}
}
}

provider "azuredevops" {
# Configuration options
org_service_url = "https://dev.azure.com/houssemdellai"
personal_access_token = "qkfon5cdldekin4qnkgfr2nf367h6yjnndm5upwqepd5rekl4l5a"
org_service_url = "https://dev.azure.com/houssemdellai"
personal_access_token = "qkfon5cdldekin4qnkgfr2nf367h6yjnndm5upwqepd5rekl4l5a"
}

# export AZDO_PERSONAL_ACCESS_TOKEN=<Personal Access Token>
# export AZDO_ORG_SERVICE_URL=https://dev.azure.com/<Your Org Name>
# export AZDO_ORG_SERVICE_URL=https://dev.azure.com/<Your Org Name>

0 comments on commit e6db31b

Please sign in to comment.