Skip to content

Remove PR trigger from Docker workflow #10

Remove PR trigger from Docker workflow

Remove PR trigger from Docker workflow #10

Workflow file for this run

# name: Helm Test
#
# on:
# push:
# branches: [main]
# paths:
# - 'manifests/**'
# - 's3proxy/**'
# - 'Dockerfile'
# - '.github/workflows/helm-test.yml'
# pull_request:
# branches: [main]
# paths:
# - 'manifests/**'
# - 's3proxy/**'
# - 'Dockerfile'
# - '.github/workflows/helm-test.yml'
# workflow_dispatch:
#
# jobs:
# helm-test:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v6.0.2
#
# - name: Create Kind cluster
# uses: helm/kind-action@v1.13.0
# with:
# cluster_name: s3proxy-test
#
# - name: Install Helm
# uses: azure/setup-helm@v4.3.1
#
# - name: Add Helm repos and update dependencies
# run: |
# helm repo add dandydev https://dandydeveloper.github.io/charts
# helm repo update
# helm dependency update ./manifests
#
# - name: Build and load image
# run: |
# docker build -t s3proxy-python:latest .
# kind load docker-image s3proxy-python:latest --name s3proxy-test
#
# - name: Install Helm chart
# run: |
# helm upgrade --install s3proxy ./manifests \
# -n s3proxy --create-namespace \
# --set image.repository=s3proxy-python \
# --set image.tag=latest \
# --wait --timeout 300s
#
# - name: Wait for pods
# run: |
# kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=s3proxy-python -n s3proxy --timeout=120s
# kubectl wait --for=condition=ready pod -l release=s3proxy -n s3proxy --timeout=180s || true
# kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=s3proxy-python-minio -n s3proxy --timeout=120s
#
# - name: Show deployment status
# run: |
# kubectl get all -n s3proxy
# kubectl get pods -n s3proxy -o wide
#
# - name: Test health endpoint
# run: |
# kubectl run curl-test --image=curlimages/curl --rm -it --restart=Never -n s3proxy -- \
# curl -sf http://s3proxy-python:4433/healthz
# echo "Health check passed!"
#
# - name: Run load test
# run: |
# kubectl run s3-load-test -n s3proxy --rm -it --restart=Never \
# --image=amazon/aws-cli:latest \
# --env="AWS_ACCESS_KEY_ID=minioadmin" \
# --env="AWS_SECRET_ACCESS_KEY=minioadmin" \
# --env="AWS_DEFAULT_REGION=us-east-1" \
# --command -- /bin/sh -c "
# # Create test bucket
# echo 'Creating test bucket...'
# aws --endpoint-url http://s3proxy-python:4433 s3 mb s3://ci-test-bucket 2>/dev/null || true
#
# # Generate test files (smaller for CI)
# echo 'Generating 64MB test files...'
# mkdir -p /tmp/testfiles
# for i in 1 2 3; do
# dd if=/dev/urandom of=/tmp/testfiles/file-\$i.bin bs=1M count=64 2>/dev/null &
# done
# wait
# echo 'Files generated'
# ls -lh /tmp/testfiles/
#
# # Upload concurrently
# echo ''
# echo '=== Starting concurrent uploads ==='
# START=\$(date +%s)
#
# for i in 1 2 3; do
# aws --endpoint-url http://s3proxy-python:4433 s3 cp /tmp/testfiles/file-\$i.bin s3://ci-test-bucket/file-\$i.bin &
# done
# wait
#
# END=\$(date +%s)
# DURATION=\$((END - START))
# echo ''
# echo \"=== Upload complete in \${DURATION}s ===\"
#
# # Verify uploads
# echo ''
# echo '=== Listing uploaded files ==='
# aws --endpoint-url http://s3proxy-python:4433 s3 ls s3://ci-test-bucket/
#
# # Download and verify
# echo ''
# echo '=== Downloading files to verify ==='
# mkdir -p /tmp/downloads
# for i in 1 2 3; do
# aws --endpoint-url http://s3proxy-python:4433 s3 cp s3://ci-test-bucket/file-\$i.bin /tmp/downloads/file-\$i.bin &
# done
# wait
#
# echo ''
# echo '=== Comparing checksums ==='
# md5sum /tmp/testfiles/*.bin > /tmp/orig.md5
# md5sum /tmp/downloads/*.bin > /tmp/down.md5
#
# ORIG_SUMS=\$(cat /tmp/orig.md5 | while read sum name; do echo \$sum; done | sort)
# DOWN_SUMS=\$(cat /tmp/down.md5 | while read sum name; do echo \$sum; done | sort)
#
# cat /tmp/orig.md5
# echo ''
# if [ \"\$ORIG_SUMS\" = \"\$DOWN_SUMS\" ]; then
# echo 'All checksums match - encryption/decryption working!'
# else
# echo 'Checksum mismatch!'
# exit 1
# fi
# "
#
# - name: Show pod logs on failure
# if: failure()
# run: |
# echo "=== S3Proxy Logs ==="
# kubectl logs -l app.kubernetes.io/name=s3proxy-python -n s3proxy --tail=100 || true
# echo ""
# echo "=== Redis HA Logs ==="
# kubectl logs -l release=s3proxy -n s3proxy --tail=50 || true
# echo ""
# echo "=== Events ==="
# kubectl get events -n s3proxy --sort-by=.lastTimestamp | tail -20 || true
#
# - name: Cleanup
# if: always()
# run: |
# kind delete cluster --name s3proxy-test