From 8ca89604f263490122e083813dcee19df18404c4 Mon Sep 17 00:00:00 2001 From: Victor Vazquez Date: Fri, 4 Oct 2024 10:43:47 -0700 Subject: [PATCH] fix java devcontainer on latest feature issue (#4405) --- .devcontainer/devcontainer.json | 2 +- .../templates/steps/template-test-run-job.yml | 26 +++++++++---------- .../devcontainer.json/java/devcontainer.json | 2 +- .../java/terraform/devcontainer.json | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f3f382a287b..1e9fca2ca46 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,7 +14,7 @@ }, "ghcr.io/devcontainers/features/azure-cli:1": {}, "ghcr.io/devcontainers/features/dotnet:2": {}, - "ghcr.io/devcontainers/features/java:1": {}, + "ghcr.io/devcontainers/features/java:1.6.0": {}, "ghcr.io/devcontainers/features/node:1": {}, "ghcr.io/devcontainers/features/python:1": {}, "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {}, diff --git a/eng/pipelines/templates/steps/template-test-run-job.yml b/eng/pipelines/templates/steps/template-test-run-job.yml index a5bbb2f6df7..9e286939bbf 100644 --- a/eng/pipelines/templates/steps/template-test-run-job.yml +++ b/eng/pipelines/templates/steps/template-test-run-job.yml @@ -71,10 +71,10 @@ steps: env: | # Required secrets for Terraform service principal authentication # $(arm-*) secrets are set by azd-login.yml - ARM_CLIENT_ID=$(arm-client-id) - ARM_CLIENT_SECRET=$(arm-client-secret) - ARM_TENANT_ID=$(arm-tenant-id) - SUBSCRIPTION_ID=$(SubscriptionId) + ARM_CLIENT_ID=$(arm-client-id-test-tenant) + ARM_CLIENT_SECRET=$(arm-client-secret-test-tenant) + ARM_TENANT_ID=$(arm-tenant-id-test-tenant) + SUBSCRIPTION_ID=$(SubscriptionId-test-tenant) # Pass in TemplateRunEnvironmentVariables $(VARIABLE_LIST) @@ -86,7 +86,7 @@ steps: VALIDATE=$(TemplateName) PLAYWRIGHT_REPORTER='list' LOCATION=$(AzureLocation) - SUBSCRIPTION=$(SubscriptionId) + SUBSCRIPTION=$(SubscriptionId-test-tenant) ENV_SUFFIX=$(Build.BuildId)-$(System.JobAttempt) CLEANUP=$(SynchronousCleanup) @@ -114,19 +114,19 @@ steps: # Login azd azd auth login \ - --client-id "$(arm-client-id)" \ - --client-secret "$(arm-client-secret)" \ - --tenant-id "$(arm-tenant-id)" + --client-id "$(arm-client-id-test-tenant)" \ + --client-secret "$(arm-client-secret-test-tenant)" \ + --tenant-id "$(arm-tenant-id-test-tenant)" # Login az CLI (required for scenarios where az is invoked) az login \ --service-principal \ - -u "$(arm-client-id)" \ - -p "$(arm-client-secret)" \ - --tenant "$(arm-tenant-id)" + -u "$(arm-client-id-test-tenant)" \ + -p="$(arm-client-secret-test-tenant)" \ + --tenant "$(arm-tenant-id-test-tenant)" # set default sub for az to be the same used by azd - az account set --subscription "$(SubscriptionId)" + az account set --subscription "$(SubscriptionId-test-tenant)" # enable alpha features azd config set alpha.all on @@ -143,7 +143,7 @@ steps: -e '$(EnvPrefixName)' \ -t '$(TemplateName)' \ -b '$(TemplateBranchName)' \ - -s '$(SubscriptionId)' \ + -s '$(SubscriptionId-test-tenant)' \ -u '$(Build.BuildId)-$(System.JobAttempt)' \ -l '$(AzureLocation)' \ -p 'list' \ diff --git a/templates/common/.devcontainer/devcontainer.json/java/devcontainer.json b/templates/common/.devcontainer/devcontainer.json/java/devcontainer.json index e101ed8bfe7..080f4540cc2 100644 --- a/templates/common/.devcontainer/devcontainer.json/java/devcontainer.json +++ b/templates/common/.devcontainer/devcontainer.json/java/devcontainer.json @@ -4,7 +4,7 @@ "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": { }, - "ghcr.io/devcontainers/features/java:1": {}, + "ghcr.io/devcontainers/features/java:1.6.0": {}, "ghcr.io/azure/azure-dev/azd:latest": {} }, "customizations": { diff --git a/templates/common/.devcontainer/devcontainer.json/java/terraform/devcontainer.json b/templates/common/.devcontainer/devcontainer.json/java/terraform/devcontainer.json index 4b0019b9003..65f6d346c3d 100644 --- a/templates/common/.devcontainer/devcontainer.json/java/terraform/devcontainer.json +++ b/templates/common/.devcontainer/devcontainer.json/java/terraform/devcontainer.json @@ -9,7 +9,7 @@ "ghcr.io/devcontainers/features/terraform:1": { "version": "latest" }, - "ghcr.io/devcontainers/features/java:1": {}, + "ghcr.io/devcontainers/features/java:1.6.0": {}, "ghcr.io/azure/azure-dev/azd:latest": {} }, "customizations": {