Continuation Orb can't find file in repo

I am using the Continuation Orb from Circle CI so that I can pass along an ENV that is determined in the Setup step. The setup step does what it is supposed to, but the continuation orb isn’t able to find the predefined yml file that I have in the repo. I COULD embed the yml, but it seems a little cleaner to have a second file and that is supposedly supported using the configuration_path property.

The second file, test.yml is in the same directory as my config.yml file… so .circle/test.yml. I did.a quick test and I can actually ‘less’ the file as a run command step, that sees it fine. However, when the Orb tries to load the file in, it throws an error.

jq: error: Could not open file .circleci/test.yml: No such file or directory

File Structure and config.yml contents

Hi @MobileVet. Welcome to the CircleCI Discuss community!

It appears that the orb’s continue job doesn’t include a checkout step, hence the issue you’re facing.

I created a pull-request for our Community & Partner Engineering team to review.

In the meantime, you can however apply either of the below workarounds:

  1. Leverage the pre-steps feature to add a checkout step before calling the continuation/continue job:

    workflows:
      setup:
        jobs:
          - setup:
              context: Deployment
          - continuation/continue:
              configuration_path: ".circleci/test.yml"
              parameters: |
                {  "targetBranch" : "$GITHUB_PR_BASE_BRANCH" }
              requires:
                - setup
              pre-steps:
                - checkout
    
    
  2. Use the continuation/continue command directly within the setup job (which already includes a checkout step) instead of relying on the continuation/continue job. The last 2 steps of the setup job would be:

    - ghpr/get-pr-info
    - continuation/continue:
              configuration_path: ".circleci/test.yml"
              parameters: |
                {  "targetBranch" : "$GITHUB_PR_BASE_BRANCH" }
    
    

The setup workflow would then only call the setup job.

 
Let me know if this helps.

1 Like

Hi @MobileVet,

Just to confirm that the above pull-request has been merged.

Please make sure to use the latest version of the orb (v0.1.3) which includes the fix for the continue job.

1 Like

Morning @yannCI

Thanks so much for this rapid turn around. The fact that you were able to quickly identify a work around AND then followed with a full merged fix, that rocked! I REALLY appreciate it.

Ok, so that definitely resolved my inclusive of a secondary config file.

The follow up (and maybe I should post this independently) but I am getting an error when I try to read the parameters I passed.

Arguments referenced without declared parameters: targetBranch
Error calling job: 'test'
Error calling workflow: 'testContinuation'

They are being passed like this:

Hi @MobileVet,

The error Arguments referenced without declared parameters: targetBranch stems from the fact that you’re using the scope for a job or command parameters.

In your configuration file, targetBranch and buildNumber are pipelines parameters, so you need to reference them using the scope pipeline.parameters:

  • << pipeline.parameters.targetBranch >>

  • << pipeline.parameters.buildNumber >>`

Thanks Yann

Really appreciate all of your help
Rob

1 Like

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