From e7c3f3ee36921997953307ffb2445270c38bf1a6 Mon Sep 17 00:00:00 2001 From: James Sandford Date: Tue, 14 Nov 2023 14:12:53 +0000 Subject: [PATCH 1/2] Update enable switch name --- .github/workflows/ci-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 9de2246..7429905 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -49,5 +49,5 @@ jobs: forceDocsUpload: ${{ inputs.forceDocsUpload == true }} pythonVersion: ${{ inputs.pythonVersion || '3.10' }} commontoolingBranch: ${{ inputs.commontoolingBranch || 'main' }} - enableArtifactoryPip: true + enableArtifactory: true secrets: inherit From 26e0e41b7f4fc73c58ec139dec3682fb94d7466b Mon Sep 17 00:00:00 2001 From: James Sandford Date: Tue, 14 Nov 2023 14:53:02 +0000 Subject: [PATCH 2/2] Regen static files --- .github/workflows/shared-ext-ci-workflow.yml | 29 +++++++++----------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/shared-ext-ci-workflow.yml b/.github/workflows/shared-ext-ci-workflow.yml index d4aec1d..5771e87 100644 --- a/.github/workflows/shared-ext-ci-workflow.yml +++ b/.github/workflows/shared-ext-ci-workflow.yml @@ -28,14 +28,15 @@ on: required: false default: '' type: string - enableArtifactoryPip: - description: 'Enable PIP access to artifactory' + enableArtifactory: + description: 'Upload to artifactory instead of PyPi' required: false default: false type: boolean enableUploadDocker: description: 'Enable docker upload step. NOTE: Docker images will only be uploaded if the build is on a tag.' required: false + default: false type: boolean secrets: COMMONTOOLING_DEPLOY_KEY: @@ -121,18 +122,6 @@ jobs: - name: Create pip conf run: touch ${{ github.workspace }}/.pip.conf - - name: ${{ format('{0}Configure Artifactory PIP registry', ((!inputs.enableArtifactoryPip) && 'NOT ENABLED | ' || '') ) }} - if: ${{ inputs.enableArtifactoryPip }} - run: | - touch ${{ github.workspace }}/.pip.conf - cat <> ${{ github.workspace }}/.pip.conf - [global] - extra-index-url = https://${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_TOKEN }}@api.artifactory.labs.bbc/artifactory/api/pypi/ap-python/simple/ - - [search] - extra-index = https://${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_TOKEN }}@api.artifactory.labs.bbc/artifactory/api/pypi/ap-python/ - EOF - ############### ## Run tests ## ############### @@ -162,12 +151,20 @@ jobs: ################################# ## Upload deployable artefacts ## ################################# - - name: Upload wheels - if: ${{ startsWith(env.CHECKOUT_REF, 'refs/tags/') }} + - name: ${{ format('{0}Upload wheels to PyPi', ((inputs.enableArtifactory) && 'NOT ENABLED | ' || '') ) }} + if: ${{ (!inputs.enableArtifactory) && startsWith(env.CHECKOUT_REF, 'refs/tags/') }} uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # v1.8.10 with: skip-existing: true + - name: ${{ format('{0}Upload wheels to Artifactory', ((!inputs.enableArtifactory) && 'NOT ENABLED | ' || '') ) }} + if: ${{ inputs.enableArtifactory && startsWith(env.CHECKOUT_REF, 'refs/tags/') }} + env: + TWINE_REPO: ${{ secrets.ARTIFACTORY_REPO }} + TWINE_REPO_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} + TWINE_REPO_PASSWORD: ${{ secrets.ARTIFACTORY_TOKEN }} + run: make upload-wheels + - name: ${{ format('{0}Upload docker images', ((! inputs.enableUploadDocker) && 'NOT ENABLED | ' || '') ) }} if: ${{ inputs.enableUploadDocker && startsWith(env.CHECKOUT_REF, 'refs/tags/') }} run: make upload-docker