Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

$HEROKU_TEST_RUN_BRANCH not accurate when running ci:debug #48

@jmorrell

Description

@jmorrell

It appears that if I run heroku ci:debug from a non-master branch I will be dumped into a dyno with my master branch, but the $HEROKU_TEST_RUN_BRANCH will tell me that I am on the local branch.

Link to slack discussion: https://heroku.slack.com/archives/C1P0609FC/p1498764480135177

I expect HEROKU_TEST_RUN_BRANCH to be the branch that I see when I run heroku ci:debug, but that is not the branch that I see.
Let me try to make it clearer: try-npm5 does not have a yarn.lock file, instead it has a package-lock.json

❯ ls
Procfile          app.json          config.js         flow-typed        node_modules      package.json
__tests__         bin               dev               lib               package-lock.json readme.md

But when I run debug I get what looks like my master branch: yarn.lock exists and package-lock.json is nowhere to be found:

❯ heroku ci:debug --pipeline nodebin
[ lots of output]
~ $ git status
fatal: Not a git repository (or any parent up to mount point /app)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
~ $ ls
Procfile  __tests__  app.json  bin  config.js  dev  flow-typed  lib  node_modules  package.json  readme.md  yarn.lock
~ $ eval $(ci env)
~ $ env
[ elided ]
HEROKU_TEST_RUN_BRANCH=try-npm5```

Link to code picking up the local branch in the CLI: https://github.com/heroku/heroku-ci/blob/master/commands/ci/debug.js#L50

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions