cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
47.01k stars 3.18k forks source link

Extract CI build id for Semaphore CI v2 #4671

Closed bahmutov closed 5 years ago

bahmutov commented 5 years ago
  1. For Semaphore V2 CI API we need to extract the pipeline ID and use it as ci-build-id when recording parallel runs. Typical variables
SEMAPHORE=true
SEMAPHORE_CACHE_PRIVATE_KEY_PATH=~/.ssh/semaphore_cache_key
SEMAPHORE_CACHE_URL=94.130.158.146:29920
SEMAPHORE_CACHE_USERNAME=79107557d5604bb0bc146faf8a87ae13
SEMAPHORE_GIT_BRANCH=show-semaphore-v2-266
SEMAPHORE_GIT_DIR=cypress-example-kitchensink
SEMAPHORE_GIT_REF=refs/heads/show-semaphore-v2-266
SEMAPHORE_GIT_REF_TYPE=branch
SEMAPHORE_GIT_REPO_SLUG=cypress-io/cypress-example-kitchensink
SEMAPHORE_GIT_SHA=83ce1df0f8be2767655bb805d20126ee441b71bf
SEMAPHORE_GIT_URL=git@github.com:cypress-io/cypress-example-kitchensink.git
SEMAPHORE_JOB_ID=5fb8dd98-3242-4a4e-a8ab-c4eca9db486c
SEMAPHORE_JOB_NAME=Cypress E2E 2
SEMAPHORE_PIPELINE_0_ARTEFACT_ID=a9219129-951e-4e2c-9354-45534b63fa8b
SEMAPHORE_PIPELINE_ARTEFACT_ID=a9219129-951e-4e2c-9354-45534b63fa8b
SEMAPHORE_PIPELINE_ID=a9219129-951e-4e2c-9354-45534b63fa8b
SEMAPHORE_PROJECT_ID=b717c4cc-fa0e-46f8-8bbf-589ab49a1777
SEMAPHORE_PROJECT_NAME=cypress-example-kitchensink
SEMAPHORE_WORKFLOW_ID=67aecea7-e4e7-405e-a77c-165e1b37a128
  1. The dashboard is missing some fields because we were running inside a Docker container and we need to use environment variables to grab the Git information (and links)
Screen Shot 2019-07-08 at 12 52 16 PM
cypress-bot[bot] commented 5 years ago

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

cypress-bot[bot] commented 5 years ago

Released in 3.4.0.