From ee969082fe7d8f31810b34698fd640b8e5488d82 Mon Sep 17 00:00:00 2001 From: Will Smith Date: Tue, 17 Oct 2023 22:56:24 +0100 Subject: [PATCH] Migrate to GHCR (#6478) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Replace `radius.azurecr.io` with `ghcr.io/radius-project` * Replace `radiusdev.azurecr.io` with `ghcr.io/radius-project/dev` * Add step to publish latest rad CLI to `ghcr.io` * Refactoring `Build and Test` GH workflow to improve clarity * Removing ACR publishes and pulls from GH workflows * Removing instances of azurecr.io and ACR from our docs - This pull request adds or changes features of Radius and has an approved issue (issue link required). Fixes: https://github.com/radius-project/radius/issues/6362 Fixes: https://github.com/radius-project/radius/issues/6295 ๐Ÿ”„๐Ÿ› ๏ธ๐Ÿงช This pull request updates the GitHub workflows to use GHCR as the new registry for radius artifacts. It changes the build.yaml workflow to use new tools and commands for building and pushing the rad CLI, the radius images, and the radius helm chart to GHCR. It also changes the functional-test.yaml workflow to use GHCR for bicep recipes instead of ACR. > _We're sailing on the GitHub seas, with rad and radius tools_ > _We've changed our registry, to GHCR from ACR_ > _So heave away, me hearties, heave away with `oras` and `buildx`_ > _And don't forget to push the helm chart, with the registry plugin_ * Remove `GOPROXY` and `DOCKER_REGISTRY` environment variables and add `ORAS_VERSION` and `IMAGE_SRC` environment variables to support ORAS CLI for pushing rad CLI binaries to GHCR ([link](https://github.com/radius-project/radius/pull/6478/files?diff=unified&w=0#diff-d0777657fa3fd81d23aaf7273e58aee453b04e67882517900c56daeef9b3e4c1L39-R42)) * Rename `build` job to `build-and-push-cli` and add `build-and-push-images` job to build and push radius container images to GHCR using Docker Buildx ([link](https://github.com/radius-project/radius/pull/6478/files?diff=unified&w=0#diff-d0777657fa3fd81d23aaf7273e58aee453b04e67882517900c56daeef9b3e4c1L57-R59)) * Remove `images` job and add `publish_images` job to build and push rad CLI binaries to GHCR using ORAS CLI for different platforms and architectures ([link](https://github.com/radius-project/radius/pull/6478/files?diff=unified&w=0#diff-d0777657fa3fd81d23aaf7273e58aee453b04e67882517900c56daeef9b3e4c1L207-R226)) * Rename `helm` job to `build-and-push-helm-chart` and use Helm Registry plugin to push radius helm chart to GHCR ([link](https://github.com/radius-project/radius/pull/6478/files?diff=unified&w=0#diff-d0777657fa3fd81d23aaf7273e58aee453b04e67882517900c56daeef9b3e4c1L312-R277)) * Rename `publish_release` job to `publish-release` and change `needs` condition to depend on `build-and-push-cli` job ([link](https://github.com/radius-project/radius/pull/6478/files?diff=unified&w=0#diff-d0777657fa3fd81d23aaf7273e58aee453b04e67882517900c56daeef9b3e4c1L353-R319)) * Remove `publish` job and update `delete_artifacts` job to depend on `build-and-push-cli` job ([link](https://github.com/radius-project/radius/pull/6478/files?diff=unified&w=0#diff-d0777657fa3fd81d23aaf7273e58aee453b04e67882517900c56daeef9b3e4c1L391-R359)) * Change `BICEP_RECIPE_REGISTRY` environment variable to use GHCR instead of ACR for bicep recipes in `.github/workflows/functional-test.yaml` ([link](https://github.com/radius-project/radius/pull/6478/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL56-R56)) * Add comment to indicate that `az acr login` command needs to be changed to use GHCR in `.github/workflows/functional-test.yaml` ([link](https://github.com/radius-project/radius/pull/6478/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcR81)) * Remove `az acr login` command from `.github/workflows/functional-test.yaml` as it is no longer needed ([link](https://github.com/radius-project/radius/pull/6478/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL486-L488)) --------- Co-authored-by: ytimocin (cherry picked from commit a1971314d5098290e1c9b271bf5b388384ab8bfc) --- .github/scripts/publish-recipes.sh | 22 +- .github/scripts/release-verification.sh | 6 +- .github/workflows/build.yaml | 191 +++--------------- .github/workflows/functional-test.yaml | 59 +++--- .github/workflows/long-running-azure.yaml | 55 +++-- build/recipes.mk | 1 - build/test.mk | 2 +- deploy/Chart/values.yaml | 8 +- .../contributing-code-building/README.md | 2 +- .../generating-and-installing-custom-build.md | 4 +- .../running-functional-tests.md | 6 +- .../contributing-code-tests/testing-local.md | 6 +- pkg/cli/cmd/bicep/publish/publish.go | 4 +- pkg/cli/cmd/bicep/publish/publish_test.go | 8 +- pkg/cli/cmd/radinit/init_test.go | 2 +- pkg/cli/cmd/radinit/recipe.go | 18 +- pkg/cli/cmd/radinit/recipe_test.go | 50 +++++ pkg/cli/cmd/recipe/list/list_test.go | 4 +- pkg/cli/cmd/recipe/register/register_test.go | 18 +- pkg/cli/cmd/recipe/show/show_test.go | 4 +- .../cmd/recipe/unregister/unregister_test.go | 14 +- pkg/cli/helm/radiusclient.go | 2 +- pkg/cli/helm/radiusclient_test.go | 4 +- pkg/cli/setup/application.go | 2 +- .../container_conversion_test.go | 6 +- .../environment_conversion_test.go | 14 +- .../testdata/containerresource-runtimes.json | 2 +- .../testdata/containerresource.json | 2 +- .../containerresourcedatamodel-runtime.json | 2 +- .../testdata/containerresourcedatamodel.json | 2 +- .../containerresourcedatamodelemptyext.json | 2 +- .../testdata/containerresourceemptyext.json | 2 +- .../testdata/containerresourceemptyext2.json | 2 +- .../containerresourcenegativetest.json | 2 +- ...opertiesdatamodel-missingtemplatekind.json | 2 +- .../environmentrecipepropertiesdatamodel.json | 2 +- ...ironmentresource-invalid-resourcetype.json | 2 +- ...ironmentresource-invalid-templatekind.json | 2 +- ...ironmentresource-missing-templatekind.json | 2 +- ...onmentresource-with-workload-identity.json | 2 +- .../testdata/environmentresource.json | 4 +- ...ourcedatamodel-with-workload-identity.json | 2 +- .../environmentresourcedatamodel.json | 2 +- .../environmentresourcedatamodelemptyext.json | 2 +- ...entresourcedatamodelemptytemplatekind.json | 2 +- .../testdata/environmentresourceemptyext.json | 2 +- .../environmentresourceemptyext2.json | 2 +- .../deployment/deploymentprocessor_test.go | 2 +- .../testdata/containerresourcedatamodel.json | 2 +- .../containerresourcedatamodellowercase.json | 2 +- .../containerresourcedatamodeluppercase.json | 2 +- .../environments/getrecipemetadata_test.go | 4 +- .../environment20231001preview_datamodel.json | 2 +- .../environment20231001preview_input.json | 2 +- .../environment20231001preview_output.json | 2 +- ...cipemetadata20231001preview_datamodel.json | 4 +- ...trecipemetadata20231001preview_output.json | 2 +- pkg/recipes/configloader/environment_test.go | 4 +- pkg/recipes/driver/bicep_test.go | 8 +- pkg/recipes/engine/engine_test.go | 10 +- pkg/rp/util/registry.go | 2 - pkg/rp/util/registry_test.go | 4 +- .../examples/Containers_CreateOrUpdate.json | 4 +- ...ontainers_CreateOrUpdate_BaseManifest.json | 4 +- .../examples/Containers_Get.json | 2 +- .../examples/Containers_List.json | 4 +- .../examples/Containers_ListByScope.json | 4 +- .../examples/Environments_CreateOrUpdate.json | 4 +- .../examples/Environments_GetEnv0.json | 2 +- .../Environments_GetRecipeMetadata.json | 2 +- .../examples/Environments_List.json | 10 +- .../examples/Environments_PatchEnv0.json | 4 +- test/functional/shared/cli/cli_test.go | 11 +- .../corerp-resources-recipe-env.bicep | 2 +- ...erp-resources-container-pod-patching.bicep | 3 +- .../resources/testdata/manifest/sidecar.yaml | 3 +- .../recipes/test-bicep-recipes/README.md | 2 +- test/functional/testUtil.go | 4 +- test/functional/ucp/proxy_test.go | 2 +- .../Containers_CreateOrUpdate.json | 4 +- ...ontainers_CreateOrUpdate_BaseManifest.json | 4 +- .../2023-10-01-preview/Containers_Get.json | 2 +- .../2023-10-01-preview/Containers_List.json | 4 +- .../Containers_ListByScope.json | 4 +- .../2023-10-01-preview/Containers_Update.json | 4 +- .../Environments_CreateOrUpdate.json | 4 +- .../Environments_GetEnv0.json | 2 +- .../Environments_GetRecipeMetadata.json | 2 +- .../2023-10-01-preview/Environments_List.json | 10 +- .../Environments_PatchEnv0.json | 4 +- 90 files changed, 318 insertions(+), 401 deletions(-) diff --git a/.github/scripts/publish-recipes.sh b/.github/scripts/publish-recipes.sh index 1b1fffb7ae..74e6b72345 100755 --- a/.github/scripts/publish-recipes.sh +++ b/.github/scripts/publish-recipes.sh @@ -16,32 +16,28 @@ # limitations under the License. # ------------------------------------------------------------ -# Fail immedietly if any command fails +# Fail immediately if any command fails set -e # Get command line arguments -BICEP_PATH=$1 -DIRECTORY=$2 -REGISTRY_PATH=$3 -RECIPE_VERSION=$4 - -BICEP_EXECUTABLE="$BICEP_PATH/rad-bicep" +DIRECTORY=$1 +REGISTRY_PATH=$2 +RECIPE_VERSION=$3 # Print usage information function print_usage() { - echo "Usage: $0 " + echo "Usage: $0 " echo "" - echo " Publishes all recipes in the repository to the Azure Container Registry. Requires you to be logged into Azure via az login." + echo " Publishes all recipes in the repository to a container registry." echo "" - echo " BICEP_PATH: Path to directory containing the bicep executable. For example, ~/.rad/bin" echo " DIRECTORY: Directory containing the recipes to publish. For example, ./test/functional/testdata/recipes" - echo " REGISTRY_PATH: Registry hostname and path prefix. For example, myregistry.azurecr.io/tests/recipes." + echo " REGISTRY_PATH: Registry hostname and path prefix. For example, ghcr.io/radius-project/dev/test/recipes" echo " RECIPE_VERSION: Version of the recipe to publish. For example, pr-19293" echo "" } # Verify that the required arguments are present -if [[ $# -ne 4 ]]; then +if [[ $# -ne 3 ]]; then echo "Error: Missing required arguments" echo "" print_usage @@ -69,5 +65,5 @@ do echo "Publishing $RECIPE to $PUBLISH_REF" echo "- $PUBLISH_REF" >> $GITHUB_STEP_SUMMARY - $BICEP_EXECUTABLE publish $RECIPE --target "br:$PUBLISH_REF" + rad bicep publish --file $RECIPE --target "br:$PUBLISH_REF" done diff --git a/.github/scripts/release-verification.sh b/.github/scripts/release-verification.sh index 365d33b287..28e921b019 100755 --- a/.github/scripts/release-verification.sh +++ b/.github/scripts/release-verification.sh @@ -59,9 +59,9 @@ fi kind create cluster ./rad install kubernetes -EXPECTED_APPCORE_RP_IMAGE="radius.azurecr.io/applications-rp:${EXPECTED_TAG_VERSION}" -EXPECTED_UCP_IMAGE="radius.azurecr.io/ucpd:${EXPECTED_TAG_VERSION}" -EXPECTED_DE_IMAGE="radius.azurecr.io/deployment-engine:${EXPECTED_TAG_VERSION}" +EXPECTED_APPCORE_RP_IMAGE="ghcr.io/radius-project/applications-rp:${EXPECTED_TAG_VERSION}" +EXPECTED_UCP_IMAGE="ghcr.io/radius-project/ucpd:${EXPECTED_TAG_VERSION}" +EXPECTED_DE_IMAGE="ghcr.io/radius-project/deployment-engine:${EXPECTED_TAG_VERSION}" APPCORE_RP_IMAGE=$(kubectl describe pods -n radius-system -l control-plane=applications-rp | awk '/^.*Image:/ {print $2}') UCP_IMAGE=$(kubectl describe pods -n radius-system -l control-plane=ucp | awk '/^.*Image:/ {print $2}') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 90f7816ed0..45997861e4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,26 +36,27 @@ concurrency: env: # Go version to install GOVER: '^1.21' - GOPROXY: https://proxy.golang.org # gotestsum version - see: https://github.com/gotestyourself/gotestsum GOTESTSUMVERSION: 1.10.0 - # Use radiusdev.azurecr.io for PR build. Otherwise, use radius.azurecr.io. - # TODO_LAUNCH: Remove this variable when we opensource the repo - https://github.com/radius-project/radius/issues/5892 - DOCKER_REGISTRY: ${{ github.event_name == 'pull_request' && 'radiusdev.azurecr.io' || 'radius.azurecr.io' }} - # GitHub Actor for pushing images to GHCR GHCR_ACTOR: rad-ci-bot # Container registry url for GitHub container registry. - CONTAINER_REGISTRY: ${{ github.event_name == 'pull_request' && 'ghcr.io/radius-project/dev' || 'ghcr.io/radius-project/radius' }} + CONTAINER_REGISTRY: ${{ github.event_name == 'pull_request' && 'ghcr.io/radius-project/dev' || 'ghcr.io/radius-project' }} # Local file path to the release binaries. RELEASE_PATH: ./release + # ORAS (OCI Registry As Storage) CLI version + ORAS_VERSION: 1.1.0 + + # URL to get source code for building the image + IMAGE_SRC: https://github.com/radius-project/radius + jobs: - build: + build-and-push-cli: name: Build ${{ matrix.target_os }}_${{ matrix.target_arch }} binaries runs-on: ubuntu-latest env: @@ -126,7 +127,6 @@ jobs: with: name: rad_cli_release path: ${{ env.RELEASE_PATH }} - # TOOD_LAUNCH: Remove this step when we opensource the repo - https://github.com/radius-project/radius/issues/5892 - name: Upload CLI binary uses: actions/upload-artifact@v3 with: @@ -204,64 +204,25 @@ jobs: with: path: ./dist/cache key: radius-coverage-${{ github.sha }}-${{ github.run_number }} - - # Logic here: - # - always do a docker build for validation - # - tag the image as latest and with a version if the trigger was a tag - # - tag the image with the PR version if the trigger was a PR - # - push the image for pushes to master, or to a tag - - # TODO_LAUNCH: Remove 'image' job when we opensource the repo - https://github.com/radius-project/radius/issues/5892 - images: - name: Container image build - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v3 - - name: Parse release version and set environment variables - run: python ./.github/scripts/get_release_version.py - - name: Set up Go ${{ env.GOVER }} - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GOVER }} - - uses: azure/docker-login@v1 + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 with: - login-server: ${{ env.DOCKER_REGISTRY }} - username: '${{ secrets.DOCKER_USERNAME }}' - password: '${{ secrets.DOCKER_PASSWORD }}' - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: oras-project/setup-oras@v1 with: - platforms: linux/amd64,linux/arm64,linux/arm/v7 - - name: Push container images (latest) + version: ${{ env.ORAS_VERSION }} + - name: Push latest rad cli binary to GHCR (unix-like) + if: github.ref == 'refs/heads/main' && matrix.target_os != 'windows' run: | - make docker-test-image-build && make docker-test-image-push - make docker-multi-arch-push - if: (github.ref == 'refs/heads/main') # push image to latest on merge to main - env: - DOCKER_REGISTRY: ${{ env.DOCKER_REGISTRY }} - DOCKER_TAG_VERSION: latest - - name: Push container images (PR) - run: | - make docker-test-image-build && make docker-test-image-push - make docker-multi-arch-push - if: github.event_name == 'pull_request' - env: - DOCKER_REGISTRY: ${{ env.DOCKER_REGISTRY }} - DOCKER_TAG_VERSION: ${{ env.REL_VERSION }} # includes PR number - - name: Push container images (release) + oras push ${{ env.CONTAINER_REGISTRY }}/rad/${{ matrix.target_os }}-${{ matrix.target_arch }}:latest ./dist/${{ matrix.target_os}}_${{ matrix.target_arch}}/release/rad --annotation "org.opencontainers.image.source=${{ env.IMAGE_SRC }}" + - name: Copy cli binaries to release (windows) + if: github.ref == 'refs/heads/main' && matrix.target_os == 'windows' run: | - make docker-test-image-build && make docker-test-image-push - make docker-multi-arch-push - if: startsWith(github.ref, 'refs/tags/v') # push image on tag - env: - DOCKER_REGISTRY: ${{ env.DOCKER_REGISTRY }} - DOCKER_TAG_VERSION: ${{ env.REL_CHANNEL }} + oras push ${{ env.CONTAINER_REGISTRY }}/rad/${{ matrix.target_os }}-${{ matrix.target_arch }}:latest ./dist/${{ matrix.target_os}}_${{ matrix.target_arch}}/release/rad.exe --annotation "org.opencontainers.image.source=${{ env.IMAGE_SRC }}" - # publish_image is building and publishing images to GHCR. - publish_images: + build-and-push-images: name: Build and publish container images runs-on: ubuntu-latest steps: @@ -277,8 +238,8 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ env.GHCR_ACTOR }} - password: ${{ secrets.GH_RAD_CI_BOT_PAT }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx @@ -309,9 +270,10 @@ jobs: env: DOCKER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} DOCKER_TAG_VERSION: ${{ env.REL_CHANNEL }} - helm: + + build-and-push-helm-chart: name: Helm chart build - needs: ['images', 'publish_images'] + needs: ['build-and-push-images'] runs-on: ubuntu-latest env: ARTIFACT_DIR: ./dist/Charts @@ -343,16 +305,14 @@ jobs: --username ${{ secrets.AZURE_SP_TESTS_APPID }} \ --password ${{ secrets.AZURE_SP_TESTS_PASSWORD }} \ --tenant ${{ secrets.AZURE_SP_TESTS_TENANTID }} - - name: Push helm chart to ACR - run: | - az acr helm push --name radius ${{ env.ARTIFACT_DIR }}/${{ env.HELM_PACKAGE_DIR }}/radius-${{ env.CHART_VERSION }}.tgz --force - name: Push helm chart to GHCR run: | echo ${{ secrets.GITHUB_TOKEN }} | helm registry login -u ${{ github.actor }} --password-stdin ${{ env.OCI_REGISTRY }} helm push ${{ env.ARTIFACT_DIR }}/${{ env.HELM_PACKAGE_DIR }}/radius-${{ env.CHART_VERSION }}.tgz oci://${{ env.OCI_REGISTRY }}/${{ env.OCI_REPOSITORY }} - publish_release: + + publish-release: name: Publish GitHub Release - needs: [ 'build' ] + needs: ['build-and-push-cli'] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') steps: @@ -376,8 +336,6 @@ jobs: --generate-notes \ --verify-tag \ --prerelease - env: - GITHUB_TOKEN: ${{ secrets.GH_RAD_CI_BOT_PAT }} - name: Create GitHub Official Release if: ${{ !contains(env.REL_VERSION, 'rc') }} run: | @@ -386,96 +344,11 @@ jobs: --title "Project Radius v${{ env.REL_VERSION }}" \ --notes-file docs/release-notes/v${{ env.REL_VERSION }}.md \ --verify-tag - env: - GITHUB_TOKEN: ${{ secrets.GH_RAD_CI_BOT_PAT }} - # TODO_LAUNCH: Remove this job once we opensource - https://github.com/radius-project/radius/issues/5892 - publish: - name: Publish rad CLI binaries - needs: [ 'build' ] - runs-on: ubuntu-latest - if: (github.ref == 'refs/heads/main') || startsWith(github.ref, 'refs/tags/v') # upload on push to main or tag - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Parse release version and set environment variables - run: python ./.github/scripts/get_release_version.py - - name: Download release artifacts - uses: actions/download-artifact@v3 - with: - name: rad_cli_darwin_arm64 - path: rad_cli_darwin_arm64 - - name: Download release artifacts - uses: actions/download-artifact@v3 - with: - name: rad_cli_darwin_amd64 - path: rad_cli_darwin_amd64 - - name: Download release artifacts - uses: actions/download-artifact@v3 - with: - name: rad_cli_linux_arm - path: rad_cli_linux_arm - - name: Download release artifacts - uses: actions/download-artifact@v3 - with: - name: rad_cli_linux_arm64 - path: rad_cli_linux_arm64 - - name: Download release artifacts - uses: actions/download-artifact@v3 - with: - name: rad_cli_linux_amd64 - path: rad_cli_linux_amd64 - - name: Download release artifacts - uses: actions/download-artifact@v3 - with: - name: rad_cli_windows_amd64 - path: rad_cli_windows_amd64 - - uses: bacongobbler/azure-blob-storage-upload@v3.0.0 - with: - source_dir: rad_cli_darwin_amd64 - container_name: 'tools' - connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }} - overwrite: 'true' - extra_args: '--destination-path rad/${{ env.REL_CHANNEL }}/macos-x64/ --pattern rad --timeout 300' - - uses: bacongobbler/azure-blob-storage-upload@v3.0.0 - with: - source_dir: rad_cli_darwin_arm64 - container_name: 'tools' - connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }} - overwrite: 'true' - extra_args: '--destination-path rad/${{ env.REL_CHANNEL }}/macos-arm64/ --pattern rad --timeout 300' - - uses: bacongobbler/azure-blob-storage-upload@v3.0.0 - with: - source_dir: rad_cli_linux_amd64 - container_name: 'tools' - connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }} - overwrite: 'true' - extra_args: '--destination-path rad/${{ env.REL_CHANNEL }}/linux-x64/ --pattern rad --timeout 300' - - uses: bacongobbler/azure-blob-storage-upload@v3.0.0 - with: - source_dir: rad_cli_linux_arm - container_name: 'tools' - connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }} - overwrite: 'true' - extra_args: '--destination-path rad/${{ env.REL_CHANNEL }}/linux-arm/ --pattern rad --timeout 300' - - uses: bacongobbler/azure-blob-storage-upload@v3.0.0 - with: - source_dir: rad_cli_linux_arm64 - container_name: 'tools' - connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }} - overwrite: 'true' - extra_args: '--destination-path rad/${{ env.REL_CHANNEL }}/linux-arm64/ --pattern rad --timeout 300' - - uses: bacongobbler/azure-blob-storage-upload@v3.0.0 - with: - source_dir: rad_cli_windows_amd64 - container_name: 'tools' - connection_string: ${{ secrets.ASSETS_STORAGE_CONNECTION_STRING }} - overwrite: 'true' - extra_args: '--destination-path rad/${{ env.REL_CHANNEL }}/windows-x64/ --pattern rad.exe --timeout 300' delete_artifacts: name: Delete artifacts - needs: [ 'build', 'publish' ] - if: ${{ always() && !contains(needs.build.result, 'failure') }} + needs: ['build-and-push-cli'] + if: ${{ always() && !contains(needs.build-and-push-cli.result, 'failure') }} runs-on: ubuntu-latest steps: - name: Delete release artifacts diff --git a/.github/workflows/functional-test.yaml b/.github/workflows/functional-test.yaml index f460096c10..1aaabb2088 100644 --- a/.github/workflows/functional-test.yaml +++ b/.github/workflows/functional-test.yaml @@ -50,11 +50,10 @@ env: AZURE_KEYVAULT_CSI_DRIVER_VER: '1.4.2' # Azure workload identity webhook chart version AZURE_WORKLOAD_IDENTITY_WEBHOOK_VER: '1.1.0' - # Container registry for storing test images and recipes - CACHE_REGISTRY: ghcr.io/radius-project/dev - # Container registry for storing recipe artifacts - # TODO_LAUNCH: Change it to ghcr.io/radius-project/dev - https://github.com/radius-project/radius/issues/5892 - BICEP_RECIPE_REGISTRY: radiusdev.azurecr.io + # Container registry for storing container images + CONTAINER_REGISTRY: ghcr.io/radius-project/dev + # Container registry for storing Bicep recipe artifacts + BICEP_RECIPE_REGISTRY: ghcr.io/radius-project/dev # The radius functional test timeout FUNCTIONALTEST_TIMEOUT: 60m # The Azure Location to store test resources @@ -72,14 +71,12 @@ env: # Server where terraform test modules are deployed TF_RECIPE_MODULE_SERVER_URL: "http://tf-module-server.radius-test-tf-module-server.svc.cluster.local" - # GitHub Actor for pushing images to GHCR - GHCR_ACTOR: rad-ci-bot jobs: build: name: Build Radius for test runs-on: ubuntu-latest env: - DE_IMAGE: 'radius.azurecr.io/deployment-engine' + DE_IMAGE: 'ghcr.io/radius-project/deployment-engine' DE_TAG: 'latest' outputs: REL_VERSION: ${{ steps.gen-id.outputs.REL_VERSION }} @@ -189,28 +186,22 @@ jobs: * Dapr: ${{ env.DAPR_VER }} * Azure KeyVault CSI driver: ${{ env.AZURE_KEYVAULT_CSI_DRIVER_VER }} * Azure Workload identity webhook: ${{ env.AZURE_WORKLOAD_IDENTITY_WEBHOOK_VER }} - * Bicep recipe location `${{ env.BICEP_RECIPE_REGISTRY}}/test/functional/shared/recipes/:${{ env.REL_VERSION }}` + * Bicep recipe location `${{ env.BICEP_RECIPE_REGISTRY }}/test/functional/shared/recipes/:${{ env.REL_VERSION }}` * Terraform recipe location `${{ env.TF_RECIPE_MODULE_SERVER_URL }}/.zip` (in cluster) - * applications-rp test image location: `${{ env.CACHE_REGISTRY }}/applications-rp:${{ env.REL_VERSION }}` - * controller test image location: `${{ env.CACHE_REGISTRY }}/controller:${{ env.REL_VERSION }}` - * ucp test image location: `${{ env.CACHE_REGISTRY }}/ucpd:${{ env.REL_VERSION }}` + * applications-rp test image location: `${{ env.CONTAINER_REGISTRY }}/applications-rp:${{ env.REL_VERSION }}` + * controller test image location: `${{ env.CONTAINER_REGISTRY }}/controller:${{ env.REL_VERSION }}` + * ucp test image location: `${{ env.CONTAINER_REGISTRY }}/ucpd:${{ env.REL_VERSION }}` * deployment-engine test image location: `${{ env.DE_IMAGE }}:${{ env.DE_TAG }}` ## Test Status - - name: Setup Azure CLI - run: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash - - name: Login to Azure - uses: azure/login@v1 - with: - creds: '{"clientId":"${{ secrets.INTEGRATION_TEST_SP_APP_ID }}","clientSecret":"${{ secrets.INTEGRATION_TEST_SP_PASSWORD }}","subscriptionId":"${{ secrets.INTEGRATION_TEST_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.INTEGRATION_TEST_TENANT_ID }}"}' - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ env.GHCR_ACTOR }} - password: ${{ secrets.GH_RAD_CI_BOT_PAT }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - uses: marocchino/sticky-pull-request-comment@v2 if: env.PR_NUMBER != '' continue-on-error: true @@ -224,7 +215,7 @@ jobs: run: | make build && make docker-build && make docker-push env: - DOCKER_REGISTRY: ${{ env.CACHE_REGISTRY }} + DOCKER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} DOCKER_TAG_VERSION: ${{ env.REL_VERSION }} - name: Upload CLI binary uses: actions/upload-artifact@v3 @@ -259,18 +250,19 @@ jobs: append: true message: | :hourglass: Publishing Bicep Recipes for functional tests... - - name: Download rad-bicep - run: | - mkdir -p dist - ./.github/scripts/curl-with-retries.sh https://get.radapp.dev/tools/bicep-extensibility/edge/linux-x64/rad-bicep --output dist/rad-bicep - chmod +x dist/rad-bicep - name: Publish Bicep Test Recipes run: | + mkdir ./bin + cp ./dist/linux_amd64/release/rad ./bin/rad + chmod +x ./bin/rad + export PATH=$GITHUB_WORKSPACE/bin:$PATH + which rad || { echo "cannot find rad"; exit 1; } + rad bicep download + rad version make publish-test-bicep-recipes env: BICEP_RECIPE_REGISTRY: ${{ env.BICEP_RECIPE_REGISTRY }} BICEP_RECIPE_TAG_VERSION: ${{ env.REL_VERSION }} - RAD_BICEP_PATH: dist - uses: marocchino/sticky-pull-request-comment@v2 if: success() && env.PR_NUMBER != '' continue-on-error: true @@ -386,7 +378,7 @@ jobs: # AZURE_OIDC_ISSUER eval "export $(echo "${{ secrets.FUNCTEST_AZURE_OIDC_JSON }}" | jq -r 'to_entries | map("\(.key)=\(.value)") | @sh')" - AUTHKEY=$(echo -n "${{ env.GHCR_ACTOR }}:${{ secrets.GH_RAD_CI_BOT_PAT }}" | base64) + AUTHKEY=$(echo -n "${{ github.actor }}:${{ secrets.GH_RAD_CI_BOT_PAT }}" | base64) echo "{\"auths\":{\"ghcr.io\":{\"auth\":\"${AUTHKEY}\"}}}" > "./ghcr_secret.json" # Create KinD cluster with OIDC Issuer keys @@ -432,8 +424,8 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ env.GHCR_ACTOR }} - password: ${{ secrets.GH_RAD_CI_BOT_PAT }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Download Bicep run: | chmod +x ./bin/rad @@ -461,7 +453,7 @@ jobs: echo "*** Installing Radius to Kubernetes ***" rad install kubernetes \ --chart ${{ env.RADIUS_CHART_LOCATION }} \ - --set rp.image=${{ env.CACHE_REGISTRY }}/applications-rp,rp.tag=${{ env.REL_VERSION }},controller.image=${{ env.CACHE_REGISTRY }}/controller,controller.tag=${{ env.REL_VERSION }},ucp.image=${{ env.CACHE_REGISTRY }}/ucpd,ucp.tag=${{ env.REL_VERSION }},de.image=${{ env.DE_IMAGE }},de.tag=${{ env.DE_TAG }} + --set rp.image=${{ env.CONTAINER_REGISTRY }}/applications-rp,rp.tag=${{ env.REL_VERSION }},controller.image=${{ env.CONTAINER_REGISTRY }}/controller,controller.tag=${{ env.REL_VERSION }},ucp.image=${{ env.CONTAINER_REGISTRY }}/ucpd,ucp.tag=${{ env.REL_VERSION }},de.image=${{ env.DE_IMAGE }},de.tag=${{ env.DE_TAG }} echo "*** Create workspace, group and environment for test ***" rad workspace create kubernetes @@ -483,9 +475,6 @@ jobs: rad env update kind-radius --aws-region ${{ env.AWS_REGION }} --aws-account-id ${{ secrets.FUNCTEST_AWS_ACCOUNT_ID }} rad credential register aws \ --access-key-id ${{ secrets.FUNCTEST_AWS_ACCESS_KEY_ID }} --secret-access-key ${{ secrets.FUNCTEST_AWS_SECRET_ACCESS_KEY }} - - # TODO_LAUNCH: Remove this login once we move recipe to GHCR - https://github.com/radius-project/radius/issues/5892 - az acr login -n ${{ env.BICEP_RECIPE_REGISTRY }} - uses: marocchino/sticky-pull-request-comment@v2 if: failure() && env.PR_NUMBER != '' continue-on-error: true @@ -519,7 +508,7 @@ jobs: make test-functional-${{ matrix.name }} env: - DOCKER_REGISTRY: ${{ env.CACHE_REGISTRY }} + DOCKER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} TEST_TIMEOUT: ${{ env.FUNCTIONALTEST_TIMEOUT }} RADIUS_CONTAINER_LOG_PATH: ${{ github.workspace }}/${{ env.RADIUS_CONTAINER_LOG_BASE }} AWS_ACCESS_KEY_ID: ${{ secrets.FUNCTEST_AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/long-running-azure.yaml b/.github/workflows/long-running-azure.yaml index 411e38215e..44748d1401 100644 --- a/.github/workflows/long-running-azure.yaml +++ b/.github/workflows/long-running-azure.yaml @@ -41,9 +41,9 @@ on: schedule: # Run every 2 hours - cron: "0 */2 * * *" - pull_request: - branches: - - main + # pull_request: + # branches: + # - main paths: - '.github/workflows/long-running-azure.yaml' @@ -55,10 +55,10 @@ env: # gotestsum version - see: https://github.com/gotestyourself/gotestsum GOTESTSUM_VER: 1.10.0 - # ACR for storing test images and recipes - CACHE_REGISTRY: radiusdev.azurecr.io - # Container registry for storing recipe artifacts - BICEP_RECIPE_REGISTRY: radiusdev.azurecr.io + # Container registry for storing container images + CONTAINER_REGISTRY: ghcr.io/radius-project/dev + # Container registry for storing Bicep recipe artifacts + BICEP_RECIPE_REGISTRY: ghcr.io/radius-project/dev # The radius functional test timeout FUNCTIONALTEST_TIMEOUT: 60m # The Azure Location to store test resources @@ -178,11 +178,11 @@ jobs: Click here to see the list of tools in the current test run * gotestsum ${{ env.GOTESTSUM_VER }} - * Bicep recipe location `${{ env.BICEP_RECIPE_REGISTRY}}/test/functional/shared/recipes/:${{ steps.gen-id.outputs.REL_VERSION }}` + * Bicep recipe location `${{ env.BICEP_RECIPE_REGISTRY }}/test/functional/shared/recipes/:${{ steps.gen-id.outputs.REL_VERSION }}` * Terraform recipe location `${{ env.TF_RECIPE_MODULE_SERVER_URL }}/.zip` (in cluster) - * applications-rp test image location: `${{ env.CACHE_REGISTRY }}/applications-rp:${{ steps.gen-id.outputs.REL_VERSION }}` - * controller test image location: `${{ env.CACHE_REGISTRY }}/controller:${{ steps.gen-id.outputs.REL_VERSION }}` - * ucp test image location: `${{ env.CACHE_REGISTRY }}/ucpd:${{ steps.gen-id.outputs.REL_VERSION }}` + * applications-rp test image location: `${{ env.CONTAINER_REGISTRY }}/applications-rp:${{ steps.gen-id.outputs.REL_VERSION }}` + * controller test image location: `${{ env.CONTAINER_REGISTRY }}/controller:${{ steps.gen-id.outputs.REL_VERSION }}` + * ucp test image location: `${{ env.CONTAINER_REGISTRY }}/ucpd:${{ steps.gen-id.outputs.REL_VERSION }}` @@ -197,16 +197,18 @@ jobs: uses: azure/login@v1 with: creds: '{"clientId":"${{ secrets.INTEGRATION_TEST_SP_APP_ID }}","clientSecret":"${{ secrets.INTEGRATION_TEST_SP_PASSWORD }}","subscriptionId":"${{ secrets.INTEGRATION_TEST_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.INTEGRATION_TEST_TENANT_ID }}"}' - - name: Login ACR - ${{ env.CACHE_REGISTRY }} - if: steps.skip-build.outputs.SKIP_BUILD != 'true' - run: | - az acr login -n ${{ env.CACHE_REGISTRY }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and Push container images if: steps.skip-build.outputs.SKIP_BUILD != 'true' run: | make build && make docker-build && make docker-push env: - DOCKER_REGISTRY: ${{ env.CACHE_REGISTRY }} + DOCKER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} DOCKER_TAG_VERSION: ${{ env.REL_VERSION }} - name: Upload CLI binary if: steps.skip-build.outputs.SKIP_BUILD != 'true' @@ -230,17 +232,11 @@ jobs: continue-on-error: true run: | echo ":hourglass: Publishing Bicep Recipes for functional tests..." >> $GITHUB_STEP_SUMMARY - - name: Download rad-bicep - if: steps.skip-build.outputs.SKIP_BUILD != 'true' - run: | - mkdir -p dist - ./.github/scripts/curl-with-retries.sh https://get.radapp.dev/tools/bicep-extensibility/edge/linux-x64/rad-bicep --output dist/rad-bicep - chmod +x dist/rad-bicep - name: Move the latest binaries to cache if: steps.skip-build.outputs.SKIP_BUILD != 'true' run: | mkdir -p ./dist/cache - mv ./dist/linux_amd64/release/rad ./dist/cache + cp ./dist/linux_amd64/release/rad ./dist/cache echo $(date +%s) > ./dist/cache/.lastbuildtime echo "UNIQUE_ID=${{ steps.gen-id.outputs.UNIQUE_ID }}" >> ./dist/cache/.buildenv echo "REL_VERSION=${{ steps.gen-id.outputs.REL_VERSION }}" >> ./dist/cache/.buildenv @@ -257,11 +253,16 @@ jobs: - name: Publish Bicep Test Recipes if: steps.skip-build.outputs.SKIP_BUILD != 'true' run: | - make publish-test-bicep-recipes + mkdir ./bin + cp ./dist/linux_amd64/release/rad ./bin/rad + chmod +x ./bin/rad + export PATH=$GITHUB_WORKSPACE/bin:$PATH + which rad || { echo "cannot find rad"; exit 1; } + rad bicep download + rad version env: BICEP_RECIPE_REGISTRY: ${{ env.BICEP_RECIPE_REGISTRY }} BICEP_RECIPE_TAG_VERSION: ${{ env.REL_VERSION }} - RAD_BICEP_PATH: dist - name: Log Bicep recipe publish status (success) if: steps.skip-build.outputs.SKIP_BUILD != 'true' && success() run: | @@ -357,7 +358,7 @@ jobs: echo "*** Installing Radius to Kubernetes ***" rad install kubernetes --reinstall \ --chart ${{ env.RADIUS_CHART_LOCATION }} \ - --set rp.image=${{ env.CACHE_REGISTRY }}/applications-rp,rp.tag=${{ env.REL_VERSION }},controller.image=${{ env.CACHE_REGISTRY }}/controller,controller.tag=${{ env.REL_VERSION }},ucp.image=${{ env.CACHE_REGISTRY }}/ucpd,ucp.tag=${{ env.REL_VERSION }} + --set rp.image=${{ env.CONTAINER_REGISTRY }}/applications-rp,rp.tag=${{ env.REL_VERSION }},controller.image=${{ env.CONTAINER_REGISTRY }}/controller,controller.tag=${{ env.REL_VERSION }},ucp.image=${{ env.CONTAINER_REGISTRY }}/ucpd,ucp.tag=${{ env.REL_VERSION }} - name: Configure Radius test workspace run: | set -x @@ -387,8 +388,6 @@ jobs: rad env update radius-e2e --aws-region ${{ env.AWS_REGION }} --aws-account-id ${{ secrets.FUNCTEST_AWS_ACCOUNT_ID }} rad credential register aws \ --access-key-id ${{ secrets.FUNCTEST_AWS_ACCESS_KEY_ID }} --secret-access-key ${{ secrets.FUNCTEST_AWS_SECRET_ACCESS_KEY }} - - az acr login -n ${{ env.CACHE_REGISTRY }} - name: Log radius installation status (failure) if: failure() run: | diff --git a/build/recipes.mk b/build/recipes.mk index 7da5b6c108..a9dd34fc74 100644 --- a/build/recipes.mk +++ b/build/recipes.mk @@ -29,7 +29,6 @@ publish-test-bicep-recipes: ## Publishes test recipes to @echo "$(ARROW) Publishing Bicep test recipes from ./test/functional/shared/resources/testdata/recipes/test-bicep-recipes..." ./.github/scripts/publish-recipes.sh \ - ${RAD_BICEP_PATH} \ ./test/functional/shared/resources/testdata/recipes/test-bicep-recipes \ ${BICEP_RECIPE_REGISTRY}/test/functional/shared/recipes \ ${BICEP_RECIPE_TAG_VERSION} diff --git a/build/test.mk b/build/test.mk index 6cdc52fef1..53b23697e9 100644 --- a/build/test.mk +++ b/build/test.mk @@ -20,7 +20,7 @@ TEST_TIMEOUT ?=1h RADIUS_CONTAINER_LOG_PATH ?=./dist/container_logs REL_VERSION ?=latest -DOCKER_REGISTRY ?=radiusdev.azurecr.io +DOCKER_REGISTRY ?=ghcr.io/radius-project/dev ENVTEST_ASSETS_DIR=$(shell pwd)/bin K8S_VERSION=1.23.* ENV_SETUP=$(GOBIN)/setup-envtest$(BINARY_EXT) diff --git a/deploy/Chart/values.yaml b/deploy/Chart/values.yaml index e78909badc..df442ca324 100644 --- a/deploy/Chart/values.yaml +++ b/deploy/Chart/values.yaml @@ -10,7 +10,7 @@ global: # url: "http://jaeger-collector.radius-monitoring.svc.cluster.local:9411/api/v2/spans" # controller: - image: radius.azurecr.io/controller + image: ghcr.io/radius-project/controller # Default tag uses Chart AppVersion. # tag: latest resources: @@ -20,7 +20,7 @@ controller: memory: "300Mi" de: - image: radius.azurecr.io/deployment-engine + image: ghcr.io/radius-project/deployment-engine # Default tag uses Chart AppVersion. # tag: latest resources: @@ -31,7 +31,7 @@ de: memory: "300Mi" ucp: - image: radius.azurecr.io/ucpd + image: ghcr.io/radius-project/ucpd # Default tag uses Chart AppVersion. # tag: latest resources: @@ -42,7 +42,7 @@ ucp: memory: "300Mi" rp: - image: radius.azurecr.io/applications-rp + image: ghcr.io/radius-project/applications-rp # Default tag uses Chart AppVersion. # tag: latest publicEndpointOverride: "" diff --git a/docs/contributing/contributing-code/contributing-code-building/README.md b/docs/contributing/contributing-code/contributing-code-building/README.md index 9973867b23..06af524228 100644 --- a/docs/contributing/contributing-code/contributing-code-building/README.md +++ b/docs/contributing/contributing-code/contributing-code-building/README.md @@ -31,7 +31,7 @@ These commands assume you are already logged-in to the registry you are using. I Here's an example command that will push and push images to a specified registry: ```sh -DOCKER_REGISTRY=myregistry.ghcr.io make docker-push docker-build +DOCKER_REGISTRY=ghcr.io/my-registry make docker-push docker-build ``` If you work with Radius frequently, you may want to define a shell variable as part of your profile to set your registry. diff --git a/docs/contributing/contributing-code/contributing-code-control-plane/generating-and-installing-custom-build.md b/docs/contributing/contributing-code/contributing-code-control-plane/generating-and-installing-custom-build.md index d5c26f7303..a293dbb5e5 100644 --- a/docs/contributing/contributing-code/contributing-code-control-plane/generating-and-installing-custom-build.md +++ b/docs/contributing/contributing-code/contributing-code-control-plane/generating-and-installing-custom-build.md @@ -16,7 +16,7 @@ Note that installing a custom build could corrupt existing data or installation. 1. Set environment variables for your docker registry and docker tag version. ``` - export DOCKER_REGISTRY=your-registry.azurecr.io + export DOCKER_REGISTRY=ghcr.io/your-registry export DOCKER_IMAGE_TAG=latest ``` @@ -29,7 +29,7 @@ Note that installing a custom build could corrupt existing data or installation. 4. Use the image from your container registry to install the Radius control plane. ``` - rad install kubernetes --chart deploy/Chart/ --set rp.image=your-registry.azurecr.io/appcore-rp,rp.tag=latest,ucp.image=your-registry.azurecr.io/ucpd,ucp.tag=latest + rad install kubernetes --chart deploy/Chart/ --set rp.image=ghcr.io/your-registry/applications-rp,rp.tag=latest,ucp.image=ghcr.io/your-registry/ucpd,ucp.tag=latest ``` 5. Use `rad init` command to set up the Radius workspace, environment, credentials, and provider as needed. diff --git a/docs/contributing/contributing-code/contributing-code-tests/running-functional-tests.md b/docs/contributing/contributing-code/contributing-code-tests/running-functional-tests.md index 76b8d6f3dc..9e3fd87c8c 100644 --- a/docs/contributing/contributing-code/contributing-code-tests/running-functional-tests.md +++ b/docs/contributing/contributing-code/contributing-code-tests/running-functional-tests.md @@ -38,9 +38,9 @@ As much as possible, the tests use product functionality such as the Radius CLI 1. Place `rad` on your path 2. Make sure `rad-bicep` is downloaded (`rad bicep download`) -3. Create a container registry (must be Azure Container Registry for now) -4. Log-in to the container registry `az acr login -n ` -5. Publish Bicep test recipes by running `BICEP_RECIPE_REGISTRY=.azurecr.io make publish-test-bicep-recipes` +3. Create a container registry +4. Log-in to the container registry +5. Publish Bicep test recipes by running `BICEP_RECIPE_REGISTRY= make publish-test-bicep-recipes` 6. Publish Terraform test recipes by running `make publish-test-terraform-recipes` 7. Create a Radius Environment with `rad init` and specify the default namespace diff --git a/docs/contributing/contributing-code/contributing-code-tests/testing-local.md b/docs/contributing/contributing-code/contributing-code-tests/testing-local.md index 2a6ab3ce57..0980c3756a 100644 --- a/docs/contributing/contributing-code/contributing-code-tests/testing-local.md +++ b/docs/contributing/contributing-code/contributing-code-tests/testing-local.md @@ -8,7 +8,7 @@ Note, this only applies when we want to update the app core image, if we need to 1. Set the environment variable DOCKER_REGISTRY set to the container registry ``` - export DOCKER_REGISTRY=.azurecr.io + export DOCKER_REGISTRY=ghcr.io/your-registry ``` 1. Ensure you login to your container registry AND enable anonymous pull. The login command will need to be called every 3 hours as needed as it does log the user out frequently. ``` @@ -21,7 +21,7 @@ Note, this only applies when we want to update the app core image, if we need to ``` 1. Deploy an environment with command on kubernetes ``` - go run ./cmd/rad/main.go install kubernetes --chart deploy/Chart --set rp.image=.azurecr.io/applications-rp,rp.tag=latest,ucp.image=.azurecr.io/ucpd,ucp.tag=latest + go run ./cmd/rad/main.go install kubernetes --chart deploy/Chart --set rp.image=ghcr.io/your-registry/applications-rp,rp.tag=latest,ucp.image=ghcr.io/your-registry/ucpd,ucp.tag=latest go run ./cmd/rad/main.go workspace create kubernetes go run ./cmd/rad/main.go group create radius-rg go run ./cmd/rad/main.go switch radius-rg @@ -48,7 +48,7 @@ The above steps will not configure the ability for Radius to talk with azure res ``` 1. Use these values in the following command: ``` - go run ./cmd/rad/main.go install kubernetes --chart deploy/Chart --set rp.image=.azurecr.io/applications-rp,rp.tag=latest,ucp.image=.azurecr.io/ucpd,ucp.tag=latest + go run ./cmd/rad/main.go install kubernetes --chart deploy/Chart --set rp.image=ghcr.io/your-registry/applications-rp,rp.tag=latest,ucp.image=ghcr.io/your-registry/ucpd,ucp.tag=latest go run ./cmd/rad/main.go workspace create kubernetes go run ./cmd/rad/main.go group create radius-rg go run ./cmd/rad/main.go switch radius-rg diff --git a/pkg/cli/cmd/bicep/publish/publish.go b/pkg/cli/cmd/bicep/publish/publish.go index f868c54905..afad6f892a 100644 --- a/pkg/cli/cmd/bicep/publish/publish.go +++ b/pkg/cli/cmd/bicep/publish/publish.go @@ -70,8 +70,8 @@ Before publishing, it is expected the user runs docker login (or similar command For more information on Bicep modules visit https://learn.microsoft.com/azure/azure-resource-manager/bicep/modules `, Example: ` -# Publish a Bicep file to an Azure container registry -rad bicep publish --file ./redis-test.bicep --target br:myregistry.azurecr.io/redis-test:v1 +# Publish a Bicep file to a container registry +rad bicep publish --file ./redis-test.bicep --target br:ghcr.io/myregistry/redis-test:v1 `, Args: cobra.ExactArgs(0), RunE: framework.RunCommand(runner), diff --git a/pkg/cli/cmd/bicep/publish/publish_test.go b/pkg/cli/cmd/bicep/publish/publish_test.go index 3c4de88648..bbbf2b0d28 100644 --- a/pkg/cli/cmd/bicep/publish/publish_test.go +++ b/pkg/cli/cmd/bicep/publish/publish_test.go @@ -48,13 +48,13 @@ func TestRunner_extractDestination(t *testing.T) { }, { name: "no tag", - target: "test.azurecr.io/test/repo", + target: "ghcr.io/test-registry/test/repo", want: nil, wantErr: true, }, { name: "no repo", - target: "test.azurecr.io", + target: "ghcr.io/test-registry", want: nil, wantErr: true, }, @@ -268,7 +268,7 @@ func TestRunner_Validate(t *testing.T) { "--file", "redis.recipe.bicep", "--target", - "br:test.azurecr.io/test/repo:tag", + "br:ghcr.io/test-registry/test/repo:tag", }, ExpectedValid: true, ConfigHolder: framework.ConfigHolder{ @@ -281,7 +281,7 @@ func TestRunner_Validate(t *testing.T) { "--file", "redis.recipe.bicep", "--target", - "test.azurecr.io/test/repo:tag", + "ghcr.io/test-registry/test/repo:tag", }, ExpectedValid: false, ConfigHolder: framework.ConfigHolder{ diff --git a/pkg/cli/cmd/radinit/init_test.go b/pkg/cli/cmd/radinit/init_test.go index 42dd1e3a97..2e23d14b57 100644 --- a/pkg/cli/cmd/radinit/init_test.go +++ b/pkg/cli/cmd/radinit/init_test.go @@ -595,7 +595,7 @@ func Test_Run_InstallAndCreateEnvironment(t *testing.T) { "Applications.Datastores/redisCaches": { "default": &corerp.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("radiusdev.azurecr.io/redis:latest"), + TemplatePath: to.Ptr("ghcr.io/radius-project/dev/redis:latest"), }, }, }, diff --git a/pkg/cli/cmd/radinit/recipe.go b/pkg/cli/cmd/radinit/recipe.go index be5be896e6..3f32ccdd39 100644 --- a/pkg/cli/cmd/radinit/recipe.go +++ b/pkg/cli/cmd/radinit/recipe.go @@ -33,7 +33,7 @@ import ( ) const ( - DevRecipesRegistry = "radius.azurecr.io" + DevRecipesRegistry = "ghcr.io/radius-project" ) //go:generate mockgen -destination=./mock_devrecipeclient.go -package=radinit -self_package github.com/radius-project/radius/pkg/cli/cmd/radinit github.com/radius-project/radius/pkg/cli/cmd/radinit DevRecipeClient @@ -73,9 +73,9 @@ func (drc *devRecipeClient) GetDevRecipes(ctx context.Context) (map[string]map[s recipes := map[string]map[string]corerp.RecipePropertiesClassification{} // if repository has the correct path it should look like: /recipes//: - // Ex: radius.azurecr.io/recipes/local-dev/rediscaches:0.20 + // Ex: ghcr.io/radius-project/recipes/local-dev/rediscaches:0.20 // The start parameter is set to "radius-rp" because our recipes are after that repository. - err = reg.Repositories(ctx, "radius-rp", func(repos []string) error { + err = reg.Repositories(ctx, "", func(repos []string) error { // validRepos will contain the repositories that have the requested tag. validRepos := []string{} for _, repo := range repos { @@ -121,6 +121,13 @@ func processRepositories(repos []string, tag string) map[string]map[string]corer name := "default" for _, repo := range repos { + // Skip dev environment recipes. + // dev repositories is in the form of ghcr.io/radius-project/dev/recipes/local-dev/secretstores:latest + // We should skip the dev repositories. + if isDevRepository(repo) { + continue + } + resourceType := getResourceTypeFromPath(repo) // If the resource type is empty, it means we don't support the repository. if resourceType == "" { @@ -185,3 +192,8 @@ func getPortableResourceType(resourceType string) string { return "" } } + +func isDevRepository(repo string) bool { + _, found := strings.CutPrefix(repo, "dev/") + return found +} diff --git a/pkg/cli/cmd/radinit/recipe_test.go b/pkg/cli/cmd/radinit/recipe_test.go index 63a327f23c..56990af311 100644 --- a/pkg/cli/cmd/radinit/recipe_test.go +++ b/pkg/cli/cmd/radinit/recipe_test.go @@ -198,6 +198,30 @@ func Test_processRepositories(t *testing.T) { }, }, }, + { + "Valid Prod and Dev Repositories with Redis Cache, Mongo Database", + []string{ + "recipes/local-dev/rediscaches", + "recipes/local-dev/mongodatabases", + "dev/recipes/local-dev/rediscaches", + "dev/recipes/local-dev/mongodatabases", + }, + "latest", + map[string]map[string]corerp.RecipePropertiesClassification{ + "Applications.Datastores/redisCaches": { + "default": &corerp.BicepRecipeProperties{ + TemplateKind: to.Ptr(recipes.TemplateKindBicep), + TemplatePath: to.Ptr(fmt.Sprintf("%s/recipes/local-dev/rediscaches:latest", DevRecipesRegistry)), + }, + }, + "Applications.Datastores/mongoDatabases": { + "default": &corerp.BicepRecipeProperties{ + TemplateKind: to.Ptr(recipes.TemplateKindBicep), + TemplatePath: to.Ptr(fmt.Sprintf("%s/recipes/local-dev/mongodatabases:latest", DevRecipesRegistry)), + }, + }, + }, + }, } for _, tt := range tests { @@ -208,3 +232,29 @@ func Test_processRepositories(t *testing.T) { }) } } + +func Test_isDevRepository(t *testing.T) { + tests := []struct { + name string + repo string + want bool + }{ + { + "Dev Repository", + "dev/recipes/local-dev/rediscaches", + true, + }, + { + "Prod Repository", + "recipes/local-dev/rediscaches", + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := isDevRepository(tt.repo); got != tt.want { + t.Errorf("isDevRepository() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/pkg/cli/cmd/recipe/list/list_test.go b/pkg/cli/cmd/recipe/list/list_test.go index b42c9d8152..04aa692ef3 100644 --- a/pkg/cli/cmd/recipe/list/list_test.go +++ b/pkg/cli/cmd/recipe/list/list_test.go @@ -89,7 +89,7 @@ func Test_Run(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "cosmosDB": &v20231001preview.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), }, "cosmosDB-terraform": &v20231001preview.TerraformRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindTerraform), @@ -105,7 +105,7 @@ func Test_Run(t *testing.T) { Name: "cosmosDB", ResourceType: ds_ctrl.MongoDatabasesResourceType, TemplateKind: recipes.TemplateKindBicep, - TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", + TemplatePath: "ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1", }, { Name: "cosmosDB-terraform", diff --git a/pkg/cli/cmd/recipe/register/register_test.go b/pkg/cli/cmd/recipe/register/register_test.go index 5181d6fd78..212a116df9 100644 --- a/pkg/cli/cmd/recipe/register/register_test.go +++ b/pkg/cli/cmd/recipe/register/register_test.go @@ -138,7 +138,7 @@ func Test_Run(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "cosmosDB": &v20231001preview.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), }, }, } @@ -200,7 +200,7 @@ func Test_Run(t *testing.T) { testRecipes := map[string]map[string]v20231001preview.RecipePropertiesClassification{ ds_ctrl.MongoDatabasesResourceType: { "cosmosDB": &v20231001preview.BicepRecipeProperties{ - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), }, }, } @@ -243,7 +243,7 @@ func Test_Run(t *testing.T) { ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, Output: outputSink, Workspace: &workspaces.Workspace{Environment: "kind-kind"}, - TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", + TemplatePath: "ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1", ResourceType: ds_ctrl.MongoDatabasesResourceType, RecipeName: "cosmosDB_new", } @@ -270,7 +270,7 @@ func Test_Run(t *testing.T) { ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient}, Output: outputSink, Workspace: &workspaces.Workspace{Environment: "kind-kind"}, - TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", + TemplatePath: "ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1", ResourceType: ds_ctrl.MongoDatabasesResourceType, RecipeName: "cosmosDB_new", } @@ -288,7 +288,7 @@ func Test_Run(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "cosmosDB": &v20231001preview.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), Parameters: map[string]any{"throughput": 400}, }, }, @@ -323,7 +323,7 @@ func Test_Run(t *testing.T) { Output: outputSink, Workspace: &workspaces.Workspace{Environment: "kind-kind"}, TemplateKind: recipes.TemplateKindBicep, - TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/rediscaches:v1", + TemplatePath: "ghcr.io/testpublicrecipe/bicep/modules/rediscaches:v1", ResourceType: ds_ctrl.RedisCachesResourceType, RecipeName: "redis", Parameters: map[string]map[string]any{}, @@ -351,7 +351,7 @@ func Test_Run(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "cosmosDB": &v20231001preview.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), }, }, }, @@ -379,7 +379,7 @@ func Test_Run(t *testing.T) { Output: outputSink, Workspace: &workspaces.Workspace{Environment: "kind-kind"}, TemplateKind: recipes.TemplateKindBicep, - TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", + TemplatePath: "ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1", ResourceType: ds_ctrl.MongoDatabasesResourceType, RecipeName: "cosmosDB_no_namespace", } @@ -431,7 +431,7 @@ func Test_Run(t *testing.T) { Output: outputSink, Workspace: &workspaces.Workspace{Environment: "kind-kind"}, TemplateKind: recipes.TemplateKindBicep, - TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/rediscaches:v1", + TemplatePath: "ghcr.io/testpublicrecipe/bicep/modules/rediscaches:v1", ResourceType: ds_ctrl.RedisCachesResourceType, RecipeName: "redis", } diff --git a/pkg/cli/cmd/recipe/show/show_test.go b/pkg/cli/cmd/recipe/show/show_test.go index dc1106cf8b..0b8495dcd6 100644 --- a/pkg/cli/cmd/recipe/show/show_test.go +++ b/pkg/cli/cmd/recipe/show/show_test.go @@ -98,7 +98,7 @@ func Test_Run(t *testing.T) { ctrl := gomock.NewController(t) envRecipe := v20231001preview.RecipeGetMetadataResponse{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), Parameters: map[string]any{ "throughput": map[string]any{ "type": "float64", @@ -113,7 +113,7 @@ func Test_Run(t *testing.T) { Name: "cosmosDB", ResourceType: datastorerp.MongoDatabasesResourceType, TemplateKind: recipes.TemplateKindBicep, - TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", + TemplatePath: "ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1", } recipeParams := []RecipeParameter{ { diff --git a/pkg/cli/cmd/recipe/unregister/unregister_test.go b/pkg/cli/cmd/recipe/unregister/unregister_test.go index d700e7c1b8..a5a244d9c0 100644 --- a/pkg/cli/cmd/recipe/unregister/unregister_test.go +++ b/pkg/cli/cmd/recipe/unregister/unregister_test.go @@ -104,7 +104,7 @@ func Test_Run(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "cosmosDB": &v20231001preview.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), }, }, }, @@ -161,7 +161,7 @@ func Test_Run(t *testing.T) { Recipes: map[string]map[string]v20231001preview.RecipePropertiesClassification{ ds_ctrl.MongoDatabasesResourceType: { "cosmosDB": &v20231001preview.BicepRecipeProperties{ - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), }, }, }, @@ -218,7 +218,7 @@ func Test_Run(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "cosmosDB": &v20231001preview.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), }, }, }, @@ -278,7 +278,7 @@ func Test_Run(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "cosmosDB": &v20231001preview.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), }, }, }, @@ -316,7 +316,7 @@ func Test_Run(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "testResource": &v20231001preview.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), }, }, }, @@ -380,13 +380,13 @@ func Test_Run(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "testResource": &v20231001preview.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1"), }, }, ds_ctrl.RedisCachesResourceType: { "testResource": &v20231001preview.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("testpublicrecipe.azurecr.io/bicep/modules/rediscaches:v1"), + TemplatePath: to.Ptr("ghcr.io/testpublicrecipe/bicep/modules/rediscaches:v1"), }, }, }, diff --git a/pkg/cli/helm/radiusclient.go b/pkg/cli/helm/radiusclient.go index 41a59b362e..e3197149c9 100644 --- a/pkg/cli/helm/radiusclient.go +++ b/pkg/cli/helm/radiusclient.go @@ -33,7 +33,7 @@ import ( const ( radiusReleaseName = "radius" - radiusHelmRepo = "https://radius.azurecr.io/helm/v1/repo" + radiusHelmRepo = "https://ghcr.io/radius-project/helm/v1/repo" RadiusSystemNamespace = "radius-system" ) diff --git a/pkg/cli/helm/radiusclient_test.go b/pkg/cli/helm/radiusclient_test.go index d0b13d12a6..b2a3e46a6f 100644 --- a/pkg/cli/helm/radiusclient_test.go +++ b/pkg/cli/helm/radiusclient_test.go @@ -58,7 +58,7 @@ func Test_AddRadiusValuesOverrideWithSet(t *testing.T) { var helmChart chart.Chart helmChart.Values = map[string]any{} options := &RadiusOptions{ - SetArgs: []string{"rp.image=radius.azurecr.io/applications-rp,rp.tag=latest", "global.zipkin.url=url,global.prometheus.path=path"}, + SetArgs: []string{"rp.image=ghcr.io/radius-project/applications-rp,rp.tag=latest", "global.zipkin.url=url,global.prometheus.path=path"}, } err := AddRadiusValues(&helmChart, options) @@ -73,7 +73,7 @@ func Test_AddRadiusValuesOverrideWithSet(t *testing.T) { assert.Equal(t, o["tag"], "latest") _, ok = o["image"] assert.True(t, ok) - assert.Equal(t, o["image"], "radius.azurecr.io/applications-rp") + assert.Equal(t, o["image"], "ghcr.io/radius-project/applications-rp") _, ok = values["global"] assert.True(t, ok) diff --git a/pkg/cli/setup/application.go b/pkg/cli/setup/application.go index 89e050a61e..7bac01f386 100644 --- a/pkg/cli/setup/application.go +++ b/pkg/cli/setup/application.go @@ -31,7 +31,7 @@ resource demo 'Applications.Core/containers@2023-10-01-preview' = { properties: { application: application container: { - image: 'radius.azurecr.io/tutorial/webapp:edge' + image: 'ghcr.io/radius-project/tutorial/webapp:edge' ports: { web: { containerPort: 3000 diff --git a/pkg/corerp/api/v20231001preview/container_conversion_test.go b/pkg/corerp/api/v20231001preview/container_conversion_test.go index 7493cb7748..ce5da0d4ab 100644 --- a/pkg/corerp/api/v20231001preview/container_conversion_test.go +++ b/pkg/corerp/api/v20231001preview/container_conversion_test.go @@ -97,7 +97,7 @@ func TestContainerConvertVersionedToDataModel(t *testing.T) { require.Equal(t, true, *val.DisableDefaultEnvVars) require.Equal(t, "azure", string(val.IAM.Kind)) require.Equal(t, "read", val.IAM.Roles[0]) - require.Equal(t, "radius.azurecr.io/webapptutorial-todoapp", ct.Properties.Container.Image) + require.Equal(t, "ghcr.io/radius-project/webapptutorial-todoapp", ct.Properties.Container.Image) tcpProbe := ct.Properties.Container.LivenessProbe require.Equal(t, datamodel.TCPHealthProbe, tcpProbe.Kind) require.Equal(t, to.Ptr[float32](5), tcpProbe.TCP.InitialDelaySeconds) @@ -180,7 +180,7 @@ func TestContainerConvertDataModelToVersioned(t *testing.T) { require.Equal(t, "inventory_route_id", val.Source) require.Equal(t, "azure", string(val.IAM.Kind)) require.Equal(t, "read", val.IAM.Roles[0]) - require.Equal(t, "radius.azurecr.io/webapptutorial-todoapp", *versioned.Properties.Container.Image) + require.Equal(t, "ghcr.io/radius-project/webapptutorial-todoapp", *versioned.Properties.Container.Image) require.Equal(t, resourcetypeutil.MustPopulateResourceStatus(&ResourceStatus{}), versioned.Properties.Status) require.Equal(t, "kubernetesMetadata", *versioned.Properties.Extensions[2].GetExtension().Kind) require.Equal(t, 3, len(versioned.Properties.Extensions)) @@ -230,7 +230,7 @@ func TestContainerConvertVersionedToDataModelEmptyProtocol(t *testing.T) { require.Equal(t, "azure", string(val.IAM.Kind)) require.Equal(t, false, *val.DisableDefaultEnvVars) require.Equal(t, "read", val.IAM.Roles[0]) - require.Equal(t, "radius.azurecr.io/webapptutorial-todoapp", ct.Properties.Container.Image) + require.Equal(t, "ghcr.io/radius-project/webapptutorial-todoapp", ct.Properties.Container.Image) require.Equal(t, []rpv1.OutputResource(nil), ct.Properties.Status.OutputResources) require.Equal(t, "2023-10-01-preview", ct.InternalMetadata.UpdatedAPIVersion) diff --git a/pkg/corerp/api/v20231001preview/environment_conversion_test.go b/pkg/corerp/api/v20231001preview/environment_conversion_test.go index b086445e10..28cf9b239f 100644 --- a/pkg/corerp/api/v20231001preview/environment_conversion_test.go +++ b/pkg/corerp/api/v20231001preview/environment_conversion_test.go @@ -77,7 +77,7 @@ func TestConvertVersionedToDataModel(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "cosmos-recipe": datamodel.EnvironmentRecipeProperties{ TemplateKind: recipes.TemplateKindBicep, - TemplatePath: "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", + TemplatePath: "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb", }, }, }, @@ -121,7 +121,7 @@ func TestConvertVersionedToDataModel(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "cosmos-recipe": datamodel.EnvironmentRecipeProperties{ TemplateKind: recipes.TemplateKindBicep, - TemplatePath: "br:sampleregistry.azureacr.io/radius/recipes/mongodatabases", + TemplatePath: "br:ghcr.io/sampleregistry/radius/recipes/mongodatabases", Parameters: map[string]any{ "throughput": float64(400), }, @@ -139,7 +139,7 @@ func TestConvertVersionedToDataModel(t *testing.T) { ds_ctrl.RedisCachesResourceType: { "redis-recipe": datamodel.EnvironmentRecipeProperties{ TemplateKind: recipes.TemplateKindBicep, - TemplatePath: "br:sampleregistry.azureacr.io/radius/recipes/rediscaches", + TemplatePath: "br:ghcr.io/sampleregistry/radius/recipes/rediscaches", }, }, dapr_ctrl.DaprStateStoresResourceType: { @@ -188,7 +188,7 @@ func TestConvertVersionedToDataModel(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "cosmos-recipe": datamodel.EnvironmentRecipeProperties{ TemplateKind: recipes.TemplateKindBicep, - TemplatePath: "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", + TemplatePath: "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb", }, }, }, @@ -230,7 +230,7 @@ func TestConvertVersionedToDataModel(t *testing.T) { ds_ctrl.MongoDatabasesResourceType: { "cosmos-recipe": datamodel.EnvironmentRecipeProperties{ TemplateKind: recipes.TemplateKindBicep, - TemplatePath: "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", + TemplatePath: "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb", }, }, }, @@ -327,7 +327,7 @@ func TestConvertDataModelToVersioned(t *testing.T) { require.Equal(t, "kubernetes", string(*versioned.Properties.Compute.GetEnvironmentCompute().Kind)) require.Equal(t, "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Microsoft.ContainerService/managedClusters/radiusTestCluster", string(*versioned.Properties.Compute.GetEnvironmentCompute().ResourceID)) require.Equal(t, 1, len(versioned.Properties.Recipes)) - require.Equal(t, "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", string(*versioned.Properties.Recipes[ds_ctrl.MongoDatabasesResourceType]["cosmos-recipe"].GetRecipeProperties().TemplatePath)) + require.Equal(t, "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb", string(*versioned.Properties.Recipes[ds_ctrl.MongoDatabasesResourceType]["cosmos-recipe"].GetRecipeProperties().TemplatePath)) require.Equal(t, recipes.TemplateKindBicep, string(*versioned.Properties.Recipes[ds_ctrl.MongoDatabasesResourceType]["cosmos-recipe"].GetRecipeProperties().TemplateKind)) require.Equal(t, map[string]any{"throughput": float64(400)}, versioned.Properties.Recipes[ds_ctrl.MongoDatabasesResourceType]["cosmos-recipe"].GetRecipeProperties().Parameters) require.Equal(t, "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup", string(*versioned.Properties.Providers.Azure.Scope)) @@ -396,7 +396,7 @@ func TestConvertDataModelWithIdentityToVersioned(t *testing.T) { require.Equal(t, "kubernetes", string(*versioned.Properties.Compute.GetEnvironmentCompute().Kind)) require.Equal(t, "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Microsoft.ContainerService/managedClusters/radiusTestCluster", string(*versioned.Properties.Compute.GetEnvironmentCompute().ResourceID)) require.Equal(t, 1, len(versioned.Properties.Recipes)) - require.Equal(t, "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", string(*versioned.Properties.Recipes[ds_ctrl.MongoDatabasesResourceType]["cosmos-recipe"].GetRecipeProperties().TemplatePath)) + require.Equal(t, "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb", string(*versioned.Properties.Recipes[ds_ctrl.MongoDatabasesResourceType]["cosmos-recipe"].GetRecipeProperties().TemplatePath)) require.Equal(t, recipes.TemplateKindBicep, string(*versioned.Properties.Recipes[ds_ctrl.MongoDatabasesResourceType]["cosmos-recipe"].GetRecipeProperties().TemplateKind)) require.Equal(t, "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup", string(*versioned.Properties.Providers.Azure.Scope)) diff --git a/pkg/corerp/api/v20231001preview/testdata/containerresource-runtimes.json b/pkg/corerp/api/v20231001preview/testdata/containerresource-runtimes.json index f297aa46b0..27e3b62c64 100644 --- a/pkg/corerp/api/v20231001preview/testdata/containerresource-runtimes.json +++ b/pkg/corerp/api/v20231001preview/testdata/containerresource-runtimes.json @@ -25,7 +25,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "livenessProbe": { "kind": "tcp", "failureThreshold": 5, diff --git a/pkg/corerp/api/v20231001preview/testdata/containerresource.json b/pkg/corerp/api/v20231001preview/testdata/containerresource.json index c53d5aa869..6e641eb84e 100644 --- a/pkg/corerp/api/v20231001preview/testdata/containerresource.json +++ b/pkg/corerp/api/v20231001preview/testdata/containerresource.json @@ -25,7 +25,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "livenessProbe": { "kind": "tcp", "failureThreshold": 5, diff --git a/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel-runtime.json b/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel-runtime.json index 0364a72c9f..f5757c4b8b 100644 --- a/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel-runtime.json +++ b/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel-runtime.json @@ -40,7 +40,7 @@ "resource": "resourceid" }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "livenessProbe": { "kind": "tcp", "tcp": { diff --git a/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel.json b/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel.json index 57bb303c92..815b126465 100644 --- a/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel.json +++ b/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel.json @@ -40,7 +40,7 @@ "resource": "resourceid" }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "livenessProbe": { "kind": "tcp", "tcp": { diff --git a/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodelemptyext.json b/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodelemptyext.json index 285068e132..50dd1948dd 100644 --- a/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodelemptyext.json +++ b/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodelemptyext.json @@ -40,7 +40,7 @@ "resource": "resourceid" }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "livenessProbe": { "kind": "tcp", "tcp": { diff --git a/pkg/corerp/api/v20231001preview/testdata/containerresourceemptyext.json b/pkg/corerp/api/v20231001preview/testdata/containerresourceemptyext.json index 2a2f48e5c3..23fe3a492a 100644 --- a/pkg/corerp/api/v20231001preview/testdata/containerresourceemptyext.json +++ b/pkg/corerp/api/v20231001preview/testdata/containerresourceemptyext.json @@ -25,7 +25,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "livenessProbe": { "kind": "tcp", "failureThreshold": 5, diff --git a/pkg/corerp/api/v20231001preview/testdata/containerresourceemptyext2.json b/pkg/corerp/api/v20231001preview/testdata/containerresourceemptyext2.json index a177501577..cff7b7f0cb 100644 --- a/pkg/corerp/api/v20231001preview/testdata/containerresourceemptyext2.json +++ b/pkg/corerp/api/v20231001preview/testdata/containerresourceemptyext2.json @@ -25,7 +25,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "livenessProbe": { "kind": "tcp", "failureThreshold": 5, diff --git a/pkg/corerp/api/v20231001preview/testdata/containerresourcenegativetest.json b/pkg/corerp/api/v20231001preview/testdata/containerresourcenegativetest.json index 532694b031..2fd62bf9e6 100644 --- a/pkg/corerp/api/v20231001preview/testdata/containerresourcenegativetest.json +++ b/pkg/corerp/api/v20231001preview/testdata/containerresourcenegativetest.json @@ -24,7 +24,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "ports": { "web": { "containerPort": 8080 diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentrecipepropertiesdatamodel-missingtemplatekind.json b/pkg/corerp/api/v20231001preview/testdata/environmentrecipepropertiesdatamodel-missingtemplatekind.json index a692c5bd3a..62b803a7a6 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentrecipepropertiesdatamodel-missingtemplatekind.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentrecipepropertiesdatamodel-missingtemplatekind.json @@ -1,5 +1,5 @@ { - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb", "parameters": { "throughput": { "maxValue": 400, diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentrecipepropertiesdatamodel.json b/pkg/corerp/api/v20231001preview/testdata/environmentrecipepropertiesdatamodel.json index 332f1a9411..c983da8df9 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentrecipepropertiesdatamodel.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentrecipepropertiesdatamodel.json @@ -1,6 +1,6 @@ { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb", "parameters": { "throughput": { "maxValue": 400, diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentresource-invalid-resourcetype.json b/pkg/corerp/api/v20231001preview/testdata/environmentresource-invalid-resourcetype.json index 217e39f54f..71e0c25eac 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentresource-invalid-resourcetype.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentresource-invalid-resourcetype.json @@ -20,7 +20,7 @@ "Applications.Dapr/pubsub":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/pubsub" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/pubsub" } } } diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentresource-invalid-templatekind.json b/pkg/corerp/api/v20231001preview/testdata/environmentresource-invalid-templatekind.json index d59b36a83a..b5d0953a0c 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentresource-invalid-templatekind.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentresource-invalid-templatekind.json @@ -17,7 +17,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "helm", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/mongo" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/mongo" } } } diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentresource-missing-templatekind.json b/pkg/corerp/api/v20231001preview/testdata/environmentresource-missing-templatekind.json index 6288126867..ab8e503830 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentresource-missing-templatekind.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentresource-missing-templatekind.json @@ -16,7 +16,7 @@ "recipes": { "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/mongo" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/mongo" } } } diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentresource-with-workload-identity.json b/pkg/corerp/api/v20231001preview/testdata/environmentresource-with-workload-identity.json index 45ddb6e7c3..071dcd34d0 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentresource-with-workload-identity.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentresource-with-workload-identity.json @@ -22,7 +22,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } } diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentresource.json b/pkg/corerp/api/v20231001preview/testdata/environmentresource.json index f8673b1d36..e768394d0e 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentresource.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentresource.json @@ -20,7 +20,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/mongodatabases", + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/mongodatabases", "parameters":{ "throughput": 400 } @@ -38,7 +38,7 @@ "Applications.Datastores/redisCaches":{ "redis-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/rediscaches" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/rediscaches" } }, "Applications.Dapr/stateStores":{ diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodel-with-workload-identity.json b/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodel-with-workload-identity.json index 71dd115a5a..19cee1e6c0 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodel-with-workload-identity.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodel-with-workload-identity.json @@ -35,7 +35,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } } diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodel.json b/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodel.json index b361ca6d9e..0f9e0389c9 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodel.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodel.json @@ -33,7 +33,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb", "parameters" : { "throughput": 400 } diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodelemptyext.json b/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodelemptyext.json index e32d7dc027..13fc6e48a6 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodelemptyext.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodelemptyext.json @@ -33,7 +33,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb", "parameters" : { "throughput": 400 } diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodelemptytemplatekind.json b/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodelemptytemplatekind.json index bfab0d1d29..6df2e9860c 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodelemptytemplatekind.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentresourcedatamodelemptytemplatekind.json @@ -29,7 +29,7 @@ "recipes": { "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } } diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentresourceemptyext.json b/pkg/corerp/api/v20231001preview/testdata/environmentresourceemptyext.json index 4a0a4dbdda..9ddd7f53e3 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentresourceemptyext.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentresourceemptyext.json @@ -17,7 +17,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } }, diff --git a/pkg/corerp/api/v20231001preview/testdata/environmentresourceemptyext2.json b/pkg/corerp/api/v20231001preview/testdata/environmentresourceemptyext2.json index d9f13ccdf8..924edce362 100644 --- a/pkg/corerp/api/v20231001preview/testdata/environmentresourceemptyext2.json +++ b/pkg/corerp/api/v20231001preview/testdata/environmentresourceemptyext2.json @@ -17,7 +17,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } }, diff --git a/pkg/corerp/backend/deployment/deploymentprocessor_test.go b/pkg/corerp/backend/deployment/deploymentprocessor_test.go index 15f34ee043..2f8d8ceba0 100644 --- a/pkg/corerp/backend/deployment/deploymentprocessor_test.go +++ b/pkg/corerp/backend/deployment/deploymentprocessor_test.go @@ -185,7 +185,7 @@ func buildMongoDBWithRecipe() dsrp_dm.MongoDatabase { "Subscription": "Radius-Test", }, }, - TemplatePath: "testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1", + TemplatePath: "ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1", }, APIVersion: clientv2.DocumentDBManagementClientAPIVersion, Resources: []string{"/subscriptions/test-sub/resourceGroups/test-group/providers/Microsoft.DocumentDB/databaseAccounts/test-account", diff --git a/pkg/corerp/backend/deployment/testdata/containerresourcedatamodel.json b/pkg/corerp/backend/deployment/testdata/containerresourcedatamodel.json index 1d96b85b8e..c54bc0051b 100644 --- a/pkg/corerp/backend/deployment/testdata/containerresourcedatamodel.json +++ b/pkg/corerp/backend/deployment/testdata/containerresourcedatamodel.json @@ -35,7 +35,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "livenessProbe": { "kind": "tcp", "tcp": { diff --git a/pkg/corerp/backend/deployment/testdata/containerresourcedatamodellowercase.json b/pkg/corerp/backend/deployment/testdata/containerresourcedatamodellowercase.json index b2f9911782..16dc3ecb03 100644 --- a/pkg/corerp/backend/deployment/testdata/containerresourcedatamodellowercase.json +++ b/pkg/corerp/backend/deployment/testdata/containerresourcedatamodellowercase.json @@ -35,7 +35,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "livenessProbe": { "kind": "tcp", "tcp": { diff --git a/pkg/corerp/backend/deployment/testdata/containerresourcedatamodeluppercase.json b/pkg/corerp/backend/deployment/testdata/containerresourcedatamodeluppercase.json index cb012548cb..503f55d500 100644 --- a/pkg/corerp/backend/deployment/testdata/containerresourcedatamodeluppercase.json +++ b/pkg/corerp/backend/deployment/testdata/containerresourcedatamodeluppercase.json @@ -35,7 +35,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "livenessProbe": { "kind": "tcp", "tcp": { diff --git a/pkg/corerp/frontend/controller/environments/getrecipemetadata_test.go b/pkg/corerp/frontend/controller/environments/getrecipemetadata_test.go index 68a5277347..ee10982c67 100644 --- a/pkg/corerp/frontend/controller/environments/getrecipemetadata_test.go +++ b/pkg/corerp/frontend/controller/environments/getrecipemetadata_test.go @@ -62,7 +62,7 @@ func TestGetRecipeMetadataRun_20231001Preview(t *testing.T) { recipeDefinition := recipes.EnvironmentDefinition{ Name: *envInput.Name, Parameters: nil, - TemplatePath: "radiusdev.azurecr.io/recipes/functionaltest/parameters/mongodatabases/azure:1.0", + TemplatePath: "ghcr.io/radius-project/dev/recipes/functionaltest/parameters/mongodatabases/azure:1.0", TemplateVersion: "", Driver: "bicep", ResourceType: *envInput.ResourceType, @@ -234,7 +234,7 @@ func TestGetRecipeMetadataRun_20231001Preview(t *testing.T) { recipeDefinition := recipes.EnvironmentDefinition{ Name: *envInput.Name, Parameters: nil, - TemplatePath: "radiusdev.azurecr.io/recipes/functionaltest/parameters/mongodatabases/azure:1.0", + TemplatePath: "ghcr.io/radius-project/dev/recipes/functionaltest/parameters/mongodatabases/azure:1.0", TemplateVersion: "", Driver: "bicep", ResourceType: *envInput.ResourceType, diff --git a/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_datamodel.json b/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_datamodel.json index db3fcb5f4a..3933174ac4 100644 --- a/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_datamodel.json +++ b/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_datamodel.json @@ -24,7 +24,7 @@ "Applications.Datastores/mongoDatabases":{ "mongo-azure": { "templateKind": "bicep", - "templatePath": "radiusdev.azurecr.io/recipes/mongodatabases/azure:1.0", + "templatePath": "ghcr.io/radius-project/dev/recipes/mongodatabases/azure:1.0", "parameters": { "throughput": 400 } diff --git a/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_input.json b/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_input.json index eee49c2497..c744156b8a 100644 --- a/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_input.json +++ b/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_input.json @@ -10,7 +10,7 @@ "Applications.Datastores/mongoDatabases":{ "mongo-azure": { "templateKind": "bicep", - "templatePath": "radiusdev.azurecr.io/recipes/mongodatabases/azure:1.0", + "templatePath": "ghcr.io/radius-project/dev/recipes/mongodatabases/azure:1.0", "parameters": { "throughput": 400 } diff --git a/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_output.json b/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_output.json index 39139c8cfb..e5277f643b 100644 --- a/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_output.json +++ b/pkg/corerp/frontend/controller/environments/testdata/environment20231001preview_output.json @@ -17,7 +17,7 @@ "Applications.Datastores/mongoDatabases":{ "mongo-azure": { "templateKind": "bicep", - "templatePath": "radiusdev.azurecr.io/recipes/mongodatabases/azure:1.0", + "templatePath": "ghcr.io/radius-project/dev/recipes/mongodatabases/azure:1.0", "parameters": { "throughput": 400 } diff --git a/pkg/corerp/frontend/controller/environments/testdata/environmentgetrecipemetadata20231001preview_datamodel.json b/pkg/corerp/frontend/controller/environments/testdata/environmentgetrecipemetadata20231001preview_datamodel.json index 3e5273cc46..2596b128c1 100644 --- a/pkg/corerp/frontend/controller/environments/testdata/environmentgetrecipemetadata20231001preview_datamodel.json +++ b/pkg/corerp/frontend/controller/environments/testdata/environmentgetrecipemetadata20231001preview_datamodel.json @@ -24,7 +24,7 @@ "Applications.Datastores/mongoDatabases":{ "mongo-parameters": { "templateKind": "bicep", - "templatePath": "radiusdev.azurecr.io/recipes/functionaltest/parameters/mongodatabases/azure:1.0" + "templatePath": "ghcr.io/radius-project/dev/recipes/functionaltest/parameters/mongodatabases/azure:1.0" }, "mongo-terraform": { "templateKind":"terraform", @@ -35,7 +35,7 @@ "Applications.Datastores/redisCache":{ "redis": { "templateKind": "bicep", - "templatePath": "radiusdev.azurecr.io/redis:1.0" + "templatePath": "ghcr.io/radius-project/dev/redis:1.0" } } }, diff --git a/pkg/corerp/frontend/controller/environments/testdata/environmentgetrecipemetadata20231001preview_output.json b/pkg/corerp/frontend/controller/environments/testdata/environmentgetrecipemetadata20231001preview_output.json index 7c94b5fcff..46226422c8 100644 --- a/pkg/corerp/frontend/controller/environments/testdata/environmentgetrecipemetadata20231001preview_output.json +++ b/pkg/corerp/frontend/controller/environments/testdata/environmentgetrecipemetadata20231001preview_output.json @@ -1,6 +1,6 @@ { "templateKind": "bicep", - "templatePath": "radiusdev.azurecr.io/recipes/functionaltest/parameters/mongodatabases/azure:1.0", + "templatePath": "ghcr.io/radius-project/dev/recipes/functionaltest/parameters/mongodatabases/azure:1.0", "parameters": { "mongodbName": { "type" : "string" diff --git a/pkg/recipes/configloader/environment_test.go b/pkg/recipes/configloader/environment_test.go index 16b1000bf9..92d59738a8 100644 --- a/pkg/recipes/configloader/environment_test.go +++ b/pkg/recipes/configloader/environment_test.go @@ -224,7 +224,7 @@ func TestGetRecipeDefinition(t *testing.T) { "Applications.Datastores/mongoDatabases": { recipeName: &model.BicepRecipeProperties{ TemplateKind: to.Ptr(recipes.TemplateKindBicep), - TemplatePath: to.Ptr("radiusdev.azurecr.io/recipes/mongodatabases/azure:1.0"), + TemplatePath: to.Ptr("ghcr.io/radius-project/dev/recipes/mongodatabases/azure:1.0"), Parameters: map[string]any{ "foo": "bar", }, @@ -265,7 +265,7 @@ func TestGetRecipeDefinition(t *testing.T) { Name: recipeName, Driver: recipes.TemplateKindBicep, ResourceType: "Applications.Datastores/mongoDatabases", - TemplatePath: "radiusdev.azurecr.io/recipes/mongodatabases/azure:1.0", + TemplatePath: "ghcr.io/radius-project/dev/recipes/mongodatabases/azure:1.0", Parameters: map[string]any{ "foo": "bar", }, diff --git a/pkg/recipes/driver/bicep_test.go b/pkg/recipes/driver/bicep_test.go index f9d2991d6a..84a8f9dc12 100644 --- a/pkg/recipes/driver/bicep_test.go +++ b/pkg/recipes/driver/bicep_test.go @@ -434,12 +434,13 @@ func Test_Bicep_Delete_Error(t *testing.T) { } func Test_Bicep_GetRecipeMetadata_Success(t *testing.T) { + t.Skip("This test makes outbound calls. #6490") ctx := testcontext.New(t) driver := bicepDriver{} recipeDefinition := recipes.EnvironmentDefinition{ Name: "mongo-azure", Driver: recipes.TemplateKindBicep, - TemplatePath: "radiusdev.azurecr.io/recipes/functionaltest/parameters/mongodatabases/azure:1.0", + TemplatePath: "ghcr.io/radius-project/dev/recipes/functionaltest/parameters/mongodatabases/azure:1.0", ResourceType: "Applications.Datastores/mongoDatabases", } @@ -459,12 +460,13 @@ func Test_Bicep_GetRecipeMetadata_Success(t *testing.T) { } func Test_Bicep_GetRecipeMetadata_Error(t *testing.T) { + t.Skip("This test makes outbound calls. #6490") ctx := testcontext.New(t) driver := bicepDriver{} recipeDefinition := recipes.EnvironmentDefinition{ Name: "mongo-azure", Driver: recipes.TemplateKindBicep, - TemplatePath: "radiusdev.azurecr.io/test-non-existent-recipe", + TemplatePath: "ghcr.io/radius-project/dev/test-non-existent-recipe", ResourceType: "Applications.Datastores/mongoDatabases", } @@ -475,7 +477,7 @@ func Test_Bicep_GetRecipeMetadata_Error(t *testing.T) { expErr := recipes.RecipeError{ ErrorDetails: v1.ErrorDetails{ Code: recipes.RecipeLanguageFailure, - Message: "failed to fetch repository from the path \"radiusdev.azurecr.io/test-non-existent-recipe\": radiusdev.azurecr.io/test-non-existent-recipe:latest: not found", + Message: "failed to fetch repository from the path \"ghcr.io/radius-project/dev/test-non-existent-recipe\": ghcr.io/radius-project/dev/test-non-existent-recipe:latest: not found", }, DeploymentStatus: "setupError", } diff --git a/pkg/recipes/engine/engine_test.go b/pkg/recipes/engine/engine_test.go index 0785bb77c5..dc60e73f74 100644 --- a/pkg/recipes/engine/engine_test.go +++ b/pkg/recipes/engine/engine_test.go @@ -86,7 +86,7 @@ func Test_Engine_Execute_Success(t *testing.T) { } recipeDefinition := &recipes.EnvironmentDefinition{ Driver: recipes.TemplateKindBicep, - TemplatePath: "radiusdev.azurecr.io/recipes/functionaltest/basic/mongodatabases/azure:1.0", + TemplatePath: "ghcr.io/radius-project/dev/recipes/functionaltest/basic/mongodatabases/azure:1.0", ResourceType: "Applications.Datastores/mongoDatabases", } ctx := testcontext.New(t) @@ -149,7 +149,7 @@ func Test_Engine_Execute_Failure(t *testing.T) { } recipeDefinition := &recipes.EnvironmentDefinition{ Driver: recipes.TemplateKindBicep, - TemplatePath: "radiusdev.azurecr.io/recipes/functionaltest/basic/mongodatabases/azure:1.0", + TemplatePath: "ghcr.io/radius-project/dev/recipes/functionaltest/basic/mongodatabases/azure:1.0", ResourceType: "Applications.Datastores/mongoDatabases", } ctx := testcontext.New(t) @@ -266,7 +266,7 @@ func Test_Engine_InvalidDriver(t *testing.T) { recipeDefinition := &recipes.EnvironmentDefinition{ Driver: "invalid", - TemplatePath: "radiusdev.azurecr.io/recipes/functionaltest/basic/mongodatabases/azure:1.0", + TemplatePath: "ghcr.io/radius-project/dev/recipes/functionaltest/basic/mongodatabases/azure:1.0", ResourceType: "Applications.Datastores/mongoDatabases", } @@ -342,7 +342,7 @@ func Test_Engine_Load_Error(t *testing.T) { } recipeDefinition := &recipes.EnvironmentDefinition{ Driver: recipes.TemplateKindBicep, - TemplatePath: "radiusdev.azurecr.io/recipes/functionaltest/basic/mongodatabases/azure:1.0", + TemplatePath: "ghcr.io/radius-project/dev/recipes/functionaltest/basic/mongodatabases/azure:1.0", ResourceType: "Applications.Datastores/mongoDatabases", } configLoader.EXPECT(). @@ -561,7 +561,7 @@ func getRecipeInputs() (recipes.ResourceMetadata, recipes.EnvironmentDefinition, recipeDefinition := recipes.EnvironmentDefinition{ Driver: recipes.TemplateKindBicep, - TemplatePath: "radiusdev.azurecr.io/recipes/functionaltest/basic/mongodatabases/azure:1.0", + TemplatePath: "ghcr.io/radius-project/dev/recipes/functionaltest/basic/mongodatabases/azure:1.0", ResourceType: "Applications.Datastores/mongoDatabases", } diff --git a/pkg/rp/util/registry.go b/pkg/rp/util/registry.go index 3679c391d6..c25d9827da 100644 --- a/pkg/rp/util/registry.go +++ b/pkg/rp/util/registry.go @@ -38,8 +38,6 @@ func ReadFromRegistry(ctx context.Context, path string, data *map[string]any) er return v1.NewClientErrInvalidRequest(fmt.Sprintf("invalid path %s", err.Error())) } - // get the data from ACR - // client to the ACR repository in the path repo, err := remote.NewRepository(registryRepo) if err != nil { return fmt.Errorf("failed to create client to registry %s", err.Error()) diff --git a/pkg/rp/util/registry_test.go b/pkg/rp/util/registry_test.go index e514cf4f18..30088b03f3 100644 --- a/pkg/rp/util/registry_test.go +++ b/pkg/rp/util/registry_test.go @@ -23,9 +23,9 @@ import ( ) func Test_PathParser(t *testing.T) { - repository, tag, err := parsePath("radiusdev.azurecr.io/recipes/functionaltest/parameters/mongodatabases/azure:1.0") + repository, tag, err := parsePath("ghcr.io/radius-project/dev/recipes/functionaltest/parameters/mongodatabases/azure:1.0") require.NoError(t, err) - require.Equal(t, "radiusdev.azurecr.io/recipes/functionaltest/parameters/mongodatabases/azure", repository) + require.Equal(t, "ghcr.io/radius-project/dev/recipes/functionaltest/parameters/mongodatabases/azure", repository) require.Equal(t, "1.0", tag) } diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_CreateOrUpdate.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_CreateOrUpdate.json index 65816a2f8c..58b9d41de6 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_CreateOrUpdate.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_CreateOrUpdate.json @@ -15,7 +15,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], @@ -44,7 +44,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_CreateOrUpdate_BaseManifest.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_CreateOrUpdate_BaseManifest.json index b8dbc7abc6..ec310a19f8 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_CreateOrUpdate_BaseManifest.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_CreateOrUpdate_BaseManifest.json @@ -15,7 +15,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], @@ -49,7 +49,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_Get.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_Get.json index cdc446eb74..57dd6c6532 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_Get.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_Get.json @@ -22,7 +22,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_List.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_List.json index 8312e6d76f..49439c8f9a 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_List.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_List.json @@ -23,7 +23,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], @@ -54,7 +54,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_ListByScope.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_ListByScope.json index 5fdcfdd576..94e0ec01e4 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_ListByScope.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Containers_ListByScope.json @@ -23,7 +23,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], @@ -81,7 +81,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_CreateOrUpdate.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_CreateOrUpdate.json index 62af5e98fe..9998a5dd1f 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_CreateOrUpdate.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_CreateOrUpdate.json @@ -21,7 +21,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } }, @@ -63,7 +63,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } }, diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_GetEnv0.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_GetEnv0.json index 17f91750b1..8e7c297726 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_GetEnv0.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_GetEnv0.json @@ -32,7 +32,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } }, diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_GetRecipeMetadata.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_GetRecipeMetadata.json index 3ab0db80cd..6baed5642a 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_GetRecipeMetadata.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_GetRecipeMetadata.json @@ -12,7 +12,7 @@ "body": { "resourceType": "Applications.Datastores/mongoDatabases", "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb", "parameters": { "throughput": { "type" : "int", diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_List.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_List.json index 0dba7a53ee..4d7e7fc258 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_List.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_List.json @@ -33,21 +33,21 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" }, "default":{ "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/mongo" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/mongo" } }, "Applications.Datastores/redisCaches":{ "redis-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/rediscache" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/rediscache" }, "default":{ "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/redis" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/redis" } } }, @@ -111,7 +111,7 @@ "recipes": { "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } } diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_PatchEnv0.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_PatchEnv0.json index 54298decfe..a193b84236 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_PatchEnv0.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/examples/Environments_PatchEnv0.json @@ -21,7 +21,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } } @@ -50,7 +50,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } }, diff --git a/test/functional/shared/cli/cli_test.go b/test/functional/shared/cli/cli_test.go index ab7e9f2f2d..16fe4da16c 100644 --- a/test/functional/shared/cli/cli_test.go +++ b/test/functional/shared/cli/cli_test.go @@ -59,11 +59,11 @@ func verifyRecipeCLI(ctx context.Context, t *testing.T, test shared.RPTest) { // for AWS test and has the AWS scope which the environment created in this does not. envName := test.Steps[0].RPResources.Resources[0].Name recipeName := "recipeName" - recipeTemplate := "testpublicrecipe.azurecr.io/bicep/modules/testTemplate:v1" + recipeTemplate := "ghcr.io/testpublicrecipe/bicep/modules/testTemplate:v1" templateKind := "bicep" resourceType := "Applications.Datastores/mongoDatabases" file := "testdata/corerp-redis-recipe.bicep" - target := fmt.Sprintf("br:radiusdev.azurecr.io/test-bicep-recipes/redis-recipe:%s", generateUniqueTag()) + target := fmt.Sprintf("br:ghcr.io/radius-project/dev/test-bicep-recipes/redis-recipe:%s", generateUniqueTag()) t.Run("Validate rad recipe register", func(t *testing.T) { output, err := cli.RecipeRegister(ctx, envName, recipeName, templateKind, recipeTemplate, resourceType) @@ -87,7 +87,7 @@ func verifyRecipeCLI(ctx context.Context, t *testing.T, test shared.RPTest) { t.Run("Validate rad recipe show", func(t *testing.T) { showRecipeName := "mongodbtest" - showRecipeTemplate := "radiusdev.azurecr.io/recipes/functionaltest/parameters/mongodatabases/azure:1.0" + showRecipeTemplate := "ghcr.io/radius-project/dev/recipes/functionaltest/parameters/mongodatabases/azure:1.0" showRecipeResourceType := "Applications.Datastores/mongoDatabases" output, err := cli.RecipeRegister(ctx, envName, showRecipeName, templateKind, showRecipeTemplate, showRecipeResourceType) require.NoError(t, err) @@ -588,8 +588,8 @@ func Test_CLI_DeploymentParameters(t *testing.T) { registry, _ := functional.SetDefault() parameterFilePath := functional.WriteBicepParameterFile(t, map[string]any{"registry": registry}) - // corerp-kubernetes-cli-parameters.parameters.json uses radiusdev.azurecr.io as a registry parameter. - // Use the specified tag only if the test uses radiusdev.azurecr.io registry. Otherwise, use latest tag. + // corerp-kubernetes-cli-parameters.parameters.json uses ghcr.io/radius-project/dev as a registry parameter. + // Use the specified tag only if the test uses ghcr.io/radius-project/dev registry. Otherwise, use latest tag. test := shared.NewRPTest(t, name, []shared.TestStep{ { @@ -666,6 +666,7 @@ func Test_CLI_Only_version(t *testing.T) { } func Test_RecipeCommands(t *testing.T) { + t.Skip("TODO: disabling this test temporarily while we determine which recipes it should pull") template := "testdata/corerp-resources-recipe-env.bicep" name := "corerp-resources-recipe-env" diff --git a/test/functional/shared/cli/testdata/corerp-resources-recipe-env.bicep b/test/functional/shared/cli/testdata/corerp-resources-recipe-env.bicep index cdb0bd9fad..0c01851bed 100644 --- a/test/functional/shared/cli/testdata/corerp-resources-recipe-env.bicep +++ b/test/functional/shared/cli/testdata/corerp-resources-recipe-env.bicep @@ -16,7 +16,7 @@ resource env 'Applications.Core/environments@2023-10-01-preview' = { 'Applications.Datastores/mongoDatabases':{ recipe1: { templateKind: 'bicep' - templatePath: 'testpublicrecipe.azurecr.io/bicep/modules/mongodatabases:v1' + templatePath: 'ghcr.io/testpublicrecipe/bicep/modules/mongodatabases:v1' } recipe2: { templateKind: 'terraform' diff --git a/test/functional/shared/resources/testdata/corerp-resources-container-pod-patching.bicep b/test/functional/shared/resources/testdata/corerp-resources-container-pod-patching.bicep index b4b9aae2da..399b85ca57 100644 --- a/test/functional/shared/resources/testdata/corerp-resources-container-pod-patching.bicep +++ b/test/functional/shared/resources/testdata/corerp-resources-container-pod-patching.bicep @@ -46,7 +46,7 @@ resource container 'Applications.Core/containers@2023-10-01-preview' = { containers: [ { name: 'log-collector' - image: 'radiusdev.azurecr.io/fluent/fluent-bit:2.1.8' + image: 'ghcr.io/radius-project/fluent-bit:2.1.8' } ] hostNetwork: true @@ -55,4 +55,3 @@ resource container 'Applications.Core/containers@2023-10-01-preview' = { } } } - diff --git a/test/functional/shared/resources/testdata/manifest/sidecar.yaml b/test/functional/shared/resources/testdata/manifest/sidecar.yaml index 25d164474b..6a41c638ad 100644 --- a/test/functional/shared/resources/testdata/manifest/sidecar.yaml +++ b/test/functional/shared/resources/testdata/manifest/sidecar.yaml @@ -18,5 +18,4 @@ spec: spec: containers: - name: log-collector - # TODO: change it to ghcr.io/radius-project/fluent-bit:2.1.8 - image: radiusdev.azurecr.io/fluent/fluent-bit:2.1.8 + image: ghcr.io/radius-project/fluent-bit:2.1.8 diff --git a/test/functional/shared/resources/testdata/recipes/test-bicep-recipes/README.md b/test/functional/shared/resources/testdata/recipes/test-bicep-recipes/README.md index cb6e36b49e..a307c1ba02 100644 --- a/test/functional/shared/resources/testdata/recipes/test-bicep-recipes/README.md +++ b/test/functional/shared/resources/testdata/recipes/test-bicep-recipes/README.md @@ -2,7 +2,7 @@ The recipes in this folder are published as part of the PR process to: -> `radiusdev.azurecr.io/test/functional/shared/recipes/:pr-` +> `ghcr.io/radius-project/dev/test/functional/shared/recipes/:pr-` This is important because it allows us to make changes to the recipes, and test them in the same PR that contains the change. diff --git a/test/functional/testUtil.go b/test/functional/testUtil.go index 13f6af11fd..fb4331ebf1 100644 --- a/test/functional/testUtil.go +++ b/test/functional/testUtil.go @@ -73,7 +73,7 @@ func SetDefault() (string, string) { defaultDockerReg := os.Getenv("DOCKER_REGISTRY") imageTag := os.Getenv("REL_VERSION") if defaultDockerReg == "" { - defaultDockerReg = "radiusdev.azurecr.io" + defaultDockerReg = "ghcr.io/radius-project/dev" } if imageTag == "" { imageTag = "latest" @@ -91,7 +91,7 @@ type ProxyMetadata struct { func GetBicepRecipeRegistry() string { defaultRecipeRegistry := os.Getenv("BICEP_RECIPE_REGISTRY") if defaultRecipeRegistry == "" { - defaultRecipeRegistry = "radiusdev.azurecr.io" + defaultRecipeRegistry = "ghcr.io/radius-project/dev" } return "registry=" + defaultRecipeRegistry } diff --git a/test/functional/ucp/proxy_test.go b/test/functional/ucp/proxy_test.go index 1dd48ccf5f..2d7646dd93 100644 --- a/test/functional/ucp/proxy_test.go +++ b/test/functional/ucp/proxy_test.go @@ -249,7 +249,7 @@ func getTestRPImage() string { dockerReg := os.Getenv("DOCKER_REGISTRY") imageTag := os.Getenv("REL_VERSION") if dockerReg == "" { - dockerReg = "radiusdev.azurecr.io" + dockerReg = "ghcr.io/radius-project/dev" } if imageTag == "" { imageTag = "latest" diff --git a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_CreateOrUpdate.json b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_CreateOrUpdate.json index 65816a2f8c..58b9d41de6 100644 --- a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_CreateOrUpdate.json +++ b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_CreateOrUpdate.json @@ -15,7 +15,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], @@ -44,7 +44,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], diff --git a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_CreateOrUpdate_BaseManifest.json b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_CreateOrUpdate_BaseManifest.json index b8dbc7abc6..ec310a19f8 100644 --- a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_CreateOrUpdate_BaseManifest.json +++ b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_CreateOrUpdate_BaseManifest.json @@ -15,7 +15,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], @@ -49,7 +49,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], diff --git a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_Get.json b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_Get.json index cdc446eb74..57dd6c6532 100644 --- a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_Get.json +++ b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_Get.json @@ -22,7 +22,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], diff --git a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_List.json b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_List.json index 8312e6d76f..49439c8f9a 100644 --- a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_List.json +++ b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_List.json @@ -23,7 +23,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], @@ -54,7 +54,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], diff --git a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_ListByScope.json b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_ListByScope.json index 5fdcfdd576..94e0ec01e4 100644 --- a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_ListByScope.json +++ b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_ListByScope.json @@ -23,7 +23,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], @@ -81,7 +81,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], diff --git a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_Update.json b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_Update.json index b276b045fe..614e0bc67b 100644 --- a/typespec/Applications.Core/examples/2023-10-01-preview/Containers_Update.json +++ b/typespec/Applications.Core/examples/2023-10-01-preview/Containers_Update.json @@ -9,7 +9,7 @@ "properties": { "application": "/planes/radius/local/resourceGroups/testGroup/providers/Applications.Core/applications/app0", "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], @@ -38,7 +38,7 @@ } }, "container": { - "image": "radius.azurecr.io/webapptutorial-todoapp", + "image": "ghcr.io/radius-project/webapptutorial-todoapp", "command": [ "/bin/sh" ], diff --git a/typespec/Applications.Core/examples/2023-10-01-preview/Environments_CreateOrUpdate.json b/typespec/Applications.Core/examples/2023-10-01-preview/Environments_CreateOrUpdate.json index 62af5e98fe..9998a5dd1f 100644 --- a/typespec/Applications.Core/examples/2023-10-01-preview/Environments_CreateOrUpdate.json +++ b/typespec/Applications.Core/examples/2023-10-01-preview/Environments_CreateOrUpdate.json @@ -21,7 +21,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } }, @@ -63,7 +63,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } }, diff --git a/typespec/Applications.Core/examples/2023-10-01-preview/Environments_GetEnv0.json b/typespec/Applications.Core/examples/2023-10-01-preview/Environments_GetEnv0.json index 17f91750b1..8e7c297726 100644 --- a/typespec/Applications.Core/examples/2023-10-01-preview/Environments_GetEnv0.json +++ b/typespec/Applications.Core/examples/2023-10-01-preview/Environments_GetEnv0.json @@ -32,7 +32,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } }, diff --git a/typespec/Applications.Core/examples/2023-10-01-preview/Environments_GetRecipeMetadata.json b/typespec/Applications.Core/examples/2023-10-01-preview/Environments_GetRecipeMetadata.json index 3ab0db80cd..6baed5642a 100644 --- a/typespec/Applications.Core/examples/2023-10-01-preview/Environments_GetRecipeMetadata.json +++ b/typespec/Applications.Core/examples/2023-10-01-preview/Environments_GetRecipeMetadata.json @@ -12,7 +12,7 @@ "body": { "resourceType": "Applications.Datastores/mongoDatabases", "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb", + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb", "parameters": { "throughput": { "type" : "int", diff --git a/typespec/Applications.Core/examples/2023-10-01-preview/Environments_List.json b/typespec/Applications.Core/examples/2023-10-01-preview/Environments_List.json index 0dba7a53ee..4d7e7fc258 100644 --- a/typespec/Applications.Core/examples/2023-10-01-preview/Environments_List.json +++ b/typespec/Applications.Core/examples/2023-10-01-preview/Environments_List.json @@ -33,21 +33,21 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" }, "default":{ "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/mongo" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/mongo" } }, "Applications.Datastores/redisCaches":{ "redis-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/rediscache" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/rediscache" }, "default":{ "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/redis" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/redis" } } }, @@ -111,7 +111,7 @@ "recipes": { "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } } diff --git a/typespec/Applications.Core/examples/2023-10-01-preview/Environments_PatchEnv0.json b/typespec/Applications.Core/examples/2023-10-01-preview/Environments_PatchEnv0.json index 54298decfe..a193b84236 100644 --- a/typespec/Applications.Core/examples/2023-10-01-preview/Environments_PatchEnv0.json +++ b/typespec/Applications.Core/examples/2023-10-01-preview/Environments_PatchEnv0.json @@ -21,7 +21,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } } @@ -50,7 +50,7 @@ "Applications.Datastores/mongoDatabases":{ "cosmos-recipe": { "templateKind": "bicep", - "templatePath": "br:sampleregistry.azureacr.io/radius/recipes/cosmosdb" + "templatePath": "br:ghcr.io/sampleregistry/radius/recipes/cosmosdb" } } },