Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
grunt-circleci
Advanced tools
This plugin allows to check the status of a CircleCI build associated to a commit. Useful for apps that need to check for a successful status before running a critical task, like the app deploy.
This plugin requires Grunt ~0.4.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-circleci --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-circleci');
In order to configure the plugin, you need to add a new section circleci
to the object in grunt.initConfig()
.
grunt.initConfig({
circleci: {
token: 'MySuperSecretTokenGeneratedOnCircleCI'
username: 'VividCortex',
project: 'grunt-circleci',
commit: 'TheHashOfTheCommit'
}
});
The following options allow to customize the behaviour of the status check:
Type String
Default: master
The name of the branch by which to filter the builds.
Type Boolean
Default: false
Whether the check should retry or not if the build is currently running.
Type Number
Default: 20000
(20 seconds)
The time in milliseconds the check should wait to retry if retryOnRunning is enabled.
Type Number
Default: 600000
(10 minutes)
The time in milliseconds after which the check should fail if the build is still running and retryOnRunning is enabled.
grunt.initConfig({
circleci: {
token: 'MySuperSecretTokenGeneratedOnCircleCI'
username: 'VividCortex',
project: 'grunt-circleci',
commit: 'TheHashOfTheCommit',
options: {
branch: 'master',
retryOnRunning: false,
retryAfter: 2e4,
timeout: 6e5
}
}
});
The basic usage requires you to execute the following simple command:
grunt circleci
If grunt is configured properly, you can use custom values for the commit hash, for instance:
grunt.initConfig({
circleci: {
token: 'MySuperSecretTokenGeneratedOnCircleCI'
username: 'VividCortex',
project: 'grunt-circleci',
commit: grunt.option('commit')
}
});
and run the command as:
grunt circleci --commit=TheHashOfTheCommit
grunt-gitinfo is a very useful plugin for grunt that allows to fetch some information about your GIT repository. By using it, you will be able to check the status for the latest commit.
grunt.initConfig({
// ...
gitinfo: {},
circleci: {
// ...
// Use the commit hash
commit: '<%= gitinfo.local.branch.current.SHA %>'
}
});
// Get the repo information before checking the status
grunt.registerTask('check-build', ['gitinfo', 'circleci']);
And then, run the following command to check the status:
grunt check-build
Copyright (c) 2014 VividCortex. Licensed under the MIT license.
FAQs
Grunt plugin to check CircleCI build status
The npm package grunt-circleci receives a total of 4 weekly downloads. As such, grunt-circleci popularity was classified as not popular.
We found that grunt-circleci demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.