Skip to content

Jenkinsfile template: check the environment instead of running setup.sh on every build #4

Backlog

Description

@iggyto

Problem

templates/jenkins/Jenkinsfile has a Setup stage that runs ./scripts/setup.sh on every build. setup.sh installs things (rbenv, the Ruby from .ruby-version, gems), so a build can change the agent. Some teams prefer CI that only checks the environment and never installs anything.

Raised in the review of #2 (v2). It is not introduced there (the stage already existed), so it is tracked here instead of blocking it.

Proposal

  • Replace the Setup stage with ./scripts/doctor.sh --offline, which checks Xcode, Ruby, gems, scheme, etc. and fails with a fix hint when something is missing, without installing.
  • Keep installing as an opt-in: a boolean parameter (e.g. RUN_SETUP, default off) that runs ./scripts/setup.sh first, for agents that are provisioned by the job itself.
  • Mention the choice in the README CI section.

Notes

  • doctor.sh currently also reports things that are only relevant to shipping (signing, App Store Connect key) as warnings, not failures, so it already fits a build-only check; worth confirming on a real agent.
  • The GitHub Actions templates already follow this idea: they use ruby/setup-ruby for the toolchain and do not run setup.sh.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions