Skip to content

Commit c646ced

Browse files
committed
debug
1 parent 3607f1a commit c646ced

File tree

2 files changed

+47
-13
lines changed

2 files changed

+47
-13
lines changed

azure/templates/deploy-stage.yml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ parameters:
1616
default: ''
1717
- name: proxy_path
1818
type: string
19-
default: 'internal-dev'
19+
default: 'internal-dev'
2020
- name: secret_file_ids
2121
type: object
2222
default: []
@@ -150,7 +150,39 @@ jobs:
150150
echo "##vso[task.setvariable variable=FULLY_QUALIFIED_SERVICE_NAME]${FULLY_QUALIFIED_SERVICE_NAME}"
151151
fi
152152
displayName: Override FULLY_QUALIFIED_SERVICE_NAME
153-
153+
# Add this step after checkout and before terraform
154+
- task: Bash@3
155+
displayName: 'Debug Azure DevOps Structure'
156+
inputs:
157+
targetType: 'inline'
158+
script: |
159+
echo "=== SAW AZURE DEVOPS WORKSPACE DEBUG ==="
160+
echo "Pipeline.Workspace: $(Pipeline.Workspace)"
161+
echo "Build.SourcesDirectory: $(Build.SourcesDirectory)"
162+
echo "System.DefaultWorkingDirectory: $(System.DefaultWorkingDirectory)"
163+
echo "Agent.BuildDirectory: $(Agent.BuildDirectory)"
164+
echo "Current directory: $(pwd)"
165+
echo ""
166+
echo "=== WORKSPACE CONTENTS ==="
167+
echo "Pipeline workspace contents:"
168+
find $(Pipeline.Workspace) -maxdepth 3 -type d 2>/dev/null | head -20
169+
echo ""
170+
echo "=== SOURCE DIRECTORY CONTENTS ==="
171+
echo "Build sources directory contents:"
172+
ls -la $(Build.SourcesDirectory) 2>/dev/null || echo "Build.SourcesDirectory not accessible"
173+
echo ""
174+
echo "=== CURRENT DIRECTORY TREE ==="
175+
echo "Current directory tree:"
176+
find . -maxdepth 3 -type d 2>/dev/null || echo "Cannot access current directory"
177+
echo ""
178+
echo "=== SEARCH FOR LAMBDAS ==="
179+
echo "Searching for lambdas directory:"
180+
find $(Pipeline.Workspace) -name "lambdas" -type d 2>/dev/null || echo "No lambdas directory found"
181+
echo ""
182+
echo "=== SEARCH FOR DOCKERFILES ==="
183+
echo "Searching for Dockerfiles:"
184+
find $(Pipeline.Workspace) -name "*.Dockerfile" -type f 2>/dev/null || echo "No Dockerfiles found"
185+
echo "=== END DEBUG ==="
154186
- checkout: self
155187
path: "s/${{ parameters.service_name }}"
156188
submodules: true
@@ -174,4 +206,4 @@ jobs:
174206
parameters:
175207
state: failure
176208
on_failure: true
177-
description: "Deploy failed"
209+
description: "Deploy failed"

terraform/id_sync_lambda.tf

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@ locals {
1515

1616
# Combined SHA to trigger rebuild when either directory changes
1717
combined_sha = sha1("${local.shared_dir_sha}${local.id_sync_lambda_dir_sha}")
18+
repo_root = abspath("${path.root}/..")
19+
is_azure_devops = can(regex("^/agent/_work", path.root))
20+
1821
debug_paths = {
19-
terraform_root = path.root
20-
lambdas_dir = local.lambdas_dir
21-
id_sync_dir = local.id_sync_lambda_dir
22-
dockerfile_path = "${local.lambdas_dir}/id_sync.Dockerfile"
22+
terraform_root = path.root
23+
repo_root = local.repo_root
24+
lambdas_dir = local.lambdas_dir
25+
dockerfile_path = local.id_sync_dockerfile
26+
is_azure = local.is_azure_devops
2327
}
24-
alt_dockerfile_paths = [
25-
"${path.root}/../lambdas/id_sync.Dockerfile",
26-
"${path.root}/../../lambdas/id_sync.Dockerfile",
27-
"${path.root}/../id_sync.Dockerfile",
28-
"${path.root}/id_sync.Dockerfile"
29-
]
3028
}
29+
output "debug_terraform_paths" {
30+
value = local.debug_paths
31+
}
32+
3133
resource "null_resource" "find_dockerfile" {
3234
provisioner "local-exec" {
3335
command = <<-EOT

0 commit comments

Comments
 (0)