Skip to content

Gromit sync with tyk repo TT-16131#7542

Merged
lghiur merged 3 commits intomasterfrom
releng/master
Nov 18, 2025
Merged

Gromit sync with tyk repo TT-16131#7542
lghiur merged 3 commits intomasterfrom
releng/master

Conversation

@Razeen-Abdal-Rahman
Copy link
Copy Markdown
Contributor

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

Description

Carry over changes from gromit into the tyk repo

Related Issue

TT-16131

Motivation and Context

Ensure the tyk repo is in sync as the buildenv for this repo will continue to be 1.24-bullseye with the addition of a manual pull of the latest go version, this is done upstream when the image is built.
This PR carries over other changes from gromit ensuring everything is in sync after this change.

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

API Changes

no api changes detected

@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Nov 17, 2025

🔍 Code Analysis Results

This PR synchronizes the Tyk repository with changes from an upstream source, introducing a FIPS-compliant build variant for the Tyk Gateway and enhancing the CI/CD pipeline's robustness.

Files Changed Analysis

  • .github/workflows/release.yml: The release workflow is significantly updated to introduce a dedicated build-and-push process for a new FIPS Docker image (tyk-gateway-fips) using docker/build-push-action. The main goreleaser job is now configured to skip Docker builds. Additionally, the upgrade test steps for DEB and RPM packages are made more resilient, preventing CI failures if older package versions are unavailable.
  • ci/goreleaser/goreleaser.yml: This file contains the core change for FIPS compliance, adding the GOEXPERIMENT=boringcrypto environment variable to the build process. This instructs the Go compiler to use the FIPS 140-2 validated BoringCrypto module.
  • ci/install/post_install.sh: The post-installation script has been improved for robustness. It now correctly handles the cleanup of systemd vs. init.d service files and checks if tyk.conf exists before attempting to set its permissions.
  • ci/Dockerfile.std: Contains minor refactoring, reordering layers to improve Docker build caching efficiency.

Architecture & Impact Assessment

  • What this PR accomplishes: It introduces the capability to produce and release a FIPS-compliant version of the Tyk Gateway, delivered as a new Docker image (tykio/tyk-gateway-fips). This addresses the needs of users in regulated environments requiring FIPS 140-2 validated cryptography.
  • Key technical changes introduced:
    1. FIPS Compliance: Enables boringcrypto at compile time via the GOEXPERIMENT flag.
    2. CI/CD Pipeline: Adds a new workflow path for building and publishing the FIPS Docker image to both CI and production registries.
    3. Build Process Refactoring: Decouples Docker image creation from GoReleaser, handling it directly within the GitHub Actions workflow.
    4. CI Resilience: Modifies upgrade tests to continue even if older package versions can't be fetched, preventing the pipeline from failing.
  • Affected system components: The changes are primarily confined to the build, packaging, and CI/CD release pipeline. The resulting FIPS binary will use a different set of cryptographic libraries (BoringSSL), which could have performance implications for crypto-heavy operations. The core application logic remains unchanged.
graph TD
    subgraph "Release Workflow"
        A[Start Build Job] --> B{Build Matrix};
        B --> C_EE[Build & Push EE Image];
        B --> C_STD[Build & Push STD Image];
        B --> C_FIPS["Build & Push FIPS Image (New)"];
        C_EE & C_STD --> D[Run Upgrade Tests];
    end
Loading

Scope Discovery & Context Expansion

The scope is focused on the build and release process to introduce a new FIPS build variant. Enabling boringcrypto is a standard method in the Go ecosystem for achieving FIPS compliance. This change creates a new build artifact without altering existing ones, minimizing regression risk for standard builds.

The broader context is to support customers with stringent regulatory requirements. The creation of a new tyk-gateway-fips image implies that downstream tooling, such as the Tyk Helm charts and Tyk Operator, will likely require updates to allow users to deploy this new variant. The changes to the upgrade tests represent a pragmatic trade-off, improving CI stability at the cost of slightly reduced strictness in testing the upgrade path from specific older versions.

Metadata
  • Review Effort: 3 / 5
  • Primary Label: enhancement

Powered by Visor from Probelabs

Last updated: 2025-11-18T13:53:41.335Z | Triggered by: synchronize | Commit: a57cbbc

💡 TIP: You can chat with Visor using /visor ask <your question>

@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Nov 17, 2025

🔍 Code Analysis Results

Security Issues (2)

Severity Location Issue
🟡 Warning .github/workflows/release.yml:490-491
Error suppression in the Debian upgrade test pipeline using `|| echo` can mask legitimate installation failures. This may cause upgrade tests to be skipped silently, preventing the detection of regressions in the upgrade process, which could have security implications. The current implementation hides errors from `curl`, `bash`, and `apt-get`.
💡 SuggestionFail the CI job on unexpected errors. If the goal is to handle cases where a previous version is not found, explicitly check for the 'package not found' error from `apt-get` and only then proceed. Other errors (e.g., from `curl` or repository setup) should cause the job to fail to ensure pipeline integrity.
🟡 Warning .github/workflows/release.yml:549-550
Error suppression in the RPM upgrade test pipeline using `|| echo` can mask legitimate installation failures. This may cause upgrade tests to be skipped silently, preventing the detection of regressions in the upgrade process, which could have security implications. The current implementation hides errors from `curl`, `bash`, and `yum`.
💡 SuggestionFail the CI job on unexpected errors. If the goal is to handle cases where a previous version is not found, explicitly check for the 'package not found' error from `yum` and only then proceed. Other errors (e.g., from `curl` or repository setup) should cause the job to fail to ensure pipeline integrity.

Architecture Issues (1)

Severity Location Issue
🟡 Warning .github/workflows/release.yml:200-265
The newly added steps for building and pushing the FIPS Docker image are a near-exact copy of the existing steps for the `ee` (lines 131-197) and `std` (lines 268-334) images. This introduces significant code duplication into the CI/CD pipeline, making it harder to maintain and increasing the risk of inconsistencies. A change in the build process would need to be replicated in three places.
💡 SuggestionTo adhere to the DRY (Don't Repeat Yourself) principle, refactor the common Docker build-and-push logic into a reusable GitHub Actions workflow (`workflow_call`) or a composite action. This reusable component can then be called three times with different parameters for each image variant (`ee`, `fips`, `std`), such as the image name, build arguments, and labels. This will simplify the main workflow and centralize the build logic.

Performance Issues (1)

Severity Location Issue
🟡 Warning ci/goreleaser/goreleaser.yml:69
The build process now enables `GOEXPERIMENT=boringcrypto`, which substitutes the standard Go cryptographic libraries with the FIPS-compliant BoringCrypto library. This change can alter the performance characteristics of cryptographic operations, such as TLS termination, JWT validation, and request signing, potentially leading to performance regressions in CPU-bound workloads.
💡 SuggestionIt is recommended to conduct performance benchmarks on critical paths involving cryptographic functions to quantify the impact of this change. This will validate that the switch to BoringCrypto does not introduce unacceptable performance degradation for the gateway's typical workload.

Quality Issues (2)

Severity Location Issue
🟡 Warning .github/workflows/release.yml:428-429
In the `test-deb-package` job, both the package repository setup and the installation of the previous version for upgrade testing are configured to continue on failure. This can silently disable the upgrade test path if there are persistent issues with the package repository, leading to a false sense of security. The job will still report success, having only tested a fresh installation.
💡 SuggestionTo make failures more visible without failing the build, consider using a GitHub Actions workflow command to create a warning annotation. For example: `curl ... | bash || (echo '::warning::DEB repository setup failed. Skipping upgrade test.' && exit 0)`. This would make the skipped test explicit in the build logs and UI. If the upgrade test is considered critical, these commands should be allowed to fail the job.
🟡 Warning .github/workflows/release.yml:484-485
In the `test-rpm-package` job, both the package repository setup and the installation of the previous version for upgrade testing are configured to continue on failure. This can silently disable the upgrade test path if there are persistent issues with the package repository, leading to a false sense of security. The job will still report success, having only tested a fresh installation.
💡 SuggestionTo make failures more visible without failing the build, consider using a GitHub Actions workflow command to create a warning annotation. For example: `curl ... | bash || (echo '::warning::RPM repository setup failed. Skipping upgrade test.' && exit 0)`. This would make the skipped test explicit in the build logs and UI. If the upgrade test is considered critical, these commands should be allowed to fail the job.

Dependency Issues (1)

Severity Location Issue
🟡 Warning .github/workflows/release.yml:201-266
The introduction of the `tyk-gateway-fips` Docker image creates a new deployment variant that requires corresponding updates in downstream deployment tools. The `tyk-charts` and `tyk-operator` repositories must be updated to allow users to select and configure this FIPS-compliant image. This PR is not linked to any changes in those repositories, which could leave the new feature undeployable through standard methods.
💡 SuggestionEnsure that corresponding pull requests or tickets are created and linked for `tyk-charts` and `tyk-operator` to add support for deploying the `tyk-gateway-fips` image. This typically involves adding new values to the Helm chart and updating the operator's logic to handle the new image variant.

✅ Connectivity Check Passed

No connectivity issues found – changes LGTM.


Powered by Visor from Probelabs

Last updated: 2025-11-18T13:53:42.600Z | Triggered by: synchronize | Commit: a57cbbc

💡 TIP: You can chat with Visor using /visor ask <your question>

@github-actions
Copy link
Copy Markdown
Contributor

🚨 Jira Linter Failed

Commit: a57cbbc
Failed at: 2025-11-18 13:50:21 UTC

The Jira linter failed to validate your PR. Please check the error details below:

🔍 Click to view error details
failed to validate branch and PR title rules: branch name 'releng/master' must contain a valid Jira ticket ID (e.g., ABC-123)

Next Steps

  • Ensure your branch name contains a valid Jira ticket ID (e.g., ABC-123)
  • Verify your PR title matches the branch's Jira ticket ID
  • Check that the Jira ticket exists and is accessible

This comment will be automatically deleted once the linter passes.

@sonarqubecloud
Copy link
Copy Markdown

@lghiur lghiur merged commit 007b66a into master Nov 18, 2025
127 of 169 checks passed
@lghiur lghiur deleted the releng/master branch November 18, 2025 18:25
@Razeen-Abdal-Rahman
Copy link
Copy Markdown
Contributor Author

/release to release-5.8

probelabs Bot pushed a commit that referenced this pull request Nov 19, 2025
## Description

Carry over changes from gromit into the tyk repo

## Related Issue

[TT-16131](https://tyktech.atlassian.net/browse/TT-16131)

## Motivation and Context

Ensure the tyk repo is in sync as the buildenv for this repo will
continue to be `1.24-bullseye` with the addition of a manual pull of the
latest go version, this is done upstream when the image is built.
This PR carries over other changes from gromit ensuring everything is in
sync after this change.

[TT-16131]:
https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Gromit <policy@gromit>
Co-authored-by: Leonid Bugaev <leonsbox@gmail.com>
(cherry picked from commit 007b66a)
@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Nov 19, 2025

✅ Cherry-pick successful. A PR was created: #7550

Razeen-Abdal-Rahman added a commit that referenced this pull request Nov 19, 2025
…7550)

Gromit sync with tyk repo TT-16131 (#7542)

## Description

Carry over changes from gromit into the tyk repo

## Related Issue

[TT-16131](https://tyktech.atlassian.net/browse/TT-16131)

## Motivation and Context

Ensure the tyk repo is in sync as the buildenv for this repo will
continue to be `1.24-bullseye` with the addition of a manual pull of the
latest go version, this is done upstream when the image is built.
This PR carries over other changes from gromit ensuring everything is in
sync after this change.


[TT-16131]:

https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Gromit <policy@gromit>
Co-authored-by: Leonid Bugaev <leonsbox@gmail.com>

[TT-16131]:
https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[TT-16131]:
https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
<!---TykTechnologies/jira-linter starts here-->

### Ticket Details

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

|         |    |
|---------|----|
| Status  | In Code Review |
| Summary | Gromit sync with tyk repo |

Generated at: 2025-11-19 09:22:29

</details>

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

Co-authored-by: Razeen <98765619+Razeen-Abdal-Rahman@users.noreply.github.com>
Co-authored-by: Gromit <policy@gromit>
Co-authored-by: Leonid Bugaev <leonsbox@gmail.com>
@Razeen-Abdal-Rahman
Copy link
Copy Markdown
Contributor Author

/release to release-5.10

probelabs Bot pushed a commit that referenced this pull request Nov 19, 2025
## Description

Carry over changes from gromit into the tyk repo

## Related Issue

[TT-16131](https://tyktech.atlassian.net/browse/TT-16131)

## Motivation and Context

Ensure the tyk repo is in sync as the buildenv for this repo will
continue to be `1.24-bullseye` with the addition of a manual pull of the
latest go version, this is done upstream when the image is built.
This PR carries over other changes from gromit ensuring everything is in
sync after this change.

[TT-16131]:
https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Gromit <policy@gromit>
Co-authored-by: Leonid Bugaev <leonsbox@gmail.com>
(cherry picked from commit 007b66a)
@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Nov 19, 2025

✅ Cherry-pick successful. A PR was created: #7551

@Razeen-Abdal-Rahman
Copy link
Copy Markdown
Contributor Author

/release to release-5.10.1

probelabs Bot pushed a commit that referenced this pull request Nov 19, 2025
## Description

Carry over changes from gromit into the tyk repo

## Related Issue

[TT-16131](https://tyktech.atlassian.net/browse/TT-16131)

## Motivation and Context

Ensure the tyk repo is in sync as the buildenv for this repo will
continue to be `1.24-bullseye` with the addition of a manual pull of the
latest go version, this is done upstream when the image is built.
This PR carries over other changes from gromit ensuring everything is in
sync after this change.

[TT-16131]:
https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Gromit <policy@gromit>
Co-authored-by: Leonid Bugaev <leonsbox@gmail.com>
(cherry picked from commit 007b66a)
@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Nov 19, 2025

✅ Cherry-pick successful. A PR was created: #7552

Razeen-Abdal-Rahman added a commit that referenced this pull request Nov 19, 2025
…7551)

### **User description**
<details open>
<summary><a href="https://tyktech.atlassian.net/browse/TT-16131"
title="TT-16131" target="_blank">TT-16131</a></summary>
  <br />
  <table>
    <tr>
      <th>Summary</th>
      <td>Gromit sync with tyk repo</td>
    </tr>
    <tr>
      <th>Type</th>
      <td>
<img alt="Story"
src="https://tyktech.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10315?size=medium"
/>
        Story
      </td>
    </tr>
    <tr>
      <th>Status</th>
      <td>In Code Review</td>
    </tr>
    <tr>
      <th>Points</th>
      <td>N/A</td>
    </tr>
    <tr>
      <th>Labels</th>
      <td>-</td>
    </tr>
  </table>
</details>
<!--
  do not remove this marker as it will break jira-lint's functionality.
  added_by_jira_lint
-->

---

Gromit sync with tyk repo TT-16131 (#7542)

## Description

Carry over changes from gromit into the tyk repo

## Related Issue

[TT-16131](https://tyktech.atlassian.net/browse/TT-16131)

## Motivation and Context

Ensure the tyk repo is in sync as the buildenv for this repo will
continue to be `1.24-bullseye` with the addition of a manual pull of the
latest go version, this is done upstream when the image is built.
This PR carries over other changes from gromit ensuring everything is in
sync after this change.


[TT-16131]:

https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Gromit <policy@gromit>
Co-authored-by: Leonid Bugaev <leonsbox@gmail.com>

[TT-16131]:
https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[TT-16131]:
https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ


___

### **PR Type**
Enhancement, Tests, Bug fix


___

### **Description**
- Add FIPS build and images to release

- Improve installer cleanup and permissions

- Adjust GoReleaser to skip docker when needed

- Make upgrade tests resilient to repo issues


___

### Diagram Walkthrough


```mermaid
flowchart LR
  goreleaser["GoReleaser config updates"] -- "FIPS flags, boringcrypto" --> fipsbin["FIPS binaries"]
  fipsbin -- "BUILD_PACKAGE_NAME=tyk-gateway-fips" --> fipsimg["FIPS images (CI/prod)"]
  workflow["Release workflow"] -- "metadata + build-push" --> fipsimg
  workflow -- "skip docker on snapshot/tags" --> images["Standard/EE images"]
  postinstall["post_install.sh"] -- "safer cleanup, chmod if exists" --> installsafe["Safer installs"]
  tests["Upgrade test Dockerfiles"] -- "tolerant repo setup, fallback" --> resilient["Resilient upgrade tests"]
  dockerstd["ci/Dockerfile.std"] -- "copy deb, stricter cleanup" --> slimmer["Slimmer image"]
```



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

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>post_install.sh</strong><dd><code>Safer post-install
cleanup and permissions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

ci/install/post_install.sh

<ul><li>Swap cleanup paths for systemd/sysv<br> <li> Only chmod config
if file exists</ul>


</details>


  </td>
<td><a
href="https://github.com/TykTechnologies/tyk/pull/7551/files#diff-16f232a53df862d740ca45c0a608e598b38a7211da8325b9f74ceaecc00280c5">+4/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>release.yml</strong><dd><code>Release workflow adds
FIPS and hardens tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/release.yml

<ul><li>Add FIPS image metadata and pushes<br> <li> Output FIPS tags for
downstream jobs<br> <li> Skip docker builds in goreleaser when
tagging/snapshot<br> <li> Make upgrade tests tolerate repo/old version
absence</ul>


</details>


  </td>
<td><a
href="https://github.com/TykTechnologies/tyk/pull/7551/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34">+71/-3</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>Dockerfile.std</strong><dd><code>Standard image
installs from dist and cleans</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

ci/Dockerfile.std

<ul><li>Install package from dist with arch pattern<br> <li> Strengthen
cleanup of apt/log caches<br> <li> Adjust deb naming/glob usage</ul>


</details>


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

</tr>

<tr>
  <td>
    <details>
<summary><strong>goreleaser.yml</strong><dd><code>Enable boringcrypto
for FIPS build</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

ci/goreleaser/goreleaser.yml

<ul><li>Set GOEXPERIMENT=boringcrypto for FIPS<br> <li> Keep FIPS tags
and ldflags intact</ul>


</details>


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

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>upgrade-deb.yml (generated Dockerfile
content)</strong><dd><code>Debian upgrade test resilient to repo
issues</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

ci/tests/api-functionality/upgrade-deb.yml (generated Dockerfile
content)

<ul><li>Add fallback if repo setup fails<br> <li> Continue when previous
version not found</ul>


</details>


  </td>
  <td><a href=""></a></td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>upgrade-rpm.yml (generated Dockerfile
content)</strong><dd><code>RPM upgrade test resilient to repo
issues</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

ci/tests/api-functionality/upgrade-rpm.yml (generated Dockerfile
content)

<ul><li>Add fallback if repo setup fails<br> <li> Continue when previous
version not found</ul>


</details>


  </td>
  <td><a href=""></a></td>

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

</details>

___

---------

Co-authored-by: Razeen <98765619+Razeen-Abdal-Rahman@users.noreply.github.com>
Co-authored-by: Gromit <policy@gromit>
Co-authored-by: Leonid Bugaev <leonsbox@gmail.com>
Co-authored-by: Razeen <Razeen.Abdal-Rahman@outlook.com>
Razeen-Abdal-Rahman added a commit that referenced this pull request Nov 19, 2025
…#7552)

### **User description**
<details open>
<summary><a href="https://tyktech.atlassian.net/browse/TT-16131"
title="TT-16131" target="_blank">TT-16131</a></summary>
  <br />
  <table>
    <tr>
      <th>Summary</th>
      <td>Gromit sync with tyk repo</td>
    </tr>
    <tr>
      <th>Type</th>
      <td>
<img alt="Story"
src="https://tyktech.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10315?size=medium"
/>
        Story
      </td>
    </tr>
    <tr>
      <th>Status</th>
      <td>In Code Review</td>
    </tr>
    <tr>
      <th>Points</th>
      <td>N/A</td>
    </tr>
    <tr>
      <th>Labels</th>
      <td>-</td>
    </tr>
  </table>
</details>
<!--
  do not remove this marker as it will break jira-lint's functionality.
  added_by_jira_lint
-->

---

Gromit sync with tyk repo TT-16131 (#7542)

## Description

Carry over changes from gromit into the tyk repo

## Related Issue

[TT-16131](https://tyktech.atlassian.net/browse/TT-16131)

## Motivation and Context

Ensure the tyk repo is in sync as the buildenv for this repo will
continue to be `1.24-bullseye` with the addition of a manual pull of the
latest go version, this is done upstream when the image is built.
This PR carries over other changes from gromit ensuring everything is in
sync after this change.


[TT-16131]:

https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Gromit <policy@gromit>
Co-authored-by: Leonid Bugaev <leonsbox@gmail.com>

[TT-16131]:
https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[TT-16131]:
https://tyktech.atlassian.net/browse/TT-16131?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ


___

### **PR Type**
Enhancement, Bug fix


___

### **Description**
- Add FIPS build and images

- Improve CI release flow robustness

- Fix post-install service cleanup logic

- Safeguard config chmod when absent


___

### Diagram Walkthrough


```mermaid
flowchart LR
  ci["CI release workflow"] -- "add FIPS metadata/tags" --> fipsMeta["FIPS docker metadata"]
  ci -- "build+push FIPS images" --> fipsPushCI["Push FIPS CI image"]
  tags["Tag push"] -- "build+push FIPS prod" --> fipsPushProd["Push FIPS prod image"]
  goreleaser["Goreleaser config"] -- "boringcrypto experiment" --> fipsBuild["FIPS build target"]
  installer["post_install.sh"] -- "fix service cleanup, safe chmod" --> saferInstall["Safer post-install"]
  images["Distroless Dockerfile"] -- "install .deb earlier, clean logs" --> leanImage["Smaller attack surface"]
  tests["Package upgrade tests"] -- "tolerate repo failures" --> resilientTests["Resilient fallbacks"]
```



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

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>post_install.sh</strong><dd><code>Correct service
cleanup and safe config chmod</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

ci/install/post_install.sh

<ul><li>Invert service cleanup paths correctly.<br> <li> Guard chmod of
<code>tyk.conf</code> with file check.</ul>


</details>


  </td>
<td><a
href="https://github.com/TykTechnologies/tyk/pull/7552/files#diff-16f232a53df862d740ca45c0a608e598b38a7211da8325b9f74ceaecc00280c5">+4/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>release.yml</strong><dd><code>CI: FIPS images and more
robust release flow</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/release.yml

<ul><li>Add FIPS docker metadata, CI and prod pushes.<br> <li> Expose
<code>fips_tags</code> output from CI.<br> <li> Skip docker in
goreleaser when not tagging.<br> <li> Make package upgrade tests
resilient to repo issues.</ul>


</details>


  </td>
<td><a
href="https://github.com/TykTechnologies/tyk/pull/7552/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34">+71/-3</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>Dockerfile.std</strong><dd><code>Streamline std image
install and cleanup</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

ci/Dockerfile.std

<ul><li>Install package via <code>dist/${BUILD_PACKAGE_NAME}...</code>
early.<br> <li> Clean logs and apt dirs more precisely.<br> <li> Adjust
glob patterns for .deb install/removal.</ul>


</details>


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

</tr>

<tr>
  <td>
    <details>
<summary><strong>goreleaser.yml</strong><dd><code>Enable boringcrypto
experiment for FIPS build</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

ci/goreleaser/goreleaser.yml

<ul><li>Set GOEXPERIMENT=boringcrypto for FIPS build.<br> <li> Remove
unused env placeholder.</ul>


</details>


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

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

</details>

___

---------

Co-authored-by: Razeen <98765619+Razeen-Abdal-Rahman@users.noreply.github.com>
Co-authored-by: Gromit <policy@gromit>
Co-authored-by: Leonid Bugaev <leonsbox@gmail.com>
Co-authored-by: Razeen <Razeen.Abdal-Rahman@outlook.com>
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.

4 participants