Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: github action disk usage #1539

Closed
wants to merge 9 commits into from
Closed
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
3 changes: 3 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
self-hosted-runner:
labels:
- Beorn
107 changes: 50 additions & 57 deletions .github/workflows/support-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,33 @@ on:

jobs:
build-support-packages:
runs-on: ubuntu-latest
runs-on: Beorn

steps:
- name: Check disk usage
shell: bash
run: |
set +e
df -k
go env GOCACHE && du -hs "$(go env GOCACHE)" || true
go env GOMODCACHE && du -hs "$(go env GOMODCACHE)" || true
du -ks /* 2>/dev/null
docker system df || true

- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check disk usage
shell: bash
run: |
set +e
df -k
go env GOCACHE && du -hs "$(go env GOCACHE)" || true
go env GOMODCACHE && du -hs "$(go env GOMODCACHE)" || true
du -ks /* 2>/dev/null
docker system df || true

- name: Authenticate with GCP
uses: 'google-github-actions/auth@v1'
with:
Expand All @@ -46,6 +66,16 @@ jobs:
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'

- name: Check disk usage
shell: bash
run: |
set +e
df -k
go env GOCACHE && du -hs "$(go env GOCACHE)" || true
go env GOMODCACHE && du -hs "$(go env GOMODCACHE)" || true
du -ks /* 2>/dev/null
docker system df || true

- uses: ./.github/actions/support-package-metadata
with:
branch-name: ${{ inputs.branch-name }}
Expand All @@ -57,6 +87,16 @@ jobs:
upstream-drivers-bucket: gs://${{ inputs.upstream-drivers-bucket }}
downstream-drivers-bucket: gs://${{ inputs.downstream-drivers-bucket }}

- name: Check disk usage
shell: bash
run: |
set +e
df -k
go env GOCACHE && du -hs "$(go env GOCACHE)" || true
go env GOMODCACHE && du -hs "$(go env GOMODCACHE)" || true
du -ks /* 2>/dev/null
docker system df || true

- name: Create support-packages
run: |
${{ github.workspace }}/kernel-modules/support-packages/04-create-support-packages.sh \
Expand All @@ -78,59 +118,12 @@ jobs:
parent: false
destination: ${{ inputs.support-packages-bucket }}/x86_64

- name: Push support-packages to public bucket
uses: 'google-github-actions/upload-cloud-storage@v1'
if: github.event_name == 'push'
with:
path: /tmp/support-packages/output
parent: false
destination: ${{ inputs.public-support-packages-bucket }}/x86_64

- uses: ./.github/actions/support-package-index
with:
gcp-bucket: ${{ inputs.support-packages-bucket }}
metadata-path: /tmp/support-packages/metadata
output-path: /tmp/support-packages/output

- name: Push index.html
uses: 'google-github-actions/upload-cloud-storage@v1'
with:
path: /tmp/support-packages/output/index.html
parent: false
destination: ${{ inputs.support-packages-index-bucket }}

- name: Push index.html to public bucket
uses: 'google-github-actions/upload-cloud-storage@v1'
if: github.event_name == 'push'
with:
path: /tmp/support-packages/output/index.html
parent: false
destination: ${{ inputs.public-support-packages-bucket }}

- name: Push driver matrix
uses: 'google-github-actions/upload-cloud-storage@v1'
with:
path: /tmp/driver-matrix.json
parent: false
destination: ${{ inputs.support-packages-bucket }}

- name: Push index.html to public bucket
uses: 'google-github-actions/upload-cloud-storage@v1'
if: github.event_name == 'push'
with:
path: /tmp/driver-matrix.json
parent: false
destination: ${{ inputs.public-support-packages-bucket }}

- name: Slack notification
if: failure() && github.event_name == 'push'
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_COLLECTOR_ONCALL_WEBHOOK }}
SLACK_CHANNEL: team-acs-collector-oncall
SLACK_COLOR: ${{ job.status }}
SLACK_LINK_NAMES: true
SLACK_TITLE: Support package job failed
MSG_MINIMAL: actions url,commit
SLACK_MESSAGE: |
@acs-collector-oncall
- name: Check disk usage
shell: bash
run: |
set +e
df -k
go env GOCACHE && du -hs "$(go env GOCACHE)" || true
go env GOMODCACHE && du -hs "$(go env GOMODCACHE)" || true
du -ks /* 2>/dev/null
docker system df || true
Loading