Remove Kitmaker wheel release command from CICD

Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
This commit is contained in:
Keval Morabia
2025-12-18 01:53:53 -08:00
parent 0a66b37772
commit 9ef4ba61bd
3 changed files with 4 additions and 104 deletions
+4 -48
View File
@@ -8,7 +8,7 @@ permissions:
contents: write # Required to upload assets to the release
jobs:
build-upload-verify:
build-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
@@ -17,8 +17,8 @@ jobs:
python-version: "3.12"
- name: Install dependencies
run: pip install tox
# - name: Run basic unit tests
# run: tox -e py312-torch29-tf_latest-unit
- name: Run basic unit tests
run: tox -e py312-torch29-tf_latest-unit
- name: Build Wheel
run: |
tox -e build-wheel
@@ -26,48 +26,4 @@ jobs:
- name: Upload GitHub Release Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} ${{ env.WHEEL_PATH }}
- name: Publish to PyPI via KitMaker
run: |
WHEEL_NAME=$(basename $WHEEL_PATH)
DOWNLOAD_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/${WHEEL_NAME}"
echo "Releasing wheel to Kitmaker Portal..."
echo "URL: $DOWNLOAD_URL"
RESPONSE=$(curl -X POST \
"${{ secrets.KITMAKER_RELEASE_URL }}" \
-H "Authorization: Bearer ${{ secrets.KITMAKER_API_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{
\"project_name\": \"nvidia-modelopt\",
\"payload\": [
{
\"pic\": \"${{ secrets.KITMAKER_PIC_EMAIL }}\",
\"job_type\": \"wheel-release-job\",
\"publish_to\": \"${{ vars.KITMAKER_PUBLISH_TO }}\",
\"url\": \"${DOWNLOAD_URL}\",
\"size\": \"small\",
\"upload\": true
}
]
}")
CURL_EXIT=$?
echo "Curl exit code: $CURL_EXIT"
echo "Release response: $RESPONSE"
# Check if curl succeeded
if [ $CURL_EXIT -ne 0 ]; then
echo "❌ Curl command failed with exit code $CURL_EXIT"
exit 1
fi
# Check if release was successful
if echo "$RESPONSE" | jq -e '.release_uuid' > /dev/null; then
echo "✅ Release created successfully"
else
echo "❌ Release failed - no release_uuid in response"
exit 1
fi
run: gh release upload ${{ github.event.release.tag_name }} ${{ env.WHEEL_PATH }}
-2
View File
@@ -8,8 +8,6 @@ default:
stages: # List of stages for jobs, and their order of execution
- tests
- release
include:
- .gitlab/tests.yml
- .gitlab/release.yml
-54
View File
@@ -1,54 +0,0 @@
# Upload to PyPI. For external releases with KitMaker, we need to check compliance and use jfrog cli
build-and-upload-wheels:
variables:
GIT_DEPTH: 1000 # For correct version naming (e.g. 0.1.dev20) of nightly builds
stage: release
timeout: 15m
tags: [type/docker, os/linux] # Use a runner with these tags
needs: []
rules:
- if: $JET_ONLY != null
when: never
- if: $CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/
variables:
RELEASE: "true"
TWINE_USERNAME: svc-dl-algo-ammo
TWINE_PASSWORD: $ARTIFACTORY_TOKEN # Configured in GitLab > Settings > CI/CD
REPO_URL: https://urm.nvidia.com/artifactory/api/pypi/sw-dl-algo-ammo-pypi-local
- if: $CI_PIPELINE_SOURCE == "schedule"
variables:
RELEASE: "false"
TWINE_USERNAME: gitlab-ci-token
TWINE_PASSWORD: $CI_JOB_TOKEN
REPO_URL: $CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/pypi
script:
- pip install tox
- tox -e build-wheel
# KitMaker compliance checker: https://gitlab-master.nvidia.com/dl/pypi/Wheel-CI-CD/
# - |
# if [[ $RELEASE == "true" ]]; then
# curl -fsSL https://get.docker.com | sh
# docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# docker run --pull=always --rm --network=host \
# -e IGNORE_FAILED_PIP_INSTALL="1" \
# -e EXPECTED_PKG_LICENSE="Apache 2.0" \
# -e SKIPPED_SECURITY_RULES="" \
# -e ALLOWED_NOSEC_COUNT="0" \
# -v dist:/workspace/ \
# gitlab-master.nvidia.com:5005/dl/pypi/wheel-ci-cd:wheeltamer
# fi
- |
set -ex
if [[ $RELEASE == "true" ]]; then
curl -fL https://install-cli.jfrog.io | sh
jf rt upload "dist/*.whl" sw-dl-algo-ammo-pypi-local/nvidia-modelopt/release/$CI_COMMIT_TAG/ \
--url=https://urm.nvidia.com/artifactory --user=$TWINE_USERNAME --password=$TWINE_PASSWORD \
--target-props="component_name=nvidia-modelopt;os=any;arch=any;version=$CI_COMMIT_TAG;branch=release;release_approver=kmorabia;release_status=ready" \
--flat --detailed-summary
else
pip install twine
twine upload --repository-url $REPO_URL dist/*.whl
fi
artifacts:
paths:
- dist/