Skip to content

Fix release pipelines to pick up latest Go patch TT-16060#7503

Closed
Razeen-Abdal-Rahman wants to merge 13 commits intorelease-5.8from
releng/release-5.8-TT-16060
Closed

Fix release pipelines to pick up latest Go patch TT-16060#7503
Razeen-Abdal-Rahman wants to merge 13 commits intorelease-5.8from
releng/release-5.8-TT-16060

Conversation

@Razeen-Abdal-Rahman
Copy link
Copy Markdown
Contributor

@Razeen-Abdal-Rahman Razeen-Abdal-Rahman commented Nov 4, 2025

User description

Go version for release pipelines updated to 1.24-bookworm.
Other changes from gromit carried over:

  • .github/workflows/release.yml upgrade tests (logic added for handling scenarios where no previous version is available, used for new product launches) and steps to push docker images for fips
  • ci/Dockerfile updated to fix bugs when building locally
  • ci/goreleaser/goreleaser.yml properly imports env value for fips and adds docker builds to goreleaser for local testing, these are skipped in pipeline runs
  • ci/install/post_install.sh fix reversed logic and add handling if config file doesn't exist

Description

All versions of golang in the relese.yml file have been updated from 1.24-bullseye to 1.24-bookworm

Related Issue

Jira ticket: TT-16060

Motivation and Context

This update is required so the CI pipeline can pick up the latest Go patch, which addresses newly reported CVEs in stdlib

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adds test coverage to functionality)

Checklist

  • I ensured that the documentation is up to date
  • I explained why this PR updates go.mod in detail with reasoning why it's required
  • I would like a code coverage CI quality gate exception and have explained why

PR Type

Bug fix, Enhancement


Description

  • Switch Go cross image to 1.24-bookworm

  • Add FIPS image build and publishing

  • Fix post-install cleanup and chmod safety

  • Improve upgrade tests handling no previous version


Diagram Walkthrough

flowchart LR
  ReleaseYML[".github/workflows/release.yml"]
  PostInstall["ci/install/post_install.sh"]
  DockerfileStd["ci/Dockerfile.std"]
  GoReleaser["ci/goreleaser/goreleaser.yml"]

  ReleaseYML -- "update matrix to 1.24-bookworm" --> ReleaseYML
  ReleaseYML -- "push ee/std/fips images" --> GoReleaser
  GoReleaser -- "define ee/std/fips images + manifests" --> DockerfileStd
  PostInstall -- "fix service cleanup, safe chmod" --> DockerfileStd
  ReleaseYML -- "resilient upgrade tests" --> ReleaseYML
Loading

File Walkthrough

Relevant files
Bug fix
post_install.sh
Fix post-install cleanup and safe permissions                       

ci/install/post_install.sh

  • Correct service file removal logic
  • Chmod only if config exists
+4/-4     
Enhancement
release.yml
Release workflow updates and FIPS publishing                         

.github/workflows/release.yml

  • Use golang_cross 1.24-bookworm
  • Add FIPS image CI/prod builds
  • Skip docker in goreleaser step
  • Make upgrade tests resilient to no previous
+82/-14 
Dockerfile.std
Standard image: install flow and cleanup                                 

ci/Dockerfile.std

  • Install package from dist with TARGETARCH
  • Improve cleanup of apt/cache/logs
+5/-5     
goreleaser.yml
GoReleaser: add docker images and manifests                           

ci/goreleaser/goreleaser.yml

  • Set GOEXPERIMENT=boringcrypto for FIPS
  • Add docker builds for ee/std/fips
  • Define multi-arch/manifest publishing
+248/-1 
Tests
tests sections in release workflow (embedded Dockerfile generation)
Upgrade test robustness for fresh installs                             

ci/tests sections in release workflow (embedded Dockerfile generation)

  • Continue if repo setup fails
  • Allow fresh install when no previous

Ticket Details

TT-16060
Status In Dev
Summary Fix release pipelines to pick up latest Go patch

Generated at: 2025-11-05 13:30:41

@Razeen-Abdal-Rahman Razeen-Abdal-Rahman self-assigned this Nov 4, 2025
@Razeen-Abdal-Rahman Razeen-Abdal-Rahman requested a review from a team as a code owner November 4, 2025 10:17
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 4, 2025

API Changes

no api changes detected

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 4, 2025

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Possible Issue

The cleanup logic was inverted to remove SysV init when systemd is used and remove the systemd unit otherwise. Verify this matches supported platforms; on non-systemd systems the systemd unit path (/lib/systemd/system/tyk-gateway.service) may not exist or differ, but rm -f hides errors. Ensure no required service file is removed inadvertently during upgrades.

if [ "${use_systemctl}" = "True" ]; then
    rm -f /etc/init.d/tyk-gateway
else
    rm -f /lib/systemd/system/tyk-gateway.service
fi
CI Behavior Change

The goreleaser command in CI now skips docker builds for snapshots and all docker steps are gated on 1.24-bookworm. Confirm that all intended release paths (including tags) still build/push images for ee/std/fips and that added fips tags outputs are correctly consumed by later steps.

echo '#!/bin/sh
ci/bin/unlock-agent.sh
git config --global url."https://${{ secrets.ORG_GH_TOKEN }}@github.com".insteadOf "https://github.com"
git config --global --add safe.directory /go/src/github.com/TykTechnologies/tyk
goreleaser release --clean -f ${{ matrix.goreleaser }} ${{ !startsWith(github.ref, 'refs/tags/') && ' --snapshot --skip=sign,docker' || '--skip=docker' }}' | tee /tmp/build.sh
chmod +x /tmp/build.sh
docker run --rm --privileged -e GITHUB_TOKEN=${{ github.token }} \
-e GOPRIVATE=github.com/TykTechnologies                                \
-e DEBVERS='${{ matrix.debvers }}'                               \
Config Consistency

Added GOEXPERIMENT=boringcrypto for fips and extensive docker/manifests sections. Validate that template tags, architectures, and image names align with downstream consumers and that dist/ paths exist at goreleaser runtime to avoid missing file errors.

    flags:
      - -tags=goplugin,fips,boringcrypto
    env:
      - NOP=nop # ignore this, it is jsut to avoid a complex conditional in the templates
      - CC=gcc
      - GOEXPERIMENT=boringcrypto
    ldflags:
      - -X github.com/TykTechnologies/tyk/internal/build.Version={{.Version}}
      - -X github.com/TykTechnologies/tyk/internal/build.Commit={{.FullCommit}}
      - -X github.com/TykTechnologies/tyk/internal/build.BuildDate={{.Date}}
      - -X github.com/TykTechnologies/tyk/internal/build.BuiltBy=goreleaser
    goos:
      - linux
    goarch:
      - amd64
    binary: tyk
  - id: std-amd64
    flags:
      - -tags=goplugin
      - -trimpath
    env:
      - NOP=nop # ignore this, it is jsut to avoid a complex conditional in the templates
      - CC=gcc
    ldflags:
      - -X github.com/TykTechnologies/tyk/internal/build.Version={{.Version}}
      - -X github.com/TykTechnologies/tyk/internal/build.Commit={{.FullCommit}}
      - -X github.com/TykTechnologies/tyk/internal/build.BuildDate={{.Date}}
      - -X github.com/TykTechnologies/tyk/internal/build.BuiltBy=goreleaser
    goos:
      - linux
    goarch:
      - amd64
    binary: tyk
  - id: std-arm64
    flags:
      - -tags=goplugin
      - -trimpath
    env:
      - NOP=nop # ignore this, it is jsut to avoid a complex conditional in the templates
      - CC=aarch64-linux-gnu-gcc
    ldflags:
      - -X github.com/TykTechnologies/tyk/internal/build.Version={{.Version}}
      - -X github.com/TykTechnologies/tyk/internal/build.Commit={{.FullCommit}}
      - -X github.com/TykTechnologies/tyk/internal/build.BuildDate={{.Date}}
      - -X github.com/TykTechnologies/tyk/internal/build.BuiltBy=goreleaser
    goos:
      - linux
    goarch:
      - arm64
    binary: tyk
  - id: std-s390x
    flags:
      - -tags=goplugin
      - -trimpath
    env:
      - NOP=nop # ignore this, it is jsut to avoid a complex conditional in the templates
      - CC=s390x-linux-gnu-gcc
    ldflags:
      - -X github.com/TykTechnologies/tyk/internal/build.Version={{.Version}}
      - -X github.com/TykTechnologies/tyk/internal/build.Commit={{.FullCommit}}
      - -X github.com/TykTechnologies/tyk/internal/build.BuildDate={{.Date}}
      - -X github.com/TykTechnologies/tyk/internal/build.BuiltBy=goreleaser
    goos:
      - linux
    goarch:
      - s390x
    binary: tyk
nfpms:
  - id: ee
    vendor: "Tyk Technologies Ltd"
    homepage: "https://tyk.io"
    maintainer: "Tyk <info@tyk.io>"
    description: Tyk API Gateway Enterprise Edition written in Go, supporting REST, GraphQL, TCP and gRPC protocols
    package_name: tyk-gateway-ee
    file_name_template: "{{ .ConventionalFileName }}"
    ids:
      - ee-amd64
      - ee-arm64
      - ee-s390x
    formats:
      - deb
      - rpm
    contents:
      - src: "README.md"
        dst: "/opt/share/docs/tyk-gateway/README.md"
      - src: "ci/install/*"
        dst: "/opt/tyk-gateway/install"
      - src: ci/install/inits/systemd/system/tyk-gateway.service
        dst: /lib/systemd/system/tyk-gateway.service
      - src: ci/install/inits/sysv/init.d/tyk-gateway
        dst: /etc/init.d/tyk-gateway
      - src: /opt/tyk-gateway
        dst: /opt/tyk
        type: "symlink"
      - src: "LICENSE.md"
        dst: "/opt/share/docs/tyk-gateway/LICENSE.md"
      - src: "apps/app_sample.*"
        dst: "/opt/tyk-gateway/apps"
      - src: "templates/*.json"
        dst: "/opt/tyk-gateway/templates"
      - src: "templates/playground/*"
        dst: "/opt/tyk-gateway/templates/playground"
      - src: "middleware/*.js"
        dst: "/opt/tyk-gateway/middleware"
      - src: "event_handlers/sample/*.js"
        dst: "/opt/tyk-gateway/event_handlers/sample"
      - src: "policies/*.json"
        dst: "/opt/tyk-gateway/policies"
      - src: "coprocess/*"
        dst: "/opt/tyk-gateway/coprocess"
      - src: tyk.conf.example
        dst: /opt/tyk-gateway/tyk.conf
        type: "config|noreplace"
    scripts:
      preinstall: "ci/install/before_install.sh"
      postinstall: "ci/install/post_install.sh"
      postremove: "ci/install/post_remove.sh"
    bindir: "/opt/tyk-gateway"
    rpm:
      scripts:
        posttrans: ci/install/post_trans.sh
      signature:
        key_file: tyk.io.signing.key
    deb:
      signature:
        key_file: tyk.io.signing.key
        type: origin
  - id: fips
    vendor: "Tyk Technologies Ltd"
    homepage: "https://tyk.io"
    maintainer: "Tyk <info@tyk.io>"
    description: Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols Built with boringssl
    package_name: tyk-gateway-fips
    file_name_template: "{{ .ConventionalFileName }}"
    ids:
      - fips-amd64
    formats:
      - deb
      - rpm
    contents:
      - src: "README.md"
        dst: "/opt/share/docs/tyk-gateway/README.md"
      - src: "ci/install/*"
        dst: "/opt/tyk-gateway/install"
      - src: ci/install/inits/systemd/system/tyk-gateway.service
        dst: /lib/systemd/system/tyk-gateway.service
      - src: ci/install/inits/sysv/init.d/tyk-gateway
        dst: /etc/init.d/tyk-gateway
      - src: /opt/tyk-gateway
        dst: /opt/tyk
        type: "symlink"
      - src: "LICENSE.md"
        dst: "/opt/share/docs/tyk-gateway/LICENSE.md"
      - src: "apps/app_sample.*"
        dst: "/opt/tyk-gateway/apps"
      - src: "templates/*.json"
        dst: "/opt/tyk-gateway/templates"
      - src: "templates/playground/*"
        dst: "/opt/tyk-gateway/templates/playground"
      - src: "middleware/*.js"
        dst: "/opt/tyk-gateway/middleware"
      - src: "event_handlers/sample/*.js"
        dst: "/opt/tyk-gateway/event_handlers/sample"
      - src: "policies/*.json"
        dst: "/opt/tyk-gateway/policies"
      - src: "coprocess/*"
        dst: "/opt/tyk-gateway/coprocess"
      - src: tyk.conf.example
        dst: /opt/tyk-gateway/tyk.conf
        type: "config|noreplace"
    scripts:
      preinstall: "ci/install/before_install.sh"
      postinstall: "ci/install/post_install.sh"
      postremove: "ci/install/post_remove.sh"
    bindir: "/opt/tyk-gateway"
    rpm:
      scripts:
        posttrans: ci/install/post_trans.sh
      signature:
        key_file: tyk.io.signing.key
    deb:
      signature:
        key_file: tyk.io.signing.key
        type: origin
  - id: std
    vendor: "Tyk Technologies Ltd"
    homepage: "https://tyk.io"
    maintainer: "Tyk <info@tyk.io>"
    description: Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols
    package_name: tyk-gateway
    file_name_template: "{{ .ConventionalFileName }}"
    ids:
      - std-amd64
      - std-arm64
      - std-s390x
    formats:
      - deb
      - rpm
    contents:
      - src: "README.md"
        dst: "/opt/share/docs/tyk-gateway/README.md"
      - src: "ci/install/*"
        dst: "/opt/tyk-gateway/install"
      - src: ci/install/inits/systemd/system/tyk-gateway.service
        dst: /lib/systemd/system/tyk-gateway.service
      - src: ci/install/inits/sysv/init.d/tyk-gateway
        dst: /etc/init.d/tyk-gateway
      - src: /opt/tyk-gateway
        dst: /opt/tyk
        type: "symlink"
      - src: "LICENSE.md"
        dst: "/opt/share/docs/tyk-gateway/LICENSE.md"
      - src: "apps/app_sample.*"
        dst: "/opt/tyk-gateway/apps"
      - src: "templates/*.json"
        dst: "/opt/tyk-gateway/templates"
      - src: "templates/playground/*"
        dst: "/opt/tyk-gateway/templates/playground"
      - src: "middleware/*.js"
        dst: "/opt/tyk-gateway/middleware"
      - src: "event_handlers/sample/*.js"
        dst: "/opt/tyk-gateway/event_handlers/sample"
      - src: "policies/*.json"
        dst: "/opt/tyk-gateway/policies"
      - src: "coprocess/*"
        dst: "/opt/tyk-gateway/coprocess"
      - src: tyk.conf.example
        dst: /opt/tyk-gateway/tyk.conf
        type: "config|noreplace"
    scripts:
      preinstall: "ci/install/before_install.sh"
      postinstall: "ci/install/post_install.sh"
      postremove: "ci/install/post_remove.sh"
    bindir: "/opt/tyk-gateway"
    rpm:
      scripts:
        posttrans: ci/install/post_trans.sh
      signature:
        key_file: tyk.io.signing.key
    deb:
      signature:
        key_file: tyk.io.signing.key
        type: origin
publishers:
  - name: ee
    ids:
      - ee
    env:
      - PACKAGECLOUD_TOKEN={{ .Env.PACKAGECLOUD_TOKEN }}
    cmd: packagecloud publish --debvers "{{ .Env.DEBVERS }}" --rpmvers "{{ .Env.RPMVERS }}" tyk/tyk-ee-unstable {{ .ArtifactPath }}
  - name: fips
    ids:
      - fips
    env:
      - PACKAGECLOUD_TOKEN={{ .Env.PACKAGECLOUD_TOKEN }}
    cmd: packagecloud publish --debvers "{{ .Env.DEBVERS }}" --rpmvers "{{ .Env.RPMVERS }}" tyk/tyk-ee-unstable {{ .ArtifactPath }}
  - name: std
    ids:
      - std
    env:
      - PACKAGECLOUD_TOKEN={{ .Env.PACKAGECLOUD_TOKEN }}
    cmd: packagecloud publish --debvers "{{ .Env.DEBVERS }}" --rpmvers "{{ .Env.RPMVERS }}" tyk/tyk-gateway-unstable {{ .ArtifactPath }}
dockers:
  # Build tykio/tyk-gateway-ee ee (amd64)
  - ids:
      - ee-amd64
    image_templates:
      - "tykio/tyk-gateway-ee:{{.Tag}}-ee-amd64"
    build_flag_templates:
      - "--build-arg=PORTS=8080"
      - "--build-arg=BUILD_PACKAGE_NAME=tyk-gateway-ee"
      - "--platform=linux/amd64"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.title={{.ProjectName}} Enterprise Edition"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
      - "--label=org.opencontainers.image.version={{.Version}}"
    use: buildx
    goarch: amd64
    goos: linux
    dockerfile: ci/Dockerfile.std
    extra_files:
      - "ci/install/"
      - "README.md"
      - "dist/"
      - "LICENSE.md"
      - "apps/app_sample.json"
      - "templates"
      - "middleware"
      - "event_handlers/sample"
      - "policies"
      - "coprocess"
      - "tyk.conf.example"
  # Build tykio/tyk-gateway-ee ee (arm64)
  - ids:
      - ee-arm64
    image_templates:
      - "tykio/tyk-gateway-ee:{{.Tag}}-ee-arm64"
    build_flag_templates:
      - "--build-arg=PORTS=8080"
      - "--build-arg=BUILD_PACKAGE_NAME=tyk-gateway-ee"
      - "--platform=linux/arm64"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.title={{.ProjectName}} Enterprise Edition"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
      - "--label=org.opencontainers.image.version={{.Version}}"
    use: buildx
    goarch: arm64
    goos: linux
    dockerfile: ci/Dockerfile.std
    extra_files:
      - "ci/install/"
      - "README.md"
      - "dist/"
      - "LICENSE.md"
      - "apps/app_sample.json"
      - "templates"
      - "middleware"
      - "event_handlers/sample"
      - "policies"
      - "coprocess"
      - "tyk.conf.example"
  # Build tykio/tyk-gateway-ee ee (s390x)
  - ids:
      - ee-s390x
    image_templates:
      - "tykio/tyk-gateway-ee:{{.Tag}}-ee-s390x"
    build_flag_templates:
      - "--build-arg=PORTS=8080"
      - "--build-arg=BUILD_PACKAGE_NAME=tyk-gateway-ee"
      - "--platform=linux/s390x"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.title={{.ProjectName}} Enterprise Edition"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
      - "--label=org.opencontainers.image.version={{.Version}}"
    use: buildx
    goarch: s390x
    goos: linux
    dockerfile: ci/Dockerfile.std
    extra_files:
      - "ci/install/"
      - "README.md"
      - "dist/"
      - "LICENSE.md"
      - "apps/app_sample.json"
      - "templates"
      - "middleware"
      - "event_handlers/sample"
      - "policies"
      - "coprocess"
      - "tyk.conf.example"
  # Build tykio/tyk-gateway fips (amd64)
  - ids:
      - fips-amd64
    image_templates:
      - "tykio/tyk-gateway:{{.Tag}}-fips-amd64"
    build_flag_templates:
      - "--build-arg=PORTS=8080"
      - "--build-arg=BUILD_PACKAGE_NAME=tyk-gateway-fips"
      - "--platform=linux/amd64"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.title={{.ProjectName}} FIPS"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
      - "--label=org.opencontainers.image.version={{.Version}}"
    use: buildx
    goarch: amd64
    goos: linux
    dockerfile: ci/Dockerfile.std
    extra_files:
      - "ci/install/"
      - "README.md"
      - "dist/"
      - "LICENSE.md"
      - "apps/app_sample.json"
      - "templates"
      - "middleware"
      - "event_handlers/sample"
      - "policies"
      - "coprocess"
      - "tyk.conf.example"
  # Build tykio/tyk-gateway std (amd64)
  - ids:
      - std-amd64
    image_templates:
      - "tykio/tyk-gateway:{{.Tag}}-std-amd64"
    build_flag_templates:
      - "--build-arg=PORTS=8080"
      - "--build-arg=BUILD_PACKAGE_NAME=tyk-gateway"
      - "--platform=linux/amd64"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.title={{.ProjectName}}"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
      - "--label=org.opencontainers.image.version={{.Version}}"
    use: buildx
    goarch: amd64
    goos: linux
    dockerfile: ci/Dockerfile.std
    extra_files:
      - "ci/install/"
      - "README.md"
      - "dist/"
      - "LICENSE.md"
      - "apps/app_sample.json"
      - "templates"
      - "middleware"
      - "event_handlers/sample"
      - "policies"
      - "coprocess"
      - "tyk.conf.example"
  # Build tykio/tyk-gateway std (arm64)
  - ids:
      - std-arm64
    image_templates:
      - "tykio/tyk-gateway:{{.Tag}}-std-arm64"
    build_flag_templates:
      - "--build-arg=PORTS=8080"
      - "--build-arg=BUILD_PACKAGE_NAME=tyk-gateway"
      - "--platform=linux/arm64"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.title={{.ProjectName}}"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
      - "--label=org.opencontainers.image.version={{.Version}}"
    use: buildx
    goarch: arm64
    goos: linux
    dockerfile: ci/Dockerfile.std
    extra_files:
      - "ci/install/"
      - "README.md"
      - "dist/"
      - "LICENSE.md"
      - "apps/app_sample.json"
      - "templates"
      - "middleware"
      - "event_handlers/sample"
      - "policies"
      - "coprocess"
      - "tyk.conf.example"
  # Build tykio/tyk-gateway std (s390x)
  - ids:
      - std-s390x
    image_templates:
      - "tykio/tyk-gateway:{{.Tag}}-std-s390x"
    build_flag_templates:
      - "--build-arg=PORTS=8080"
      - "--build-arg=BUILD_PACKAGE_NAME=tyk-gateway"
      - "--platform=linux/s390x"
      - "--label=org.opencontainers.image.created={{.Date}}"
      - "--label=org.opencontainers.image.title={{.ProjectName}}"
      - "--label=org.opencontainers.image.revision={{.FullCommit}}"
      - "--label=org.opencontainers.image.version={{.Version}}"
    use: buildx
    goarch: s390x
    goos: linux
    dockerfile: ci/Dockerfile.std
    extra_files:
      - "ci/install/"
      - "README.md"
      - "dist/"
      - "LICENSE.md"
      - "apps/app_sample.json"
      - "templates"
      - "middleware"
      - "event_handlers/sample"
      - "policies"
      - "coprocess"
      - "tyk.conf.example"
docker_manifests:
  # Multi-arch manifest for tykio/tyk-gateway-ee ee
  - name_template: tykio/tyk-gateway-ee:{{ .Tag }}-ee
    image_templates:
      - tykio/tyk-gateway-ee:{{ .Tag }}-ee-amd64
      - tykio/tyk-gateway-ee:{{ .Tag }}-ee-arm64
      - tykio/tyk-gateway-ee:{{ .Tag }}-ee-s390x
  - name_template: tykio/tyk-gateway-ee:v{{ .Major }}.{{ .Minor }}{{.Prerelease}}-ee
    image_templates:
      - tykio/tyk-gateway-ee:{{ .Tag }}-ee-amd64
      - tykio/tyk-gateway-ee:{{ .Tag }}-ee-arm64
      - tykio/tyk-gateway-ee:{{ .Tag }}-ee-s390x
  - name_template: tykio/tyk-gateway-ee:v{{ .Major }}{{.Prerelease}}-ee
    image_templates:
      - tykio/tyk-gateway-ee:{{ .Tag }}-ee-amd64
      - tykio/tyk-gateway-ee:{{ .Tag }}-ee-arm64
      - tykio/tyk-gateway-ee:{{ .Tag }}-ee-s390x
  # Single-arch manifest for tykio/tyk-gateway fips
  - name_template: tykio/tyk-gateway:{{ .Tag }}-fips
    image_templates:
      - tykio/tyk-gateway:{{ .Tag }}-fips-amd64
  - name_template: tykio/tyk-gateway:v{{ .Major }}.{{ .Minor }}{{.Prerelease}}-fips
    image_templates:
      - tykio/tyk-gateway:{{ .Tag }}-fips-amd64
  - name_template: tykio/tyk-gateway:v{{ .Major }}{{.Prerelease}}-fips
    image_templates:
      - tykio/tyk-gateway:{{ .Tag }}-fips-amd64
  # Multi-arch manifest for tykio/tyk-gateway std
  - name_template: tykio/tyk-gateway:{{ .Tag }}
    image_templates:
      - tykio/tyk-gateway:{{ .Tag }}-std-amd64
      - tykio/tyk-gateway:{{ .Tag }}-std-arm64
      - tykio/tyk-gateway:{{ .Tag }}-std-s390x
  - name_template: tykio/tyk-gateway:v{{ .Major }}.{{ .Minor }}{{.Prerelease}}
    image_templates:
      - tykio/tyk-gateway:{{ .Tag }}-std-amd64
      - tykio/tyk-gateway:{{ .Tag }}-std-arm64
      - tykio/tyk-gateway:{{ .Tag }}-std-s390x
  - name_template: tykio/tyk-gateway:v{{ .Major }}{{.Prerelease}}
    image_templates:
      - tykio/tyk-gateway:{{ .Tag }}-std-amd64
      - tykio/tyk-gateway:{{ .Tag }}-std-arm64
      - tykio/tyk-gateway:{{ .Tag }}-std-s390x

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 4, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix inverted cleanup paths

The cleanup paths are inverted: when systemctl is used, the systemd unit should be
removed, not the sysv init script. Swap the removal targets to match the service
manager in use. This prevents deleting the wrong init file and leaving stale service
definitions behind.

ci/install/post_install.sh [20-24]

 if [ "${use_systemctl}" = "True" ]; then
+    rm -f /lib/systemd/system/tyk-gateway.service
+else
     rm -f /etc/init.d/tyk-gateway
-else
-    rm -f /lib/systemd/system/tyk-gateway.service
 fi
Suggestion importance[1-10]: 9

__

Why: Correct: the PR inverted the cleanup, deleting /etc/init.d/tyk-gateway when use_systemctl is True; it should remove the systemd unit in that case. This fixes a functional bug that could leave stale service files.

High
Normalize CLI flag spacing

The conditional appends a leading space in the argument string, which can create
double-spacing and break flag parsing inside the quoted heredoc. Remove the leading
spaces inside the conditional strings to ensure reliable CLI argument composition.

.github/workflows/release.yml [102]

-goreleaser release --clean -f ${{ matrix.goreleaser }} ${{ !startsWith(github.ref, 'refs/tags/') && ' --snapshot --skip=sign,docker' || '--skip=docker' }}'
+goreleaser release --clean -f ${{ matrix.goreleaser }} ${{ !startsWith(github.ref, 'refs/tags/') && '--snapshot --skip=sign,docker' || '--skip=docker' }}'
Suggestion importance[1-10]: 4

__

Why: The change removes a leading space in the conditional string; while extra spacing is usually harmless in shell argument parsing, normalizing avoids fragile composition inside the echoed script.

Low
General
Avoid ambiguous glob installs

Installing with a glob will fail if multiple matching .deb files exist or if the
shell doesn't expand as expected. Use a single deterministic path by moving the file
to a known name before installation to avoid ambiguous expansion.

ci/Dockerfile.std [17-18]

-COPY dist/${BUILD_PACKAGE_NAME}_*_${TARGETARCH}.deb /
-RUN dpkg -i /${BUILD_PACKAGE_NAME}_*_${TARGETARCH}.deb && find / -maxdepth 1 -name "*.deb" -delete
+COPY dist/${BUILD_PACKAGE_NAME}_*_${TARGETARCH}.deb /pkg.deb
+RUN dpkg -i /pkg.deb && rm -f /pkg.deb
Suggestion importance[1-10]: 6

__

Why: Using a deterministic filename avoids ambiguous glob expansion if multiple matching debs exist, improving reliability; the change aligns with the new COPY pattern in the PR.

Low

Gromit and others added 2 commits November 4, 2025 16:00
### **PR Type**
Enhancement, Tests


___

### **Description**
- Modernize release workflow and images

- Separate EE/STD builds and packaging

- Add s390x support across builds

- Externalize test orchestration actions


___

### Diagram Walkthrough


```mermaid
flowchart LR
  WF[".github/workflows/release.yml updates"]
  DK1["ci/Dockerfile.distroless (trixie, pkg var)"]
  DK2["ci/Dockerfile.std (trixie)"]
  GR["goreleaser config: EE/STD/FIPS split + publishers"]
  TST["Tests via shared actions + readiness checks"]

  WF -- builds/pushes EE+STD on amd64/arm64/s390x --> GR
  WF -- uses BUILD_PACKAGE_NAME, tags fix --> DK1
  WF -- readiness checks, container stop --> TST
  DK1 -- package install from var --> GR
  DK2 -- base update only --> GR
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>release.yml</strong><dd><code>Release workflow refactor
with EE/STD split and s390x</code>&nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

.github/workflows/release.yml

<ul><li>Set VARIATION to <code>prod-variation</code>.<br> <li> Expand
DEB targets (Ubuntu Noble, Debian Trixie).<br> <li> Split EE/STD image
metadata/tags and fix labels/args with
<br><code>BUILD_PACKAGE_NAME</code>.<br> <li> Add linux/s390x platform
for CI/prod images.<br> <li> Replace inline test logic with shared
actions; add gateway readiness <br>checks and clean shutdown.<br> <li>
Adjust tag push steps, permissions, and test controller setup.</ul>


</details>


  </td>
<td><a
href="https://github.com/TykTechnologies/tyk/pull/7506/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34">+70/-189</a></td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>Dockerfile.distroless</strong><dd><code>Distroless
image: trixie base and param pkg</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

ci/Dockerfile.distroless

<ul><li>Switch base to <code>debian:trixie-slim</code>.<br> <li> Use
<code>BUILD_PACKAGE_NAME</code> for package install.<br> <li> Remove
fips filtering; precise package copy/install.<br> <li> Align stage name
casing and copy path.</ul>


</details>


  </td>
<td><a
href="https://github.com/TykTechnologies/tyk/pull/7506/files#diff-ab1e64220db8ccca1a52a505decc2beb2156d5ec3ecb7d6b8660cc3dc7e1f5bd">+6/-5</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>Dockerfile.std</strong><dd><code>Std image: trixie
base, drop inline install</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

ci/Dockerfile.std

<ul><li>Switch base to <code>debian:trixie-slim</code>.<br> <li>
Introduce <code>BUILD_PACKAGE_NAME</code> ARG (not used here yet).<br>
<li> Remove embedded .deb install section.</ul>


</details>


  </td>
<td><a
href="https://github.com/TykTechnologies/tyk/pull/7506/files#diff-a3b3e9cabd877d0bd0fc8f20a9fdca7f44d102547a5fdfcd398ea01637e5dfae">+2/-5</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>goreleaser.yml</strong><dd><code>Goreleaser:
EE/STD/FIPS split and publishers</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

ci/goreleaser/goreleaser.yml

<ul><li>Reorganize builds into <code>ee-*</code>, <code>std-*</code>,
and <code>fips-amd64</code>.<br> <li> Add s390x for both EE and STD,
adjust CC per arch.<br> <li> Swap nfpms: EE package
<code>tyk-gateway-ee</code>, STD <code>tyk-gateway</code>; clarify
FIPS.<br> <li> Add separate publishers for EE, FIPS, STD; tweak archives
format.</ul>


</details>


  </td>
<td><a
href="https://github.com/TykTechnologies/tyk/pull/7506/files#diff-fb944a05459e4d713bc7541efd6e721cbe992a556353c09c4eb66a8eae9b856e">+66/-48</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___


<!---TykTechnologies/jira-linter starts here-->

### Ticket Details

<details>
<summary>
<a href="https://tyktech.atlassian.net/browse/TT-16060" title="TT-16060"
target="_blank">TT-16060</a>
</summary>

|         |    |
|---------|----|
| Status  | In Dev |
| Summary | Fix release pipelines to pick up latest Go patch |

Generated at: 2025-11-04 16:19:13

</details>

<!---TykTechnologies/jira-linter ends here-->

Co-authored-by: Gromit <policy@gromit>
@Razeen-Abdal-Rahman
Copy link
Copy Markdown
Contributor Author

Added longer wait for API tests to start

@Razeen-Abdal-Rahman Razeen-Abdal-Rahman requested a review from a team as a code owner November 4, 2025 23:41
@Razeen-Abdal-Rahman
Copy link
Copy Markdown
Contributor Author

Removed longer wait time for tests and fixes issue with mismatched plugin compiler version.
The plugin compiler is not managed through gromit

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Nov 5, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant