Unable to disable cocoapods cache

step
ios
#1

Hi,

I am using cocoapods as dependency manager of ios app.
I include all cocoapods artifacts into git, so I don’t run pod install on bitrise CI.
But Pods/ directory are cached somehow.
I’ve tried following things but no success.

  • envman add --append -k BITRISE_CACHE_EXCLUDE_PATHS -v ./ios/Pods/
  • envman add --append -k BITRISE_CACHE_EXCLUDE_PATHS -v ./ios/Pods
  • envman add --append -k BITRISE_CACHE_EXCLUDE_PATHS -v ios/Pods/
  • envman add --append -k BITRISE_CACHE_EXCLUDE_PATHS -v ios/Pods
  • - ignore_check_on_paths: ./ios/Pods/
  • - ignore_check_on_paths: ./ios/Pods
  • - ignore_check_on_paths: ios/Pods/
  • - ignore_check_on_paths: ios/Pods

What am I missing?

Thanks

0 Likes

#3

Does your build include the Cocoapods Install step? If so, make sure that you set the step input “Disable built-in cache” to “true”.

0 Likes

#4

@cathy.harmon
Thanks,
I include cocoapods artifacts into git, so
I don’t install cocoapods deps on bitrise.

0 Likes

#5

Could you share the build log URL and enable support access? You can find the support access under the “Settings” tab on the app page.

Thanks

0 Likes

#6

Thanks,

Here it is.

0 Likes

#7

It looks like the workflow that has the cache-push is run from repo so I can’t actually see the settings. Could you provide this? Also, please enable debug mode for the step and provide the build log with that.

Thanks,
cathy

0 Likes

#8

I already enabled debug mode for cache steps.

---
format_version: 5
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
workflows:
  _cache-pull:
    steps:
    - cache-pull:
        inputs:
        - is_debug_mode: 'true'
        - allow_fallback: 'false'

  _cache-push:
    steps:
    - cache-push:
        inputs:
        - compress_archive: 'true'
        - is_debug_mode: 'true'
        - cache_paths: |-
            ./node_modules -> ./yarn.lock
            ./vendor/bundle -> ./Gemfile.lock
        - bitrise_cache_exclude_paths: |-
            ./ios/Pods/
            $HOME/.gradle/

  _install-dependencies:
    steps:
    - script:
        inputs:
        - content: |-
            #!/bin/bash
            set -ex
            # sync submodules
            git submodule sync
            git submodule update --init

            # install ruby dependencies
            gem install bundler:2.2.14
            bundle install --path=vendor/bundle --clean

            # install node project dependencies
            yarn
            npm link packages/some
            npm link packages/others

  stage-ios:
    after_run:
    - _cache-push
    before_run:
    - _cache-pull
    - _install-dependencies
    steps:
    - fastlane@2.7.1:
        title: Build ipa
        inputs:
        - lane: ios build build_number:$BITRISE_BUILD_NUMBER
        - update_fastlane: 'false'
    - fastlane@2.7.1:
        title: Upload ipa to DeployGate
        inputs:
        - lane: ios deploy
        - update_fastlane: 'false'
    envs:
    - ENV: dev
0 Likes

#9

For the “Ignore Paths for change check”, you can specify paths not to include in the cache:

Paths prefixed with an ! will get ignored from the cache archive**.
If a path is located inside a specified Cache Path item and not prefixed with an !, it’ll be included in the cache archive, but won’t be checked for changes.

Cathy

0 Likes

#10

@cathy.harmon

Thanks I will try it. But I have another question,

For the “Ignore Paths for change check”, you can specify paths not to include in the cache:

If ignore_check_on_paths were to specify paths not to include in the cache,
what bitrise_cache_exclude_paths is for?
I thought it were to specify paths not to include in the cache.

Thanks,

0 Likes

#11

The last three “step inputs” listed are really for the step to use and cannot be changed. If you notice, they have “is_dont_change_value: true”. They are strictly for internal use by the step.

0 Likes

#12

I didn’t know that. Thanks for your explanation.
And ignore_check_on_paths seems to work works fine, thanks for that too.

But why my ios/Pods got cached even thou I ain’t specify it in cache_paths?

0 Likes

#13

@cathy.harmon
Is is a kind of default paths to be cached?

0 Likes

#14

I believe so - that be default, it will be cached.

0 Likes

#15

@cathy.harmon
What do you mean you “believe”?
I though that you are a guy in bitrise, aren’t you?

0 Likes

#16

@cathy.harmon
Sorry to bother you.

Do you know the way to exclude all cache paths without those I specified?
I want remove all the cache paths specified by Bitrise.
Never want you to cache anything other than I request.
How can I achieve that?

Thanks,

0 Likes