Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing hack folder for bicep types generator #8278

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: radius-bicep-types
path: ./hack/bicep-types-radius/generated
path: ./bicep-types-radius/generated
if-no-files-found: error
- name: 'Login via Azure CLI'
if: github.repository == 'radius-project/radius' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main'))
Expand All @@ -305,7 +305,7 @@ jobs:
- name: Publish bicep types
if: github.repository == 'radius-project/radius' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main'))
run: |
bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.BICEP_TYPES_REGISTRY }}/radius:${{ env.REL_CHANNEL == 'edge' && 'latest' || env.REL_CHANNEL }} --force
bicep publish-extension ./bicep-types-radius/generated/index.json --target br:${{ env.BICEP_TYPES_REGISTRY }}/radius:${{ env.REL_CHANNEL == 'edge' && 'latest' || env.REL_CHANNEL }} --force

publish-release:
name: Publish GitHub Release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/functional-test-cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: radius_bicep_types_cloud
path: ./hack/bicep-types-radius/generated
path: ./bicep-types-radius/generated
if-no-files-found: error

- name: 'Login via Azure CLI'
Expand All @@ -376,7 +376,7 @@ jobs:

- name: Publish bicep types
run: |
bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.BICEP_TYPES_REGISTRY }}/test/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force
bicep publish-extension ./bicep-types-radius/generated/index.json --target br:${{ env.BICEP_TYPES_REGISTRY }}/test/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force

- name: Generate test bicepconfig.json
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/functional-test-noncloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}_radius_bicep_types
path: ./hack/bicep-types-radius/generated
path: ./bicep-types-radius/generated
if-no-files-found: error

- name: Create a secure local registry
Expand Down Expand Up @@ -297,7 +297,7 @@ jobs:

- name: Publish bicep types
run: |
bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.LOCAL_REGISTRY_SERVER }}:${{ env.LOCAL_REGISTRY_PORT }}/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force
bicep publish-extension ./bicep-types-radius/generated/index.json --target br:${{ env.LOCAL_REGISTRY_SERVER }}:${{ env.LOCAL_REGISTRY_PORT }}/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force

- name: Generate test bicepconfig.json
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
make generate
# Generate resource reference docs
- name: Generate resource reference docs
run: python docs/.github/scripts/generate_resource_references.py ./radius/hack/bicep-types-radius/generated/ ./docs/docs/content/reference/resources
run: python docs/.github/scripts/generate_resource_references.py ./radius/bicep-types-radius/generated/ ./docs/docs/content/reference/resources
- name: Upload resource reference docs
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-bicep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
mkdir tmp-radius-bicep-extension
- name: Publish bicep types
run: |
bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target ./tmp-radius-bicep-extension/radius.tgz
bicep publish-extension ./bicep-types-radius/generated/index.json --target ./tmp-radius-bicep-extension/radius.tgz
- name: Install jq
run: sudo apt-get install -y jq
- name: Modify bicepconfig.json
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ node_modules
tmp-*

# Auto-generated Bicep markdown files
hack/bicep-types-radius/generated/**/*.md
bicep-types-radius/generated/**/*.md

# Bicep extensions
*.tgz
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# .prettierignore
pkg/validator/testdata/put-environments-invalid-json.json

hack/bicep-types-radius/generated/*
bicep-types-radius/generated/*

bicep-types/*

Expand Down
6 changes: 3 additions & 3 deletions build/generate.mk
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ generate-bicep-types: generate-node-installed ## Generate Bicep extensibility ty
git submodule update --init --recursive; \
npm --prefix bicep-types/src/bicep-types install; \
npm --prefix bicep-types/src/bicep-types ci && npm --prefix bicep-types/src/bicep-types run build; \
npm --prefix hack/bicep-types-radius/src/autorest.bicep ci && npm --prefix hack/bicep-types-radius/src/autorest.bicep run build; \
echo "Run generator from hack/bicep-types-radius/src/generator dir"; \
npm --prefix hack/bicep-types-radius/src/generator ci && npm --prefix hack/bicep-types-radius/src/generator run generate -- --specs-dir ../../../../swagger --release-version ${VERSION} --verbose
npm --prefix bicep-types-radius/src/autorest.bicep ci && npm --prefix bicep-types-radius/src/autorest.bicep run build; \
echo "Run generator from bicep-types-radius/src/generator dir"; \
npm --prefix bicep-types-radius/src/generator ci && npm --prefix bicep-types-radius/src/generator run generate -- --specs-dir ../../../../swagger --release-version ${VERSION} --verbose

# go-get-tool will 'go get' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/..
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In general you should ask for guidance before creating a new top-level folder in
| `typespec/` | Definitions for generating Radius swagger files. |
| `deploy/` | Assets used to package, deploy, and install Radius |
| `docs/` | All project documentation |
| `hack/` | Utility code to generate Radius bicep types |
| `bicep-types-radius/` | Utility code to generate Radius bicep types |
| `pkg/` | The majority of the Go code powering Radius |
| `swagger/` | OpenAPI Specification v2 files to describe the REST APIs of Radius resource providers |
| `test/` | Integration and end-to-end tests |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Note: Alternatively, if you already have the Radius CLI installed, you can choos
make generate
```

1. `cd` into the `hack/bicep-types-radius/generated` folder
1. `cd` into the `bicep-types-radius/generated` folder
1. Run `bicep publish-provider <file> --target <ref>` to upload the schema changes to your file system. The file uploaded will be the `index.json` file as it contains all references to the types schema. The `<file-name>` can be named as desired, but we recommend using an archive (i.e. `.zip`, `.tgz`, etc). This will make it easier to view the files that get uploaded if needed.

```bash
Expand Down
Loading