Skip to content

CI/CD Build Fails with ghcr.io/foundry-rs/foundry:latest – “Syntax error: Unterminated quoted string” #10170

@haraslub

Description

@haraslub

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

I’m using the Docker image tagged as ghcr.io/foundry-rs/foundry:latest. Note that when I switch to ghcr.io/foundry-rs/foundry:v0.3.0, my CI/CD pipeline works as expected.

What version of Foundryup are you on?

Not applicable in my CI setup (the pipeline uses the Docker image directly, without invoking Foundryup).

What command(s) is the bug in?

No response

Operating System

Linux

Describe the bug

In my GitLab CI/CD pipeline, using ghcr.io/foundry-rs/foundry:latest (or stable or nigthly) causes the job to fail with the following error message: sh: 7: Syntax error: Unterminated quoted string (full logs below):

Logs:

Running with gitlab-runner 17.2.0 (v17.2.0)
  on nix__0b2f8d221adc wFuALSs1R, system ID: s_cbae644894eb
Preparing the "docker" executor 00:38
Using Docker executor with image ghcr.io/foundry-rs/foundry:nightly ...
Pulling docker image ghcr.io/foundry-rs/foundry:nightly ...
Using docker image sha256:b45e980b51a0402753a9a70009e849dd4693190850134ff5a07fec82a3da4ec1 for ghcr.io/foundry-rs/foundry:nightly with digest ghcr.io/foundry-rs/foundry@sha256:8b6bc2a386718fe3e10832f4fb6e998ea1afc74dd17ef711d7f5e5225e052864 ...
Preparing environment 00:00
... 
Removing dependencies/
Skipping Git submodules setup
Restoring cache 00:00
Checking cache for 0_foundry_soldeer-3ed9552c7bb23cce1ecd582f3af6c9c0082b86b9-1-non_protected...
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted. 
Successfully extracted cache
Executing "step_script" stage of the job script 00:00
Using docker image sha256:b45e980b51a0402753a9a70009e849dd4693190850134ff5a07fec82a3da4ec1 for ghcr.io/foundry-rs/foundry:nightly with digest ghcr.io/foundry-rs/foundry@sha256:8b6bc2a386718fe3e10832f4fb6e998ea1afc74dd17ef711d7f5e5225e052864 ...
sh: 7: Syntax error: Unterminated quoted string
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 2

The error seems to occur during the initial environment setup—before any of my script commands are executed. The same pipeline works perfectly when I pin the image to ghcr.io/foundry-rs/foundry:v0.3.0.

I suspect that recent changes in the latest image might have affected the default shell or the way command strings are parsed. Here is an excerpt of my .gitlab-ci.yml for context:

default:
  image: ghcr.io/foundry-rs/foundry:latest

stages:
  - build

build:
  stage: build
  before_script:
    - forge soldeer install
  script:
    - forge build
  # ...
  
# (Further jobs omitted for brevity)

Any guidance on what might have changed in the latest image and how to resolve this issue would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bugType: bugT-needs-triageType: this issue needs to be labelled

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions