From 9805b8252b235070b3f6357df09694a4a9944409 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 19 Dec 2024 09:51:16 -0500 Subject: [PATCH 1/3] ci: rename master to main Signed-off-by: Vincent Biret --- .azure-pipelines/ci-build.yml | 6 +++--- .github/workflows/docker.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 28d442b3a..16d12003d 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -5,12 +5,12 @@ name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) trigger: branches: include: - - master + - main - vnext pr: branches: include: - - master + - main - vnext variables: buildPlatform: 'Any CPU' @@ -206,7 +206,7 @@ extends: content: '*.nupkg' - stage: deploy - condition: and(contains(variables['build.sourceBranch'], 'refs/heads/master'), succeeded()) + condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded()) dependsOn: build jobs: - deployment: deploy_hidi diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e01c89f0f..94d807af1 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,7 +2,7 @@ name: Publish Docker image on: workflow_dispatch: push: - branches: [master, vnext] + branches: [main, vnext] paths: ['src/Microsoft.OpenApi.Hidi/**', '.github/workflows/**'] env: REGISTRY: msgraphprod.azurecr.io @@ -35,7 +35,7 @@ jobs: push: true tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly - name: Push to GitHub Packages - Release - if: ${{ github.ref == 'refs/heads/master' }} + if: ${{ github.ref == 'refs/heads/main' }} uses: docker/build-push-action@v6.10.0 with: push: true From 1a5352a35b361f352bdc237ed8d5bad2e212bb1e Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 19 Dec 2024 09:54:20 -0500 Subject: [PATCH 2/3] ci: renames vnext to dev Signed-off-by: Vincent Biret --- .azure-pipelines/ci-build.yml | 4 ++-- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/docker.yml | 10 +++++----- Dockerfile | 4 ++-- README.md | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 16d12003d..25fdacd7f 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -6,12 +6,12 @@ trigger: branches: include: - main - - vnext + - dev pr: branches: include: - main - - vnext + - dev variables: buildPlatform: 'Any CPU' buildConfiguration: 'Release' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 22eb5f8fa..4224ace24 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,7 +2,7 @@ name: CodeQL Analysis on: push: - branches: [ vnext ] + branches: [ main, dev ] pull_request: schedule: - cron: '0 8 * * *' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 94d807af1..1769a7b51 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,7 +2,7 @@ name: Publish Docker image on: workflow_dispatch: push: - branches: [main, vnext] + branches: [main, dev] paths: ['src/Microsoft.OpenApi.Hidi/**', '.github/workflows/**'] env: REGISTRY: msgraphprod.azurecr.io @@ -16,7 +16,7 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v4 - - name: Login to GitHub package feed + - name: Login to registry uses: docker/login-action@v3.3.0 with: username: ${{ secrets.ACR_USERNAME }} @@ -28,13 +28,13 @@ jobs: echo "::set-output name=version::${version}" shell: pwsh id: getversion - - name: Push to GitHub Packages - Nightly - if: ${{ github.ref == 'refs/heads/vnext' }} + - name: Push to registry - Nightly + if: ${{ github.ref == 'refs/heads/dev' }} uses: docker/build-push-action@v6.10.0 with: push: true tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly - - name: Push to GitHub Packages - Release + - name: Push to registry - Release if: ${{ github.ref == 'refs/heads/main' }} uses: docker/build-push-action@v6.10.0 with: diff --git a/Dockerfile b/Dockerfile index fd821e3e4..25f1ec589 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,5 +19,5 @@ VOLUME /app/collection.json ENV HIDI_CONTAINER=true DOTNET_TieredPGO=1 DOTNET_TC_QuickJitForLoops=1 ENTRYPOINT ["dotnet", "Microsoft.OpenApi.Hidi.dll"] LABEL description="# Welcome to Hidi \ -To start transforming OpenAPI documents checkout [the getting started documentation](https://github.com/microsoft/OpenAPI.NET/tree/vnext/src/Microsoft.OpenApi.Hidi) \ -[Source dockerfile](https://github.com/microsoft/OpenAPI.NET/blob/vnext/Dockerfile)" +To start transforming OpenAPI documents checkout [the getting started documentation](https://github.com/microsoft/OpenAPI.NET/tree/main/src/Microsoft.OpenApi.Hidi) \ +[Source dockerfile](https://github.com/microsoft/OpenAPI.NET/blob/main/Dockerfile)" diff --git a/README.md b/README.md index de069aeda..3a7702eb3 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ var outputString = openApiDocument.Serialize(OpenApiSpecVersion.OpenApi2_0, Open In order to test the validity of an OpenApi document, we avail the following tools: - [Microsoft.OpenApi.Hidi](https://www.nuget.org/packages/Microsoft.OpenApi.Hidi) - A commandline tool for validating and transforming OpenAPI descriptions. [Installation guidelines and documentation](https://github.com/microsoft/OpenAPI.NET/blob/vnext/src/Microsoft.OpenApi.Hidi/readme.md) + A commandline tool for validating and transforming OpenAPI descriptions. [Installation guidelines and documentation](https://github.com/microsoft/OpenAPI.NET/blob/main/src/Microsoft.OpenApi.Hidi/readme.md) - Microsoft.OpenApi.Workbench From c805f2e952c986e28f831cc58abc848525b3dd88 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 19 Dec 2024 09:56:35 -0500 Subject: [PATCH 3/3] ci: adds support branch for v1 Signed-off-by: Vincent Biret --- .azure-pipelines/ci-build.yml | 4 +++- .github/workflows/docker.yml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 25fdacd7f..e9aa773a3 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -7,11 +7,13 @@ trigger: include: - main - dev + - support/v1 pr: branches: include: - main - dev + - support/v1 variables: buildPlatform: 'Any CPU' buildConfiguration: 'Release' @@ -206,7 +208,7 @@ extends: content: '*.nupkg' - stage: deploy - condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded()) + condition: and(or(contains(variables['build.sourceBranch'], 'refs/heads/main'),contains(variables['build.sourceBranch'], 'refs/heads/support/v1')), succeeded()) dependsOn: build jobs: - deployment: deploy_hidi diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1769a7b51..7e81a456d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,7 +2,7 @@ name: Publish Docker image on: workflow_dispatch: push: - branches: [main, dev] + branches: [main, dev, support/v1] paths: ['src/Microsoft.OpenApi.Hidi/**', '.github/workflows/**'] env: REGISTRY: msgraphprod.azurecr.io @@ -35,7 +35,7 @@ jobs: push: true tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly - name: Push to registry - Release - if: ${{ github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/support/v1' }} uses: docker/build-push-action@v6.10.0 with: push: true