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

Add comment to commits in "develop" explaining how to install beta version #4525

Closed
bahmutov opened this issue Jun 19, 2019 · 1 comment

Comments

2 participants
@bahmutov
Copy link
Collaborator

commented Jun 19, 2019

Background

Currently every commit that lands into "develop" branch triggers a CI build on each platform (Linux, Mac, Win 32 and 64) which produces NPM module cypress.tgz and application binary cypress.zip. These two files are uploaded to a temporary S3 folder where they are used to test downstream projects. Typical test commit message like cypress-io/cypress-test-example-repos@295f6ac

is below

Testing new win32 x64 Cypress version 3.3.2 448de97

{
  "platform": "win32",
  "arch": "x64",
  "env": {
    "CYPRESS_INSTALL_BINARY": "https://cdn.cypress.io/beta/binary/3.3.2/win32-x64/appveyor-develop-448de97b9d901e04d6aaf21fe3b5f068092e4761-25393127/cypress.zip"
  },
  "packages": "https://cdn.cypress.io/beta/npm/3.3.2/appveyor-develop-448de97b9d901e04d6aaf21fe3b5f068092e4761-25393127/cypress.tgz",
  "branch": "3.3.2",
  "commit": "448de97b9d901e04d6aaf21fe3b5f068092e4761",
  "status": {
    "owner": "cypress-io",
    "repo": "cypress",
    "sha": "448de97b9d901e04d6aaf21fe3b5f068092e4761",
    "platform": "win32",
    "arch": "x64",
    "context": "[win32-x64] cypress-test-example-repos"
  }
}

Use tool `@cypress/commit-message-install` to install from above block

AppVeyor: cypress-io/cypress 6528

Each CI runs the tests - since this is a Win 64bit binary, Linux and Mac CI jobs finish right away, and only the AppVeyor Windows CI 64bit actually tests the new binary

Screen Shot 2019-06-19 at 3 14 23 PM

The above message shows how to install the beta release: you need to set environment variable CYPRESS_INSTALL_BINARY to the beta url and then install cypress.tgz url. This is platform-specific binary, thus only on Windows 64bit machine you should do

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.3.2/win32-x64/appveyor-develop-448de97b9d901e04d6aaf21fe3b5f068092e4761-25393127/cypress.zip
npm i https://cdn.cypress.io/beta/npm/3.3.2/appveyor-develop-448de97b9d901e04d6aaf21fe3b5f068092e4761-25393127/cypress.tgz

On Linux one needs to find a Linux build for commit 448de97b9d901e04d6aaf21fe3b5f068092e4761 - in this case it listed in cypress-io/cypress-test-example-repos@bc5c376
and run to install

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.3.2/linux-x64/circle-develop-448de97b9d901e04d6aaf21fe3b5f068092e4761-125099/cypress.zip

npm i https://cdn.cypress.io/beta/npm/3.3.2/circle-develop-448de97b9d901e04d6aaf21fe3b5f068092e4761-125112/cypress.tgz

Note: the NPM package usually does NOT change and is NOT platform-specific just yet. Thus it should be ok to install cypress.tgz from any OS

Problem

Some of our users would like to try a beta release of Cypress before it is published to NPM to test new changes and fixes. For example, see #4313 (comment)

Even we ourselves sometimes need to try out a built pre-release binary against a particular project and would need an easy way to pull this info.

Proposal

For now, let's comment on each commit in develop branch like 448de97 from the build job with information on how to install this particular binary. We already have commit status checks for pull requests and can use the same logic to comment on commit. There will be several comments I guess (each built platform) but I think this is acceptable

@cypress-bot

This comment has been minimized.

Copy link

commented Jul 8, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.