@snim2 Thanks for quick update, Below is my yml file, You correct about bundle I am doing same thing, However with iOS pod installation every time consume 4 to 5 mins. There is no guide how we can cache that.
build_project:
stage: build
cache:
key:
files:
- yarn.lock
paths:
- .yarn-cache/
key:
files:
- cd ios && Podfile.lock
paths:
- .pod-cache/
key:
files:
- Gemfile.lock
paths:
- vendor/ruby
#TODO use a propper tags like: chronext, macos, macos26, xcode, xcode15, fastline, fastline45 and not this useless "beta beta-build beta-deploy beta-deployment prod prod-deploy production production-build production-deployment"
tags:
- beta-deployment
- beta-build
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: always
- if: '$CI_COMMIT_BRANCH == "feature/gitlab-ci"'
when: always
- when: never
script:
- cd .. && yarn install --cache-folder .yarn-cache
- cd ios && gem install bundler
- bundle install --path=vendor
- pod install
- bundle exec fastlane beta
I think the above is most likely your problem. The paths key here must be a list of paths, so you can’t use BASH commands in that value. I think you likely want:
@snim2 Ok I got your point still it is not working and not sure how to point cache folder for pod installcommand like bundle install --path=vendor even this does not work, How can we do same with pods?
It seems GItLab has very outdated document and really do not update CI document at all. I tried below and followed exact instructions in below screenshot and still cache does not work for bundle install as well.
So, as I say, I don’t use Cocoapods, but their documentation suggests you should be caching ~/.cocoapods and ~/Library/Caches/CocoaPods. There’s a bit more detail on that page…