Skip to content

Commit

Permalink
temporarily revert release yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft committed Sep 15, 2022
1 parent 5f6100c commit 3e84f5f
Showing 1 changed file with 60 additions and 23 deletions.
83 changes: 60 additions & 23 deletions eng/pipelines/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,86 @@ pool:

variables:
NodeVersion: "14.x"
AutorestTestFolder: "$(Build.SourcesDirectory)/packages/autorest.python/test/"
TestFolder: "$(Build.SourcesDirectory)/packages/autorest.python/test/"
AUTOREST_TESTSERVER_COVERAGE_DIRECTORY: "$(Build.SourcesDirectory)/packages/autorest.python/coverage/"

steps:
- script: npm install -g pnpm
displayName: Install PNPM
- task: NodeTool@0
displayName: "Install Node.js $(NodeVersion)"
inputs:
versionSpec: "$(NodeVersion)"

- script: pnpm install
displayName: Install dependencies
- task: UsePythonVersion@0
displayName: "Use Python 3.7"
inputs:
versionSpec: 3.7

- script: pnpm run build
displayName: Build
- script: |
npm install -g pnpm
npm install -g autorest
pnpm install
pip install -r dev_requirements.txt
displayName: "Prepare Environment for Generation"
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
- script: |
pylint autorest
displayName: "Pylint"
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
- script: |
mypy autorest
displayName: "Mypy"
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
- script: |
pytest test/unittests
displayName: "Unit tests"
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
- script: pip install -r packages/autorest.python/dev_requirements.txt
displayName: Install Autorest Python dev requirements
- script: |
pip install tox coverage==4.5.4
displayName: "Install Env Specific Reqs in Target PyVersion $(PythonVersion)"
- script: pip install -r packages/cadl-python/dev_requirements.txt
displayName: Install Cadl dev requirements
- script: |
cd $(TestFolder)/azure/legacy
tox -e ci
displayName: 'Execute legacy "azure" Tests - Python $(PythonVersion)'
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
- script: |
cd $(AutorestTestFolder)/azure/version-tolerant
cd $(TestFolder)/azure/version-tolerant
tox -e ci
displayName: Execute Autorest Azure Version Tolerant Tests
displayName: 'Execute version tolerant "azure" Tests - Python $(PythonVersion)'
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
- script: |
cd $(AutorestTestFolder)/vanilla/version-tolerant
cd $(TestFolder)/vanilla/legacy
tox -e ci
displayName: Execute Autorest Vanilla Version Tolerant Tests
displayName: 'Execute legacy "vanilla" Tests - Python $(PythonVersion)'
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
- script: |
cd $(AutorestTestFolder)/dpg/version-tolerant
cd $(TestFolder)/vanilla/version-tolerant
tox -e ci
displayName: Execute Autorest DPG Version Tolerant Tests
displayName: 'Execute version tolerant "vanilla" Tests - Python $(PythonVersion)'
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
- script: |
cd test/mock_api_tests
cd $(TestFolder)/dpg/version-tolerant
tox -e ci
displayName: Execute Cadl Tests
workingDirectory: $(Build.SourcesDirectory)/packages/cadl-python/
displayName: 'Execute version tolerant "dpg" Tests - Python $(PythonVersion)'
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
- script: |
pnpm config set //registry.npmjs.org/:_authToken=$(azure-sdk-npm-token)
NPM_AUTH_TOKEN="$(azure-sdk-npm-token)" pnpm -r publish --access public --no-git-checks
displayName: Publish packages
export RELEASE_VERSION=$(node -p -e "require('./package.json').version")
npm pack
npx publish-release --token $(azuresdk-github-pat) --repo autorest.python --owner azure --name "Autorest for Python v$RELEASE_VERSION" --tag v$RELEASE_VERSION --notes='Release version of Autorest for Python v5' --prerelease --editRelease false --assets autorest-python-$RELEASE_VERSION.tgz --target_commitish $(Build.SourceBranchName)
displayName: "Publish GitHub release"
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
- script: |
echo "//registry.npmjs.org/:_authToken=$(azure-sdk-npm-token)" > ./.npmrc
npm publish --access public
displayName: "Publish to npm"
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/

0 comments on commit 3e84f5f

Please sign in to comment.