Skip to content

Commit d0beb81

Browse files
willdavsmithAlec13355
authored andcommitted
Fix DE functional test workflow to be consistent with publish workflow (#10963)
# Description * Update Radius DE sync: radius side (https://github.com/azure-octo/deployment-engine/pull/514) ## Type of change <!-- Please select **one** of the following options that describes your change and delete the others. Clearly identifying the type of change you are making will help us review your PR faster, and is used in authoring release notes. If you are making a bug fix or functionality change to Radius and do not have an associated issue link please create one now. --> - This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional). ## Contributor checklist Please verify that the PR meets the following requirements, where applicable: <!-- This checklist uses "TaskRadio" comments to make certain options mutually exclusive. See: https://github.com/mheap/require-checklist-action?tab=readme-ov-file#radio-groups For details on how this works and why it's required. --> - An overview of proposed schema changes is included in a linked GitHub issue. - [ ] Yes <!-- TaskRadio schema --> - [x] Not applicable <!-- TaskRadio schema --> - A design document PR is created in the [design-notes repository](https://github.com/radius-project/design-notes/), if new APIs are being introduced. - [ ] Yes <!-- TaskRadio design-pr --> - [x] Not applicable <!-- TaskRadio design-pr --> - The design document has been reviewed and approved by Radius maintainers/approvers. - [ ] Yes <!-- TaskRadio design-review --> - [x] Not applicable <!-- TaskRadio design-review --> - A PR for the [samples repository](https://github.com/radius-project/samples) is created, if existing samples are affected by the changes in this PR. - [ ] Yes <!-- TaskRadio samples-pr --> - [x] Not applicable <!-- TaskRadio samples-pr --> - A PR for the [documentation repository](https://github.com/radius-project/docs) is created, if the changes in this PR affect the documentation or any user facing updates are made. - [ ] Yes <!-- TaskRadio docs-pr --> - [x] Not applicable <!-- TaskRadio docs-pr --> - A PR for the [recipes repository](https://github.com/radius-project/recipes) is created, if existing recipes are affected by the changes in this PR. - [ ] Yes <!-- TaskRadio recipes-pr --> - [x] Not applicable <!-- TaskRadio recipes-pr --> --------- Signed-off-by: willdavsmith <willdavsmith@gmail.com> Signed-off-by: Alec13355 <aah1@mac.com>
1 parent fd12a37 commit d0beb81

File tree

3 files changed

+15
-38
lines changed

3 files changed

+15
-38
lines changed

.github/actions/copy-deployment-engine-image/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ runs:
3737
env:
3838
SRC_IMAGE: ${{ inputs.src_image }}
3939
run: |
40-
# Example: SRC_REGISTRY_NAME=myregistry
40+
# Example:
41+
# SRC_IMAGE=radiusdeploymentengine.azurecr.io/deployment-engine
42+
# SRC_REGISTRY_NAME=radiusdeploymentengine
4143
SRC_REGISTRY_NAME=$(echo "${SRC_IMAGE}" | cut -d'.' -f1)
4244
az acr login --name "${SRC_REGISTRY_NAME}"
4345

.github/workflows/functional-test-cloud.yaml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ on:
3232
# Dispatch on external events
3333
repository_dispatch:
3434
types: [deployment-engine.run-functional-tests]
35+
# Expected client_payload:
36+
# src_image: Source image in ACR (e.g. radiusdeploymentengine.azurecr.io/deployment-engine)
37+
# dest_image: Destination image in GHCR (e.g. ghcr.io/radius-project/deployment-engine)
38+
# tag: Tag for the image (e.g. latest, 0.1, 0.1.0-rc1, pr-123)
3539
workflow_run:
3640
workflows: [Approve Functional Tests]
3741
types:
@@ -241,11 +245,11 @@ jobs:
241245
if: github.event_name == 'repository_dispatch'
242246
shell: bash
243247
env:
244-
IMAGE_NAME: ${{ github.event.client_payload.image_name }}
248+
DEST_IMAGE: ${{ github.event.client_payload.dest_image }}
245249
TAG: ${{ github.event.client_payload.tag }}
246250
run: |
247251
{
248-
echo "DE_IMAGE=${IMAGE_NAME}"
252+
echo "DE_IMAGE=${DEST_IMAGE}"
249253
echo "DE_TAG=${TAG}"
250254
} >> "$GITHUB_ENV"
251255
@@ -324,19 +328,6 @@ jobs:
324328
submodules: recursive
325329
persist-credentials: false
326330

327-
- name: Copy Deployment Engine image to GHCR
328-
if: github.event_name == 'repository_dispatch'
329-
uses: ./.github/actions/copy-deployment-engine-image
330-
env:
331-
GHCR_PASSWORD: ${{ secrets.GH_RAD_CI_BOT_PAT }}
332-
DE_CONTAINER_AZURE_CLIENT_ID: ${{ secrets.DE_CONTAINER_AZURE_CLIENT_ID }}
333-
DE_CONTAINER_AZURE_TENANT_ID: ${{ secrets.DE_CONTAINER_AZURE_TENANT_ID }}
334-
DE_CONTAINER_AZURE_SUBSCRIPTION_ID: ${{ secrets.DE_CONTAINER_AZURE_SUBSCRIPTION_ID }}
335-
with:
336-
tag: ${{ env.DE_TAG }}
337-
src_image: ${{ env.DE_IMAGE }}
338-
dest_image: ghcr.io/radius-project/deployment-engine
339-
340331
- name: Checkout
341332
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
342333
with:

.github/workflows/functional-test-noncloud.yaml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ on:
3232
# Dispatch on external events
3333
repository_dispatch:
3434
types: [deployment-engine.run-functional-tests]
35+
# Expected client_payload:
36+
# src_image: Source image in ACR (e.g. radiusdeploymentengine.azurecr.io/deployment-engine)
37+
# dest_image: Destination image in GHCR (e.g. ghcr.io/radius-project/deployment-engine)
38+
# tag: Tag for the image (e.g. latest, 0.1, 0.1.0-rc1, pr-123)
3539
pull_request:
3640
branches:
3741
- main
@@ -115,34 +119,14 @@ jobs:
115119
if: github.event_name == 'repository_dispatch'
116120
shell: bash
117121
env:
118-
IMAGE_NAME: ${{ github.event.client_payload.image_name }}
122+
DEST_IMAGE: ${{ github.event.client_payload.dest_image }}
119123
TAG: ${{ github.event.client_payload.tag }}
120124
run: |
121125
{
122-
echo "DE_IMAGE=${IMAGE_NAME}"
126+
echo "DE_IMAGE=${DEST_IMAGE}"
123127
echo "DE_TAG=${TAG}"
124128
} >> "$GITHUB_ENV"
125129
126-
- name: Checkout
127-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
128-
with:
129-
repository: ${{ env.CHECKOUT_REPO }}
130-
ref: ${{ env.CHECKOUT_REF }}
131-
persist-credentials: false
132-
133-
- name: Copy Deployment Engine image to GHCR
134-
if: github.event_name == 'repository_dispatch'
135-
uses: ./.github/actions/copy-deployment-engine-image
136-
env:
137-
GHCR_PASSWORD: ${{ secrets.GH_RAD_CI_BOT_PAT }}
138-
DE_CONTAINER_AZURE_CLIENT_ID: ${{ secrets.DE_CONTAINER_AZURE_CLIENT_ID }}
139-
DE_CONTAINER_AZURE_TENANT_ID: ${{ secrets.DE_CONTAINER_AZURE_TENANT_ID }}
140-
DE_CONTAINER_AZURE_SUBSCRIPTION_ID: ${{ secrets.DE_CONTAINER_AZURE_SUBSCRIPTION_ID }}
141-
with:
142-
tag: ${{ env.DE_TAG }}
143-
src_image: ${{ env.DE_IMAGE }}
144-
dest_image: ghcr.io/radius-project/deployment-engine
145-
146130
- name: Generate ID for release
147131
id: gen-id
148132
run: |

0 commit comments

Comments
 (0)