Skip to content

Commit

Permalink
more artifact download/etc testing
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneknapp committed Jul 23, 2024
1 parent 38be14d commit c7f94d6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/open-datahub-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,14 @@ jobs:
env:
HUB: ${{ vars.HUB }}
IMAGE: ${{ vars.IMAGE }}

outputs:
artifact-downloaded: ${{ steps.download-artifact.outputs.test-artifact }}
steps:
- name: cleanup disk space
run: |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
df -h
- name: Generate the image name
run: |
IMAGE="ucb-datahub-2018/user-images/${HUB}-user-image"
echo "IMAGE=$IMAGE" >> $GITHUB_ENV
- name: Test if vars works
run: |
echo "with vars:"
Expand All @@ -40,6 +36,32 @@ jobs:
echo "Free space:"
df -h
- name: download artifact with image tag
uses: actions/download-artifact@v4
with:
name: image-tag.txt
path: ./

- name: sanity check on downloaded artifact
run: |
ls -la
cat image-tag.txt
- name: test if image-tag.txt was downloaded
id: test-artifact
run: |
if test -f image-tag.txt; then
echo "::set-output name=artifact-downloaded::true"
else
echo "::set-output name=artifact-downloaded::false"
fi
- name: Parse image tag
if: steps.test-artifact.outputs.artifact-downloaded == 'true'
run: |
IMAGE_TAG=$(cat image-tag.txt)
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
- name: Checkout files in repo
uses: actions/checkout@v4
with:
Expand All @@ -48,17 +70,13 @@ jobs:
hub/
deployments/${HUB}
- name: download artifact with image tag
uses: actions/download-artifact@v4
with:
name: image-tag.txt
path: ./

- name: see if the correct dir has been checked out, and the requirements have been installed
run: |
ls -la
tree
# Lets us monitor disks getting full as images get bigger over time
- name: Show how much disk space is left
run: df -h
1 change: 0 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
echo "$CHANGED_FILES"
- name: Build and test the image if any image file(s) changed
id: build-and-test
if: steps.changed-files.outputs.any_changed == 'true'
uses: jupyterhub/repo2docker-action@master
with:
Expand Down

0 comments on commit c7f94d6

Please sign in to comment.