Can I make Bitrise CLI to clone automatically the project locally to run it?

Hello everyone.

I have a project running on bitrise.io that works fine. But I’d like to build that same project locally. In a similar way that is working on bitrise.io, but locally.

What I’m trying to do is the following:
1.- I installed bitrise CLI in my local machine. Everything looks fine here.
2.- I copied the bitrise.yml and created a bitrise.secrets.yml with all the necessary values too
3.- I can run workflow-editor and I see properly the steps
4.- I can run bitrise run my_workflow and it tries to run the workflow, but it fails.

What it’s happening is that it activates the ssh successfully, but then it doesn’t clone or pull anything from the repo, it just skips the clone step

                                          ▼

INFO[08:00:45] Step uses latest version -- Updating StepLib ... 
+------------------------------------------------------------------------------+
| (1) git-clone@6.1                                                            |
+------------------------------------------------------------------------------+
| id: git-clone                                                                |
| version: 6.1.2                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2022-05-06T08:00:47+02:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
WARN[08:00:47] The step's (git-clone@6.1) Run-If expression evaluated to false - skipping 
INFO[08:00:47] The Run-If expression was: .IsCI  
|                                                                              |
+---+---------------------------------------------------------------+----------+
| - | git-clone@6.1                                                 | 2.20 sec |
+---+---------------------------------------------------------------+----------+

         ▼

+------------------------------------------------------------------------------+
| (2) cache-pull@2.1.4                                                         |
+------------------------------------------------------------------------------+
| id: cache-pull                                                               |
| version: 2.1.4                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2022-05-06T08:00:47+02:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
WARN[08:00:47] The step's (cache-pull@2.1.4) Run-If expression evaluated to false - skipping 
INFO[08:00:47] The Run-If expression was: .IsCI  
|                                                                              |
+---+---------------------------------------------------------------+----------+
| - | cache-pull@2.1.4                                              | 0.47 sec |
+---+---------------------------------------------------------------+----------+
| Update available: 2.1.4 -> 2.5.0                                             |
|                                                                              |
| Release notes are available below                                            |
| https://github.com/bitrise-steplib/steps-cache-pull.git/releases             |
+---+---------------------------------------------------------------+----------+
                                         

I’m wondering if I’m missing some repository url variable for that.

Is it even possible to do it?

I know that I can clone the project by myself, and checkout to any branch and pull the changes manually, but is it possible to do it automatically just like in the bitrise.io site?

Any other alternative otherwise, what would be the right procedure to get what I’m trying to get?

Thank you so much in advance!

HI,

by default the git clone is disable en local. To enable it just change the run_if condition like following:

- git-clone@6:
    run_if: true

source: Enabling or disabling a Step conditionally - Bitrise Docs

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.