Unable to generate TestRail results

Hi all, I’m trying to generate test rail report but I’m unable to see any test rail results. There is my .circleci/config.yml

    version: 2.1
orbs:
  ruby: circleci/ruby@0.1.2 
    
workflows:
  android-workflow:
    jobs:
  - android:
      context: PlayerTesting                  

jobs:
  android:
    docker:
  - image: circleci/ruby:2.5.1
executor: ruby/default
steps:
  - checkout
  - run:
      name: run android player automation 
      command: |
        *********************************************
		************************************************
		
        bundle exec rake tasks:clean_log_directories --trace
        bundle exec rake browser_stack:check_bs_builds --trace
        bundle exec rake browser_stack:wait_for_browserstack_sessions --trace
        bundle exec rake app:android_parameterized["Samsung Galaxy S9","8.0"] --trace
        
  - run:
      name: generate html report
      when: always
      command: bundle exec rake tasks:generate_report --trace   
                     
  - store_artifacts:
      path: reports

  - run:
      name: generate Test rail
      when: always
      command: chmod +x ./bin/publish_results     

Added a cucumber_testrail.yml file to the root directory containing the following information:

testrail_url: "https://xxxxxxxxx.testrail.net/index.php?"

suites:

  - suite:
  project_id: XX
  project_symbol: 'SYM'
  suite_id: XX
  testplan_id: XX

Added a bin folder in root directory and created a bin/publish_results class which contains

#!/usr/bin/env bash

if [ "$CIRCLE_BRANCH" == "master" ]; then
node dist/index.js -c cucumber_testrail.yml -r reports/tests.cucumber -u $TESTRAIL_USERNAME -p $TESTRAIL_PASSWORD -i 'CIRCLECI_UPDATE'
fi

And added Tag over feature file as
@TestRail-SYM-1

But still I’m unable to see the generated test rail report. Can you please let me know the issue in my configuration if I’m having.
While running config.yml I’m getting exit code 0.

Hi @anshul-discoveryI is the value in branch envar “MASTER” or “master” I suspect case-sensitivity in the line if [ "$CIRCLE_BRANCH" == "MASTER" ]; then might be your problem.

Also you can create filters in your workflow jobs to specify when to trigger jobs in pipelines.

Hi @punkdata I tried your solution also but I’m still getting same issue. Testrail reports are not generating.

Can you share you’re config with your changes?

There is no change in config file. I updated only MASTER into master in publish_results file