Repository navigation
Conversation
…rsion, updated defaults and README Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
build.sh becomes a thin wrapper around new build/test lanes (iq_build/iq_test helpers in CommonFastfile). Generated .gitignore now covers build artifacts and API keys; this repo gets a .gitignore too. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… xcodes, add .xcode-version Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…a as deprecated alias Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- build.sh rejected bundler versions other than 2.x - gym drops the test bundles when building for testing, use scan(build_for_testing) - generator can run unattended and from a local clone Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tor, weekly freshness CI - No Ruby/bundler/RubyGems pins in this repo; generator resolves the latest stable Ruby into the project's .ruby-version, setup/build read it from there - scripts/doctor.sh checks the project setup and explains fixes - Dependabot config for generated projects, macos-latest, current action majors - Weekly smoke run + tests/check-actions.sh, opens a 'versions' issue on failure Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…y PR Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Found by the first hosted-runner smoke run: without rbenv initialised in the shell, the runner's own Ruby was used, so the build number phase script was not added and the doctor reported the wrong Ruby. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- check_certs: expiry report of certificates and match profiles, strict:true for CI - sync_devices: devices.txt from the developer portal with the API key - lint: SwiftLint / SwiftFormat in lint mode - bump_version: edits MARKETING_VERSION with xcodeproj (agvtool cannot read the version of projects with a generated Info.plist), generated lane + commit - before_all skips the App Store Connect key for the offline lanes (lint, bump_version) - tests/lanes.sh: fast stubbed tests of the new lanes; smoke test runs bump_version for real Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…now the Ruby Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sergihernanz
left a comment
There was a problem hiding this comment.
Overall: CI is green and nothing looks blocking in the design; the inline comments are small fixes or questions, hence "needs work" until they are answered.
- CHANGELOG says fastlane_version "raised to 2.220.0" but CommonFastfile now has 2.242.0.
- Out of scope here, to track as issues: FIREBASE_TOKEN (firebase login:ci) is being deprecated in favor of service accounts/ADC; the Jenkins template runs setup.sh on every build (some of us prefer CI that only checks the environment and never installs).
- FMP (familymealplan-ios) uses these lanes through ios-project-setup v1.0.0 and has a few things we may upstream later (PR builds to Firebase, a promote-to-App-Review lane, UI tests failing the build with one retry). We'll open separate issues/PRs for those.
| sim = iq_prepare_simulator | ||
| begin | ||
| iq_build_for_simulator(schemename: schemename, xcprojname: xcprojname, sim: sim, for_testing: false, derived_data: derived_data) | ||
| iq_touch_report(File.join(iq_root, 'coverage', 'cobertura.xml')) |
There was a problem hiding this comment.
Question (not tested): iq_touch_report leaves a 0-byte cobertura.xml. The Jenkins Cobertura plugin may fail to parse it even with failNoReports: false.
There was a problem hiding this comment.
Good point, a 0-byte file is not valid XML. Fixed in edf7bf5: build-only runs now write empty but well-formed files (<coverage ...><packages/></coverage> and <testsuites/>) via iq_write_empty_report. tests/lanes.sh and the smoke test check them with xmllint. I could not try the Jenkins Cobertura plugin itself, so it is worth a look on a real agent.
There was a problem hiding this comment.
Tested on a real Jenkins (FMP), with a throwaway branch whose build only wrote these empty reports:
junitaccepts the empty<testsuites tests="0" failures="0"/>.recordCoverage(Coverage plugin,parser: 'COBERTURA') fails the build:CoberturaParser ... 'coverage/cobertura.xml' does not contain data, even though the XML is well-formed.
So the empty-but-valid file is not enough for the Coverage plugin. I have not tried the classic Cobertura plugin that the Jenkinsfile template uses (cobertura ... failNoReports: false), so that one is still unknown.
Suggestion: do not write coverage/cobertura.xml in build-only runs (keep the empty junit files) and let the template's publisher tolerate a missing file. To reproduce: recordCoverage(tools: [[parser: 'COBERTURA', pattern: '**/coverage/cobertura.xml']]) over the <coverage ...><sources/><packages/></coverage> that iq_write_empty_report writes.
There was a problem hiding this comment.
Fixed in 90d0dbc, following your suggestion: build-only runs no longer write coverage/cobertura.xml (a stale one is removed), only the empty junit files. The Jenkinsfile template uses the classic cobertura step with failNoReports: false, which should tolerate a missing file, but I could not try it. Could you check it once on FMP? I also added a note in the template about guarding recordCoverage with fileExists().
…g, coverage on failure, check_certs scope, valid empty reports - iq_env: an empty ASC_KEY_ID / ASC_ISSUER_ID (unset CI secret) no longer wins - build log found by whatever name fastlane gave it - Jenkins JOB_NAME sanitized before it goes into the simulator name - coverage written even when unit tests fail - check_certs only looks at the project's match profiles and the certificates they use - build-only runs write well-formed empty junit / Cobertura files - build.sh: FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT 30s (3s timed out on a busy machine) - CHANGELOG: fastlane_version is 2.242.0 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
He(mos) ajustado las cosas de tus comentarios, he abierto un issue para el tema Jenkins, y he dejado por si tú quieres hacer algún otro con las ideas de FMP. Cuando apruebes avisa, no hagas el merge que tengo que cambiar las release notes. Gracias! |
sergihernanz
left a comment
There was a problem hiding this comment.
Thanks for the fixes: I read the new code and the five threads I resolved (empty env secrets, build log name, job name, coverage on failing tests, check_certs filter) look right.
Still needs work on the empty cobertura.xml (see the open thread): with the Coverage plugin the build fails on it, tested on a real Jenkins. Everything else is fine from my side. Please don't merge before your release-notes change, as you said.
…pty one); keep empty junit Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sergihernanz
left a comment
There was a problem hiding this comment.
Approved. I read 90d0dbc: build-only runs now write no coverage/cobertura.xml (and remove a stale one), and the tests cover it.
Open item, not blocking: how recordCoverage and the classic cobertura step behave with a missing file is still untested. We'll try it on FMP when we adopt v2 and report back on the thread.
As you asked, I'm not merging: it's yours, after the release notes change. Tag v2.0.0 after the merge.
|
Approved, ready for you: I'm not merging, as you asked. Remember the |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
What
Modernizes the repo for new SPM-only iOS projects (v2). One commit per step, best reviewed commit by commit. Full list in
CHANGELOG.md.CommonFastfilewithversion: '~> 2.0'.iq_build,iq_test; generatedbuild/testlanes);scripts/build.shis a thin wrapper. Results are written even when tests fail. Coverage viaxccov-> Cobertura, junit via fastlanetrainer(no moreslather/xchtmlreport).ci.yml,distribute.yml,dependabot.yml) andJenkinsfile, offered by the generator.iq_asc_api_keyreads the App Store Connect key from CI secrets.xcodesreplacesxcode-install;.xcode-versionselects Xcode.iq_beta->iq_testflight(old name kept as a deprecated alias), generated laneship_testflight(testflightclashes with a fastlane action).versions.env(Ruby 4.0.10, tested) is the single source; projects own it in.ruby-version. A weekly workflow smoke-tests the newest Ruby and opens a bump PR or an issue.check_certs(expiry report,strict:truefor a scheduled CI job),sync_devices(devices.txt from the portal with the API key),lint(SwiftLint / SwiftFormat),bump_version(editsMARKETING_VERSIONdirectly:agvtoolcannot read projects with a generated Info.plist).scripts/doctor.shin generated projects checks the setup and explains fixes.tests/lanes.sh(fast, stubbed Spaceship and lint tools) andtests/smoke.sh(end to end: generates a sample app, runs the generator, bump_version/build/test/warnings/coverage/doctor).Breaking
Existing projects importing from the retired GitLab host need to switch to the GitHub URL and
version: '~> 2.0'.iq_betastill works but warns.Verified
Lint,LanesandSmoke testworkflows pass on a hostedmacos-latestrunner, and the smoke test also passes locally in a clean environment (env -i). Running on a fresh machine found several assumptions that only showed up there (rbenv not initialised, stale Homebrewruby-build, no UTF-8 locale), all fixed here.Still to verify (needs the code on the default branch or a real project)
Versionsworkflow via "Run workflow" (needs the setting "Allow GitHub Actions to create and approve pull requests", already on)distribute.ymlon one real project (Firebase token setup is the least certain part)After merging
Tag
v2.0.0(generated Fastfiles pin~> 2.0, which does not resolve before the tag exists).🤖 Generated with Claude Code