Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/cross_version_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
PYBATFISH_TEST_PYPI_TOKEN: ${{ secrets.PYBATFISH_TEST_PYPI_TOKEN }}
PYBATFISH_PYPI_TOKEN: ${{ secrets.PYBATFISH_PYPI_TOKEN }}
BATFISH_DOCKER_LOGIN_TOKEN: ${{ secrets.BATFISH_DOCKER_LOGIN_TOKEN }}
PYBATFISH_DEPLOY_KEY_FOR_PUSHING_RELEASE_BRANCH: ${{ secrets.PYBATFISH_DEPLOY_KEY_FOR_PUSHING_RELEASE_BRANCH }}

# Validate the uploaded test artifacts with lab-validation
lab_validation:
Expand Down Expand Up @@ -98,6 +99,7 @@ jobs:
PYBATFISH_TEST_PYPI_TOKEN: ${{ secrets.PYBATFISH_TEST_PYPI_TOKEN }}
PYBATFISH_PYPI_TOKEN: ${{ secrets.PYBATFISH_PYPI_TOKEN }}
BATFISH_DOCKER_LOGIN_TOKEN: ${{ secrets.BATFISH_DOCKER_LOGIN_TOKEN }}
PYBATFISH_DEPLOY_KEY_FOR_PUSHING_RELEASE_BRANCH: ${{ secrets.PYBATFISH_DEPLOY_KEY_FOR_PUSHING_RELEASE_BRANCH }}

# Send Slack notification on failure for scheduled or post-merge jobs on master branch
notify_slack_on_failure:
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/reusable-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ on:
required: true
BATFISH_DOCKER_LOGIN_TOKEN:
required: true
PYBATFISH_DEPLOY_KEY_FOR_PUSHING_RELEASE_BRANCH:
required: false # only used by prod_whl_upload, which only runs when queue_prod_release is true

env:
BATFISH_DOCKER_LOGIN_USERNAME: batfishbuildkitebot
Expand Down Expand Up @@ -234,8 +236,6 @@ jobs:
prod_whl_upload:
if: inputs.queue_prod_release && inputs.BATFISH_GITHUB_BATFISH_REPO == 'batfish/batfish' && inputs.BATFISH_GITHUB_PYBATFISH_REPO == 'batfish/pybatfish'
environment: Release Pybatfish
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Download pybf whl
Expand All @@ -246,14 +246,22 @@ jobs:
run: |
mkdir dist
mv pybatfish*.whl dist/
- name: Configure SSH for pybatfish deploy key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.PYBATFISH_DEPLOY_KEY_FOR_PUSHING_RELEASE_BRANCH }}" > ~/.ssh/pybatfish_deploy_key
chmod 600 ~/.ssh/pybatfish_deploy_key
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Checkout pybf repo
uses: actions/checkout@v7
with:
repository: "${{ inputs.BATFISH_GITHUB_PYBATFISH_REPO }}"
path: pybatfish
ref: "${{ inputs.BATFISH_GITHUB_PYBATFISH_REF }}"
token: ${{ github.token }}
ssh-key: ${{ secrets.PYBATFISH_DEPLOY_KEY_FOR_PUSHING_RELEASE_BRANCH }}
- name: Push test branch
env:
GIT_SSH_COMMAND: "ssh -i ~/.ssh/pybatfish_deploy_key -o IdentitiesOnly=yes"
run: |
cd pybatfish
sed -i.bak -e "s/^__version__ = .*$/__version__ = \"${{ inputs.bf_version }}\"/" pybatfish/__init__.py
Expand Down