Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing information about git branch in cypress dashboard runs for CodeFresh #4609

Closed
tnrich opened this issue Jun 28, 2019 · 4 comments · Fixed by #15117
Closed

Missing information about git branch in cypress dashboard runs for CodeFresh #4609

tnrich opened this issue Jun 28, 2019 · 4 comments · Fixed by #15117
Assignees
Labels
CI General issues involving running in a CI provider good first issue Good for newcomers pkg/server This is due to an issue in the packages/server directory

Comments

@tnrich
Copy link
Contributor

tnrich commented Jun 28, 2019

Much like similar issues, the cypress dashboard isn't getting the git info from the CI runs in CodeFresh:

image

Help troubleshooting this would be appreciated! Thanks!

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Jul 1, 2019

We determine CI provider and what env vars are collected into Cypress here, including how we get any git information: https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/util/ci_provider.js

Here are CodeFresh's exposed environment variables - they need to be added to the ci_provider.js file just like the others and also have tests written within https://github.com/cypress-io/cypress/blob/develop/packages/server/test/unit/ci_provider_spec.coffee#L1

@jennifer-shehane jennifer-shehane added the pkg/server This is due to an issue in the packages/server directory label Jul 1, 2019
@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label Jul 1, 2019
@jennifer-shehane jennifer-shehane added good first issue Good for newcomers stage: ready for work The issue is reproducible and in scope CI: codefresh and removed stage: ready for work The issue is reproducible and in scope labels Jul 1, 2019
@bahmutov
Copy link
Contributor

bahmutov commented Feb 16, 2021

Example project in https://github.com/bahmutov/cypress-codefresh-example

Codefresh default environment variables https://codefresh.io/docs/docs/codefresh-yaml/variables/#using-codefresh-variables-in-your-pipelines

For example here is a push commit

Found environment variables that start with CF_:
CF_ACCOUNT=bahmutov
CF_API_KEY=...
CF_BRANCH=main
CF_BRANCH_TAG_NORMALIZED=main
CF_BRANCH_TAG_NORMALIZED_LOWER_CASE=main
CF_BRANCH_VERSION_NORMALIZED=main
CF_BUILD_ID=602c2258b034d9aa13149d33
CF_BUILD_INITIATOR=bahmutov
CF_BUILD_TIMESTAMP=1613505112419
CF_BUILD_TRIGGER=webhook
CF_BUILD_URL=https://g.codefresh.io/build/602c2258b034d9aa13149d33
CF_CLI_RUN_WAIT_FALLBACK=true
CF_COMMIT_AUTHOR=bahmutov
CF_COMMIT_MESSAGE=print env variables
CF_COMMIT_URL=https://github.com/bahmutov/cypress-codefresh-example/commit/36e18a72ccc87f0d70fe46284ea65c1cc496d69c
CF_CURRENT_ATTEMPT=1
CF_HOST_IP=dind-602c2258b034d9aa13149d33.dind.workflow
CF_HOST_NAME=dind-602c2258b034d9aa13149d33.dind.workflow
CF_MAX_ATTEMPTS=1
CF_PIPELINE_NAME=Cypress Codefresh Example/e2e
CF_PIPELINE_TRIGGER_ID=602c1e1acdbdb25953d416ae
CF_REPO_NAME=cypress-codefresh-example
CF_REPO_OWNER=bahmutov
CF_REVISION=36e18a72ccc87f0d70fe46284ea65c1cc496d69c
CF_SHORT_REVISION=36e18a7
CF_STEP_NAME=test
CF_URL=https://g.codefresh.io
CF_VOLUME_PATH=/codefresh/volume

and here is a pull request commit

CF_ACCOUNT=bahmutov                                                                                                                                              
CF_API_KEY=...                                                                                             
CF_BRANCH=test-branch                                                                                                                                            
CF_BRANCH_TAG_NORMALIZED=test-branch                                                                                                                             
CF_BRANCH_TAG_NORMALIZED_LOWER_CASE=test-branch                                                                                                                  
CF_BRANCH_VERSION_NORMALIZED=test-branch                                                                                                                         
CF_BUILD_ID=602c2c76f0044dccd0005214                                                                                                                             
CF_BUILD_INITIATOR=bahmutov                                                                                                                                      
CF_BUILD_TIMESTAMP=1613507704128                                                                                                                                 
CF_BUILD_TRIGGER=webhook                                                                                                                                         
CF_BUILD_URL=https://g.codefresh.io/build/602c2c76f0044dccd0005214                                                                                               
CF_CLI_RUN_WAIT_FALLBACK=true                                                                                                                                    
CF_COMMIT_AUTHOR=bahmutov                                                                                                                                        
CF_COMMIT_MESSAGE=test pull request                                                                                                                              
CF_COMMIT_URL=https://github.com/bahmutov/cypress-codefresh-example/commit/049d2ddd2c99de633338e3e845781325f017c7fb                                              
CF_CURRENT_ATTEMPT=1                                                                                                                                             
CF_HOST_IP=dind-602c2c76f0044dccd0005214.dind.workflow                                                                                                           
CF_HOST_NAME=dind-602c2c76f0044dccd0005214.dind.workflow                                                                                                         
CF_MAX_ATTEMPTS=1                                                                                                                                                
CF_PIPELINE_NAME=Cypress Codefresh Example/e2e                                                                                                                   
CF_PIPELINE_TRIGGER_ID=602c1e1acdbdb25953d416ae                                                                                                                  
CF_PULL_REQUEST_ACTION=synchronize                                                                                                                               
CF_PULL_REQUEST_ID=574452314                                                                                                                                     
CF_PULL_REQUEST_IS_FORK=false                                                                                                                                    
CF_PULL_REQUEST_NUMBER=1                                                                                                                                         
CF_PULL_REQUEST_TARGET=main                                                                                                                                      
CF_REPO_NAME=cypress-codefresh-example                                                                                                                           
CF_REPO_OWNER=bahmutov                                                                                                                                           
CF_REVISION=049d2ddd2c99de633338e3e845781325f017c7fb 
CF_SHORT_REVISION=049d2dd                                                                                                                                        
CF_STEP_NAME=test                                                                                                                                                
CF_URL=https://g.codefresh.io                                                                                                                                    
CF_VOLUME_PATH=/codefresh/volume

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 17, 2021

The code for this is done in cypress-io/cypress#15117, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 1, 2021

Released in 6.6.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v6.6.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 1, 2021
@jennifer-shehane jennifer-shehane added CI General issues involving running in a CI provider and removed CI: codefresh labels Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI General issues involving running in a CI provider good first issue Good for newcomers pkg/server This is due to an issue in the packages/server directory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants