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

export logs via workflow #3927

Merged
merged 2 commits into from
Dec 30, 2024
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
18 changes: 17 additions & 1 deletion .github/workflows/e2e_parallel_jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,20 @@ jobs:

- name: Run E2E Tests
run: |
make e2e-test-jobp CC=/usr/local/musl/bin/musl-gcc
make e2e-test-jobp CC=/usr/local/musl/bin/musl-gcc

- name: export logs for e2e parallel jobs
if: failure()
run: |
export ARTIFACTS_PATH=${{ github.workspace }}/e2e-parallel-jobs-logs
mkdir -p $ARTIFACTS_PATH

kdir -p $ARTIFACTS_PATH/integration
kind export logs --name=integration $ARTIFACTS_PATH/integration

- name: upload e2e parallel jobs logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: volcano_e2e_parallel_jobs_logs
path: ${{ github.workspace }}/e2e-parallel-jobs-logs
18 changes: 17 additions & 1 deletion .github/workflows/e2e_scheduling_actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,20 @@ jobs:

- name: Run E2E Tests
run: |
make e2e-test-schedulingaction CC=/usr/local/musl/bin/musl-gcc
make e2e-test-schedulingaction CC=/usr/local/musl/bin/musl-gcc

- name: export logs for e2e scheduling actions
if: failure()
run: |
export ARTIFACTS_PATH=${{ github.workspace }}/e2e-scheduling-actions-logs
mkdir -p $ARTIFACTS_PATH

kdir -p $ARTIFACTS_PATH/integration
kind export logs --name=integration $ARTIFACTS_PATH/integration

- name: upload e2e scheduling actions logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: volcano_e2e_scheduling_actions_logs
path: ${{ github.workspace }}/e2e-scheduling-actions-logs
16 changes: 16 additions & 0 deletions .github/workflows/e2e_scheduling_basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,19 @@ jobs:
- name: Run E2E Tests
run: |
make e2e-test-schedulingbase CC=/usr/local/musl/bin/musl-gcc

- name: export logs for e2e scheduling basic
if: failure()
run: |
export ARTIFACTS_PATH=${{ github.workspace }}/e2e-scheduling-basic-logs
mkdir -p $ARTIFACTS_PATH

kdir -p $ARTIFACTS_PATH/integration
kind export logs --name=integration $ARTIFACTS_PATH/integration

- name: upload e2e scheduling basic logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: volcano_e2e_scheduling_basic_logs
path: ${{ github.workspace }}/e2e-scheduling-basic-logs
18 changes: 17 additions & 1 deletion .github/workflows/e2e_sequence.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,20 @@ jobs:

- name: Run E2E Tests
run: |
make e2e-test-jobseq CC=/usr/local/musl/bin/musl-gcc
make e2e-test-jobseq CC=/usr/local/musl/bin/musl-gcc

- name: export logs for e2e sequence
if: failure()
run: |
export ARTIFACTS_PATH=${{ github.workspace }}/e2e-sequence-logs
mkdir -p $ARTIFACTS_PATH

kdir -p $ARTIFACTS_PATH/integration
kind export logs --name=integration $ARTIFACTS_PATH/integration

- name: upload e2e sequence logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: volcano_e2e_sequence_logs
path: ${{ github.workspace }}/e2e-sequence-logs
16 changes: 16 additions & 0 deletions .github/workflows/e2e_spark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,19 @@ jobs:
if: always()
run: |
minikube delete

- name: export logs for e2e spark
if: failure()
run: |
export ARTIFACTS_PATH=${{ github.workspace }}/e2e-spark-logs
mkdir -p $ARTIFACTS_PATH

kdir -p $ARTIFACTS_PATH/integration
kind export logs --name=integration $ARTIFACTS_PATH/integration

- name: upload e2e spark logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: volcano_e2e_spark_logs
path: ${{ github.workspace }}/e2e-spark-logs
18 changes: 17 additions & 1 deletion .github/workflows/e2e_vcctl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,20 @@ jobs:

- name: Run E2E Tests
run: |
make e2e-test-vcctl CC=/usr/local/musl/bin/musl-gcc
make e2e-test-vcctl CC=/usr/local/musl/bin/musl-gcc

- name: export logs for e2e vcctl
if: failure()
run: |
export ARTIFACTS_PATH=${{ github.workspace }}/e2e-vcctl-logs
mkdir -p $ARTIFACTS_PATH

kdir -p $ARTIFACTS_PATH/integration
kind export logs --name=integration $ARTIFACTS_PATH/integration

- name: upload e2e vcctl logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: volcano_e2e_vcctl_logs
path: ${{ github.workspace }}/e2e-vcctl-logs
16 changes: 2 additions & 14 deletions hack/run-e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,6 @@ function generate-log {
kubectl logs deployment/${CLUSTER_NAME}-scheduler -n ${NAMESPACE} > volcano-scheduler.log
}

function show-log() {
log_files=("volcano-admission.log" "volcano-controller.log" "volcano-scheduler.log")
for log_file in "${log_files[@]}"; do
if [ -f "$log_file" ]; then
echo "Showing ${log_file}..."
cat "$log_file"
else
echo "${log_file} not found"
fi
done
}


# clean up
function cleanup {
uninstall-volcano
Expand All @@ -89,7 +76,8 @@ function cleanup {
kind delete cluster ${CLUSTER_CONTEXT}

if [[ ${SHOW_VOLCANO_LOGS} -eq 1 ]]; then
show-log
#TODO: Add volcano logs support in future.
echo "Volcano logs are currently not supported."
fi
}

Expand Down
Loading