Skip to content

Commit

Permalink
atom nightly job add
Browse files Browse the repository at this point in the history
Signed-off-by: Barak Davidov <[email protected]>
  • Loading branch information
barakda committed Jan 22, 2025
1 parent cbb9920 commit 5023579
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 18 deletions.
46 changes: 30 additions & 16 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ jobs:
atom:
needs: [build, build-ceph]
if: github.repository == 'ceph/ceph-nvmeof'
if: github.repository == 'ceph/ceph-nvmeof' && github.event_name == 'schedule'
runs-on: atomRunner
steps:
- name: Checkout code
Expand All @@ -666,37 +666,51 @@ jobs:
merge-multiple: true

- name: Cluster build and Atom tests run
if: always() && github.event_name != 'schedule'
if: always()
run: |
. .env
ACTION_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
./tests/atom/clusterBuildTestsRun.sh $NVMEOF_VERSION $CEPH_SHA $ATOM_SHA $ACTION_URL
- name: Cluster build and Atom nightly tests run
if: always() && github.event_name == 'schedule'
run: |
. .env
ACTION_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
./tests/atom/clusterBuildTestsRun.sh $NVMEOF_VERSION $CEPH_SHA $ATOM_SHA $ACTION_URL 'nightly'
- name: Atom artifact build
if: always() && github.event_name != 'schedule'
if: always()
run: ./tests/atom/cpArtifactAndCleanup.sh

- name: Atom artifact build nightly
if: always() && github.event_name == 'schedule'
run: ./tests/atom/cpArtifactAndCleanup.sh 'nightly'

- name: Upload artifact for non-schedule events
uses: actions/upload-artifact@v4
if: always() && github.event_name != 'schedule'
if: always()
with:
name: atom-artifact
path: /home/cephnvme/artifact_m6.tar.gz

atom-nightly:
needs: [build, build-ceph]
if: github.repository == 'ceph/ceph-nvmeof' && github.event_name != 'schedule'
runs-on: atomRunnerNightly
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download container images
uses: actions/download-artifact@v4
with:
pattern: container_images_nvmeof
merge-multiple: true

- name: Cluster build and Atom nightly tests run
if: always()
run: |
. .env
ACTION_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
./tests/atom/clusterBuildTestsRun.sh $NVMEOF_VERSION $CEPH_SHA $ATOM_SHA $ACTION_URL 'nightly'
- name: Atom artifact build nightly
if: always()
run: ./tests/atom/cpArtifactAndCleanup.sh 'nightly'

- name: Upload artifact for schedule events
uses: actions/upload-artifact@v4
if: always() && github.event_name == 'schedule'
if: always()
with:
name: atom-artifact
path: /home/cephnvme/artifact_m7.tar.gz
Expand Down
3 changes: 1 addition & 2 deletions tests/atom/clusterBuildTestsRun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ set -e

VERSION=$1
if [ "$2" = "latest" ]; then
# CEPH_SHA=$(curl -s https://shaman.ceph.com/api/repos/ceph/main/latest/centos/9/ | jq -r ".[] | select(.archs[] == \"$(uname -m)\" and .status == \"ready\") | .sha1")
CEPH_SHA=b5c07ab4f77bffd19c88ef47141176982670de94
CEPH_SHA=$(curl -s https://shaman.ceph.com/api/repos/ceph/main/latest/centos/9/ | jq -r ".[] | select(.archs[] == \"$(uname -m)\" and .status == \"ready\") | .sha1")
else
CEPH_SHA=$2
fi
Expand Down

0 comments on commit 5023579

Please sign in to comment.