diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 5af67ebe6..13cdebb15 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -63,11 +63,6 @@ resources: endpoint: microsoftgraph (22) name: microsoftgraph/msgraph-beta-sdk-go ref: main - - repository: msgraph-sdk-ruby - type: github - endpoint: microsoftgraph (22) - name: microsoftgraph/msgraph-sdk-ruby - ref: main - repository: msgraph-sdk-typescript type: github endpoint: microsoftgraph (22) @@ -368,35 +363,6 @@ stages: parameters: repoName: msgraph-beta-sdk-go -- stage: stage_ruby_v1 - dependsOn: - - stage_build_and_publish_kiota - - stage_v1_openapi - condition: | - and - ( - eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') - ) - jobs: - - job: ruby_v1 - steps: - - template: generation-templates/language-generation-kiota.yml - parameters: - language: 'ruby' - version: '' - repoName: 'msgraph-sdk-ruby' - branchName: $(v1Branch) - targetClassName: "GraphBaseServiceClient" - targetNamespace: "MicrosoftGraph" - cleanMetadataFolder: $(cleanOpenAPIFolderV1) - customArguments: "-e '/me' -e '/me/**'" # Exclude me - languageSpecificSteps: - - template: generation-templates/ruby.yml - parameters: - repoName: msgraph-sdk-ruby - barrelFileName: microsoft_graph.rb - - stage: stage_java_v1_kiota dependsOn: - stage_build_and_publish_kiota diff --git a/.azure-pipelines/generation-templates/ruby.yml b/.azure-pipelines/generation-templates/ruby.yml deleted file mode 100644 index 8d35c173a..000000000 --- a/.azure-pipelines/generation-templates/ruby.yml +++ /dev/null @@ -1,27 +0,0 @@ -parameters: - - name: repoName - type: string - - name: barrelFileName - type: string - -steps: -- pwsh: '$(scriptsDirectory)/clean-ruby-files.ps1' - displayName: 'Remove generated models and requests from the repo' - env: - MainDirectory: $(Build.SourcesDirectory)/${{ parameters.repoName }}/lib/ - -- pwsh : $(Build.SourcesDirectory)/${{ parameters.repoName }}/scripts/incrementMinorVersion.ps1 - displayName: 'Increment minor version number' - workingDirectory: '$(Build.SourcesDirectory)/${{ parameters.repoName }}/scripts' - -- pwsh: '$(scriptsDirectory)/copy-ruby-models.ps1' - displayName: 'Update models' - env: - BuildConfiguration: $(buildConfiguration) - OutputFullPath: $(kiotaDirectory)/output/* - RepoModelsDir: $(Build.SourcesDirectory)/${{ parameters.repoName }}/lib/ - -- pwsh: '$(scriptsDirectory)/update-ruby-barrel.ps1' - displayName: 'Update barrel file' - env: - BarrelFilePath: $(Build.SourcesDirectory)/${{ parameters.repoName }}/lib/${{ parameters.barrelFileName }} diff --git a/scripts/clean-ruby-files.ps1 b/scripts/clean-ruby-files.ps1 deleted file mode 100644 index 644c00b8f..000000000 --- a/scripts/clean-ruby-files.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -$directories = Get-ChildItem -Path $env:MainDirectory -Directory -foreach ($directory in $directories) { - Remove-Item -Path $directory.FullName -Recurse -Force -Verbose -} -Get-ChildItem -Path $env:MainDirectory -Directory | ForEach-Object { Remove-Item -Path $_.FullName -Verbose -Force -Recurse} -Get-ChildItem -Path $env:MainDirectory -Exclude "graph_request_adapter.rb", "graph_service_client.rb", "version_information.rb" | Where-Object { !$_.PSIsContainer -and $_.Name -like "*.rb" } | ForEach-Object { Remove-Item -Path $_.FullName -Verbose -Force} - -Write-Host "Removed the existing generated files in the repo's main directory: $env:MainDirectory" -ForegroundColor Green diff --git a/scripts/copy-cli-models-kiota.ps1 b/scripts/copy-cli-models-kiota.ps1 deleted file mode 100644 index 8c0e78510..000000000 --- a/scripts/copy-cli-models-kiota.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -Write-Host "Path to repo models directory: $env:RepoModelsDir" - -# clean old models -Remove-Item -Recurse $env:RepoModelsDir | Write-Host -Write-Host "Removed the existing generated files in the repo." -ForegroundColor Green - -# copy new models -# Create a dest folder explicitly https://github.com/PowerShell/PowerShell/issues/13352#issuecomment-669025179 -New-Item -ItemType directory -Path $env:RepoModelsDir -Move-Item $env:OutputFullPath $env:RepoModelsDir -Write-Host "Moved the models from $modelsDirectory into the local repo." -ForegroundColor Green - -$helpUpdateScript = Join-Path -Path $env:WorkspaceRootDir -ChildPath .azure-pipelines/powershell/HelpUpdate.ps1 -. $helpUpdateScript - -Update-UsersMeAlias -WorkspaceRootDir $env:WorkspaceRootDir -Update-MeUserIdHelp -WorkspaceRootDir $env:WorkspaceRootDir - -Write-Host "Updated 'me' help content in $env:RepoModelsDir" -ForegroundColor Green diff --git a/scripts/copy-ruby-models.ps1 b/scripts/copy-ruby-models.ps1 deleted file mode 100644 index 53ff5999d..000000000 --- a/scripts/copy-ruby-models.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -Write-Host "Path to repo models directory: $env:RepoModelsDir" - -Copy-Item $env:OutputFullPath -Destination $env:RepoModelsDir -Recurse -Force -Write-Host "Copied the generated files into the repo. From: $env:OutputFullPath to: $env:RepoModelsDir" -ForegroundColor Green diff --git a/scripts/update-ruby-barrel.ps1 b/scripts/update-ruby-barrel.ps1 deleted file mode 100644 index f088f0c9e..000000000 --- a/scripts/update-ruby-barrel.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -$content = Get-Content -Path $env:BarrelFilePath -$lines = @( - "require_relative 'graph_service_client'", - "require_relative 'graph_request_adapter'", - "require_relative 'models/models'" -) -if ($content.Length -eq 0) { - Write-Host "inserting lines into $env:BarrelFilePath" - $lines | Set-Content -Path $env:BarrelFilePath -Verbose -NoNewline -} elseif ($content[0] -ne $lines[0]) { - Write-Host "inserting lines into $env:BarrelFilePath" - $updatedContent = $lines + $content - $updatedContent | Set-Content -Path $env:BarrelFilePath -Verbose -NoNewline -} else { - Write-Host "barrel file is up to date" -} \ No newline at end of file