-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #420 from solarwinds/NH-89339-add-rl-scans
NH-89339 Add RL scanning to PyPI/TestPyPI publishes
- Loading branch information
Showing
9 changed files
with
388 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# © 2024 SolarWinds Worldwide, LLC. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. | ||
|
||
name: Build aarch64 | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
type: string | ||
required: true | ||
description: 'APM Python version, e.g. 2.1.0' | ||
outputs: | ||
artifact-name: | ||
description: 'Name of zip archive of sdist and wheels' | ||
value: ${{ jobs.build_aarch64.outputs.artifact-name }} | ||
|
||
jobs: | ||
build_aarch64: | ||
name: Build aarch64 | ||
runs-on: | ||
group: apm-arm-runner | ||
outputs: | ||
artifact-name: scan-aarch64-${{ inputs.version }}.zip | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build aarch64 | ||
uses: ./.github/actions/package_solarwinds_apm_aarch64 | ||
- name: Package sdist and wheels for upload | ||
run: zip -r scan-aarch64-${{ inputs.version }}.zip dist/* | ||
- uses: actions/upload-artifact@v4 | ||
name: Upload zip for scan and publish | ||
with: | ||
name: scan-aarch64-${{ inputs.version }}.zip | ||
path: scan-aarch64-${{ inputs.version }}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# © 2024 SolarWinds Worldwide, LLC. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. | ||
|
||
name: Build sdist and x86_64 | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
type: string | ||
required: true | ||
description: 'APM Python version, e.g. 2.1.0' | ||
outputs: | ||
artifact-name: | ||
description: 'Name of zip archive of sdist and wheels' | ||
value: ${{ jobs.build_sdist_and_x86_64.outputs.artifact-name }} | ||
|
||
jobs: | ||
build_sdist_and_x86_64: | ||
name: Build sdist and x86_64 | ||
runs-on: ubuntu-latest | ||
outputs: | ||
artifact-name: scan-x86_64-${{ inputs.version }}.zip | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build sdist and x86_64 | ||
uses: ./.github/actions/package_solarwinds_apm_x86_64 | ||
- name: Package sdist and wheels for upload | ||
run: zip -r scan-x86_64-${{ inputs.version }}.zip dist/* | ||
- uses: actions/upload-artifact@v4 | ||
name: Upload zip for scan and publish | ||
with: | ||
name: scan-x86_64-${{ inputs.version }}.zip | ||
path: scan-x86_64-${{ inputs.version }}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# © 2024 SolarWinds Worldwide, LLC. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. | ||
|
||
name: Get APM Python version | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
sw-apm-version: | ||
description: 'APM Python version, e.g. 2.1.0' | ||
value: ${{ jobs.get_apm_python_version.outputs.SW_APM_VERSION }} | ||
|
||
jobs: | ||
get_apm_python_version: | ||
name: Get APM Python version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
SW_APM_VERSION: ${{ steps.save-apm-python-version.outputs.SW_APM_VERSION }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: grep version from Python src | ||
id: save-apm-python-version | ||
run: | | ||
echo "SW_APM_VERSION=$(grep __version__ ./solarwinds_apm/version.py | cut -d= -f 2 | tr -d ' "')" >> $GITHUB_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# © 2024 SolarWinds Worldwide, LLC. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. | ||
|
||
name: Publish aarch64 | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
artifact-name: | ||
type: string | ||
required: true | ||
description: 'Name of zip archive of sdist and wheels' | ||
repository-name: | ||
type: string | ||
required: false | ||
description: "testpypi or pypi" | ||
|
||
jobs: | ||
publish_aarch64: | ||
runs-on: | ||
group: apm-arm-runner | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
- name: Unzip artifact with dist | ||
run: unzip ${{ inputs.artifact-name }} | ||
- name: Install Twine | ||
run: pip install --upgrade --no-cache-dir --prefer-binary twine | ||
- name: Check distribution artifacts | ||
run: twine check dist/* | ||
- if: ${{ inputs.repository-name == 'testpypi' }} | ||
name: Publish aarch64 wheels to TestPyPI | ||
env: | ||
TWINE_NON_INTERACTIVE: 1 | ||
TWINE_REPOSITORY: testpypi | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.SW_APM_TESTPYPI_UPLOAD_TOKEN }} | ||
run: twine upload dist/*.whl | ||
- if: ${{ inputs.repository-name == 'pypi' }} | ||
name: Publish aarch64 wheels to PyPI | ||
env: | ||
TWINE_NON_INTERACTIVE: 1 | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.SW_APM_PYPI_UPLOAD_TOKEN }} | ||
run: twine upload dist/*.whl |
Oops, something went wrong.