Skip to content

Auto generated from templates by gromit

2bf9ec9
Select commit
Loading
Failed to load commit list.
Open

Add docker images built using FIPS binaries #897

Auto generated from templates by gromit
2bf9ec9
Select commit
Loading
Failed to load commit list.
probelabs / Visor: style succeeded Oct 1, 2025 in 4m 32s

✅ Check Passed (Warnings Found)

style check passed. Found 1 warning, but fail_if condition was not met.

Details

📊 Summary

  • Total Issues: 1
  • Warning Issues: 1

🐛 Issues by Category

🏗️ Architecture (1)

  • ⚠️ ci/goreleaser/goreleaser.yml:25 - The configuration for arm64 and s390x architectures in the builds and dockers sections is heavily duplicated from the existing amd64 configuration. This copy-paste approach increases maintenance overhead, as any future changes to build flags, labels, or file lists must be manually replicated across all architecture-specific blocks. This makes the configuration file verbose, error-prone, and difficult to manage.

Generated by Visor - AI-powered code review

Annotations

Check warning on line 232 in ci/goreleaser/goreleaser.yml

See this annotation in the file changed.

@probelabs probelabs / Visor: style

architecture Issue

The configuration for `arm64` and `s390x` architectures in the `builds` and `dockers` sections is heavily duplicated from the existing `amd64` configuration. This copy-paste approach increases maintenance overhead, as any future changes to build flags, labels, or file lists must be manually replicated across all architecture-specific blocks. This makes the configuration file verbose, error-prone, and difficult to manage.
Raw output
To improve maintainability and reduce redundancy, refactor the `builds` and `dockers` configurations to use GoReleaser's `matrix` feature. A matrix allows you to define a single configuration block that generates multiple builds and Docker images based on a set of variables, such as the target architecture. This will significantly simplify the file and ensure consistency across all builds.

**Example for `builds`:**
```yaml
builds:
  - id: fips
    matrix:
      goarch:
        - amd64
        - arm64
        - s390x
    flags:
      - -tags=fips,boringcrypto
    env:
      - GOEXPERIMENT=boringcrypto
    ldflags:
      - -X github.com/TykTechnologies/tyk-pump/pumps.Version={{.Version}}
      - -X github.com/TykTechnologies/tyk-pump/pumps.Commit={{.FullCommit}}
      - -X github.com/TykTechnologies/tyk-pump/pumps.BuildDate={{.Date}}
      - -X github.com/TykTechnologies/tyk-pump/pumps.BuiltBy=goreleaser
    goos:
      - linux
    binary: tyk-pump
```

**Example for `dockers`:**
```yaml
dockers:
  - matrix:
      goarch:
        - amd64
        - arm64
        - s390x
    ids:
      - fips
    image_templates:
      - "tykio/tyk-pump-fips:{{.Tag}}-fips-{{.Arch}}"
    build_flag_templates:
      - "--platform=linux/{{.Arch}}"
      # ... other flags
    use: buildx
    goos: linux
    dockerfile: ci/Dockerfile.std
    extra_files:
      - "ci/install/"
      - "README.md"
      - "dist/"
      - "LICENSE.md"
      - "pump.example.conf"
```