Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@aircall/ci-scripts
Advanced tools
Centralize CircleCI scripts for all project
prerelease
job in the .circleci/config.yml
file of your projectexecutors:
(...)
node:
docker:
- image: circleci/node:10.11.0
jobs:
(...)
create-prerelease:
executor: node
steps:
- run:
name: Create pre-release
command: npx @aircall/ci-scripts prerelease
workflows:
version: 2
commit-workflow:
jobs:
(...)
- create-prerelease:
requires:
- {job_name}
release
jobjobs:
(...)
convert-release:
executor: node
steps:
- run:
name: Convert pre-release to release
command: npx @aircall/ci-scripts release --from-prerelease
Use the node executor and insert the job in a workflow just like for the prerelease
job.
Add JIRA_BASE_URL
and GITHUB_CREDENTIALS
env vars in CircleCI.
Authorize our deployment Github account to access to your GitHub project as a Collaborator: https://github.com/{username}/{project}/settings/collaboration
You'll need to pass your Github credentials to run a command. Those credentials are formatted as username:access_token
.
To generate a new access token:
repo
scope.For your project to use the local ci-scripts
project, you must:
ci-scripts
project, run npm link
npm link ci-scripts
Now you should be able to run ci-scripts
from your project. You'll miss some environment variables though.
To fetch the version of the latest release of the phone, call the latest_version
command with the correct variables:
CIRCLE_PROJECT_USERNAME
: aircallCIRCLE_PROJECT_REPONAME
: the project for which you want to retrieve the latest release versionGITHUB_CREDENTIALS
: concatenation of your Github username and your personal access tokenJIRA_BASE_URL
: aircall Jira base urlCIRCLE_PROJECT_USERNAME=aircall CIRCLE_PROJECT_REPONAME=phone GITHUB_CREDENTIALS=litil:access_token JIRA_BASE_URL=https://aircall.atlassian.net ci-scripts latest_version
Replace access_token
with your personal access token.
Verify if there is an ongoing Workflow on CircleCI, and if there is one, make a pause. This script is particularly usefull when run on deployment jobs, to ensure no overlapping deployment is possible.
npx ci-scripts check-running-jobs
This will launch a test suite on a Jenkins instance with the Parameterized Build plugin. The script then watches the queue, waits for the test suite to end and notifies on Slack if the test suite fails.
npx ci-scripts e2e-tests
Create a release draft with a generated changelog based on merged Pull Requests from the last release to the CircleCI Workflow current commit.
npx ci-scripts draft
If there is no draft: Create a prerelease/release with a generated changelog based on merged Pull Requests from the last release to the CircleCI Workflow current commit.
If there is a draft: Convert the draft into a prerelease/release. If the draft is on a different target commit that the release, The draft will be converted with only the needed changelog for the prerelease/release, and another draft will be created with the changelog diff.
npx ci-scripts prerelease
npx ci-scripts release
Same as above, but the changelog will be generated from the last release to the last merged Pull Request
npx ci-scripts prerelease --to-last-commit
npx ci-scripts release --to-last-commit
Create the prerelease/release on an existing tag, based on CIRCLE_TAG
npx ci-scripts prerelease --from-circle-ci-tag
npx ci-scripts release --from-circle-ci-tag
npx ci-scripts release --from-prerelease
npx ci-scripts changelog
npx ci-scripts next_version
npx ci-scripts latest_version
npx ci-scripts previous_version
additionally you can pass a flag to get the relative previous release from the current one based on the CIRCLE_SHA1
value
npx ci-scripts previous_version --from-circle-ci-sha1
jobs:
slack-notify:
executor: node
parameters:
env:
type: string
channel:
type: string
steps:
- *restore-workspace
- run: npx @aircall/ci-scripts notify-slack << parameters.env >> << parameters.channel >>
workflows:
version: 2
build-deploy:
jobs:
- checkout-install-dependencies
- slack-notify:
requires: [checkout-install-dependencies]
filters: *branch-filter
env: staging
channel: aircall-xyz
For a rollback message
jobs:
slack-notify:
executor: node
parameters:
env:
type: string
channel:
type: string
steps:
- *restore-workspace
- run: npx @aircall/ci-scripts notify-slack << parameters.env >> << parameters.channel >> << parameters.title >>
workflows:
version: 2
build-deploy:
jobs:
- checkout-install-dependencies
- slack-notify:
requires: [checkout-install-dependencies]
filters: *branch-filter
env: production
channel: aircall-xyz
title: rollback
FAQs
Centralize CircleCI scripts for all project
We found that @aircall/ci-scripts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.