Skip to content
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: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10

- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
with:
go-version-file: "go.mod"
cache: true
Expand All @@ -46,7 +46,7 @@ jobs:
run: go mod verify

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v8
uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee
with:
version: ${{ env.GOLANGCI_VERSION }}

Expand All @@ -55,10 +55,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10

- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
with:
go-version-file: "go.mod"
cache: true
Expand All @@ -80,16 +80,16 @@ jobs:
needs: [lint, test]
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
with:
fetch-depth: 0 # Fetch all history for proper tagging

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5

- name: Log in to Docker Hub
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_image == 'true')
uses: docker/login-action@v4
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
fi

- name: Build and push Docker image
uses: docker/build-push-action@v7
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf
with:
context: .
file: ./Dockerfile
Expand Down
74 changes: 37 additions & 37 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: "CodeQL Analysis"

on:
push:
branches: [ main, master ]
branches: [main, master]
pull_request:
branches: [ main, master ]
branches: [main, master]
schedule:
- cron: '0 6 * * 1' # Run every Monday at 6 AM UTC
- cron: "0 6 * * 1" # Run every Monday at 6 AM UTC

jobs:
analyze:
Expand All @@ -20,39 +20,39 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
language: ["go"]

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up Go
if: matrix.language == 'go'
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache: true

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
queries: security-extended,security-and-quality

- name: Download dependencies
if: matrix.language == 'go'
run: go mod download

- name: Generate manifests and code
if: matrix.language == 'go'
run: |
make manifests
make generate

- name: Autobuild
uses: github/codeql-action/autobuild@v4

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10

- name: Set up Go
if: matrix.language == 'go'
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
with:
go-version-file: "go.mod"
cache: true

- name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
with:
languages: ${{ matrix.language }}
queries: security-extended,security-and-quality

- name: Download dependencies
if: matrix.language == 'go'
run: go mod download

- name: Generate manifests and code
if: matrix.language == 'go'
run: |
make manifests
make generate

- name: Autobuild
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
with:
category: "/language:${{matrix.language}}"
96 changes: 48 additions & 48 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,70 @@ name: E2E Tests

on:
push:
branches: [ main, master ]
branches: [main, master]
pull_request:
branches: [ main, master ]
branches: [main, master]
workflow_dispatch: # Allow manual triggering

jobs:
e2e-test:
name: End-to-End Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache: true
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
with:
go-version-file: "go.mod"
cache: true

- name: Download dependencies
run: go mod download
- name: Download dependencies
run: go mod download

- name: Set up Kind
uses: helm/kind-action@v1.14.0
with:
version: v0.20.0
kubectl_version: v1.30.0
cluster_name: kind
- name: Set up Kind
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc
with:
version: v0.20.0
kubectl_version: v1.30.0
cluster_name: kind

- name: Wait for cluster to be ready
run: |
kubectl cluster-info
kubectl wait --for=condition=Ready nodes --all --timeout=300s
- name: Wait for cluster to be ready
run: |
kubectl cluster-info
kubectl wait --for=condition=Ready nodes --all --timeout=300s

- name: Generate manifests and code
run: |
make manifests
make generate
- name: Generate manifests and code
run: |
make manifests
make generate

- name: Build manager binary
run: make build
- name: Build manager binary
run: make build

- name: Build Docker image
run: |
docker build -t controller:latest .
- name: Build Docker image
run: |
docker build -t controller:latest .

- name: Load image into Kind
run: |
kind load docker-image controller:latest
- name: Load image into Kind
run: |
kind load docker-image controller:latest

- name: Install CRDs
run: make install
- name: Install CRDs
run: make install

# we can't run e2e tests without a containerized storagegrid instance
# if you work at NetApp and have access to a StorageGrid docker license, please contact us to help set this up
# - name: Run E2E tests
# run: make test-e2e
# we can't run e2e tests without a containerized storagegrid instance
# if you work at NetApp and have access to a StorageGrid docker license, please contact us to help set this up
# - name: Run E2E tests
# run: make test-e2e

- name: Collect logs on failure
if: failure()
run: |
echo "=== Cluster Info ==="
kubectl cluster-info dump
echo "=== All Pod Logs ==="
kubectl logs --all-containers=true --prefix=true --previous=false -l app.kubernetes.io/name=storagegrid-operator || echo "No operator pods found"
echo "=== All Events ==="
kubectl get events --all-namespaces --sort-by='.lastTimestamp'
- name: Collect logs on failure
if: failure()
run: |
echo "=== Cluster Info ==="
kubectl cluster-info dump
echo "=== All Pod Logs ==="
kubectl logs --all-containers=true --prefix=true --previous=false -l app.kubernetes.io/name=storagegrid-operator || echo "No operator pods found"
echo "=== All Events ==="
kubectl get events --all-namespaces --sort-by='.lastTimestamp'
Loading