Skip to content

chore: migrate release process to Ship.js#1210

Merged
eunjae-lee merged 7 commits intomasterfrom
chore/migrate-release-to-shipjs
Sep 30, 2020
Merged

chore: migrate release process to Ship.js#1210
eunjae-lee merged 7 commits intomasterfrom
chore/migrate-release-to-shipjs

Conversation

@aseure
Copy link
Copy Markdown

@aseure aseure commented Sep 28, 2020

chore: migrate release process to Ship.js

This commit introduces a new release process by:

Notable changes are:

  • version attribute added to the package.json file: this is a bit
    redundant with the version attribute available in the lerna.json
    but it is required by conventional-changelog-cli, which is used by Ship.js,
    to generate new Changelog entries, and can only identify versions based
    on the package.json file.
  • CHANGELOG.md text header has been removed because
    conventional-changelog-ci is not aware of headers in Changelog
    files.
  • GITHUB_TOKEN environment variable is now added to the CircleCI
    configuration. It grants CircleCI with the appropriate rights to run
    shipjs trigger, effectively publishing to NPM. The value is set to
    the Github account algolia-api-client-bot which can be retrieved
    from our Vault cluster, like other credentials.
  • CONTRIBUTING.md file updated to reflect the updated release process.

@eunjae-lee
Copy link
Copy Markdown
Contributor

You may want to address in CONTIRBUTING.md about how you should prepend GITHUB_TOKEN or add it to .env file before running npm run release.

@aseure
Copy link
Copy Markdown
Author

aseure commented Sep 29, 2020

@eunjae-lee thanks for the review buddy and for your help with Ship.js! I've addressed your comments.

You may want to address in CONTIRBUTING.md about how you should prepend GITHUB_TOKEN or add it to .env file before running npm run release.

Good point, just added it to the CONTRIBUTING.md file 👍

@aseure aseure force-pushed the chore/migrate-release-to-shipjs branch from 33d861b to 6c1f8e0 Compare September 29, 2020 08:32
eunjae-lee
eunjae-lee previously approved these changes Sep 29, 2020
Copy link
Copy Markdown
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good to me, but I see a circleci job failing and some other jobs are not triggered yet.

This commit introduces a new release process by:

- removing the need for the scripts/release.sh bash script in favor of
  https://github.com/algolia/shipjs.
- automating the release in CircleCI

Notable changes are:

- `version` attribute added to the `package.json` file: this is a bit
  redundant with the `version` attribute available in the `lerna.json`
  but it is required by `conventional-changelog-cli`, which is used by Ship.js,
  to generate new Changelog entries, and can only identify versions based
  on the `package.json` file.
- `CHANGELOG.md` text header has been removed because
  `conventional-changelog-ci` is not aware of headers in Changelog
  files.
- `GITHUB_TOKEN` environment variable is now added to the CircleCI
  configuration. It grants CircleCI with the appropriate rights to run
  `shipjs trigger`, effectively publishing to NPM. The value is set to
  the Github account `algolia-api-client-bot` which can be retrieved
  from our Vault cluster, like other credentials.
- `CONTRIBUTING.md` file updated to reflect the updated release process.
@aseure
Copy link
Copy Markdown
Author

aseure commented Sep 29, 2020

@Haroenv @eunjae-lee The Required checks are pending because I've had to explicitely rename the CircleCI jobs for this to pass. Are you fine if I edit the branch protection rules on my own right now or do you prefer to do it on your own later (because they are some pending pull requests opened as well).

I've updated the Confluence documentation and updated the CONTRIBUTING.md to reflect this, added our credentials to Vault. Could you have a last review before I merge this? Thanks!

- test_browser
filters:
tags:
only: /^[1-9]+.[0-9]+.[0-9]+.*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't it this way still only run for tags?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes my bad, I've left the filters we are using on all other API clients but in your case, you only need to build on master, since shipjs trigger already filters based on the commit message.

Perhaps the other filters are not needed anymore in that case (in all dependent jobs).

- test_unit:
version: '8'
name: 'test_unit_8'
filters:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think most of these filters can also be removed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me!

@eunjae-lee
Copy link
Copy Markdown
Contributor

@Haroenv Do you know what's going on here?
image

The job names seem to be messed up.

@Haroenv
Copy link
Copy Markdown
Contributor

Haroenv commented Sep 30, 2020

the names of the tests have changed, so it's expected the "required" ones aren't ran. After we merge this PR we need to change which ones are required

@eunjae-lee
Copy link
Copy Markdown
Contributor

the names of the tests have changed, so it's expected the "required" ones aren't ran. After we merge this PR we need to change which ones are required

Ah I didn't know the names have changed in this PR.

@eunjae-lee eunjae-lee merged commit f82bd48 into master Sep 30, 2020
@eunjae-lee eunjae-lee deleted the chore/migrate-release-to-shipjs branch September 30, 2020 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants