
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@qawolf/ci-sdk
Advanced tools
:warning: This is an experimental package. Please report any issues you encounter to your support channel. It should still provide a better experience than using our internal GraphQL API directly.
This package provides a TypeScript (CSM and ESM compatible) SDK to interact with the QAWolf Customer-facing API.
It exposes two functions associated with the two central endpoints, showcased in the examples below.
Note that these functions do not throw. They yield a result object that contains the outcome of the operation. This outcome should be scrutinized to determine the status of your CI/CD step/job/action.
import { type DeployConfig, makeQaWolfSdk } from "@qawolf/ci-sdk";
// Edit this to your needs.
const deployConfig: DeployConfig = {
branch: undefined,
commitUrl: undefined,
deduplicationKey: undefined,
deploymentType: undefined,
deploymentUrl: undefined,
hostingService: undefined,
sha: undefined,
variables: undefined,
};
const { attemptNotifyDeploy } = makeQaWolfSdk({
apiKey: "qawolf_xxxxx",
});
(async () => {
const result = await attemptNotifyDeploy(deployConfig);
if (result.outcome !== "success") {
// Fail the job.
process.exit(1);
}
const runId = result.runId;
// Store the runId as an output of the job to be used in a CI-greenlight job.
// This will depend on the CI platform you are using.
})();
import { makeQaWolfSdk } from "@qawolf/ci-sdk";
const { pollCiGreenlightStatus } = makeQaWolfSdk({
apiKey: "qawolf_xxxxx",
});
(async () => {
// Retrieve runId from the previous job.
const { outcome } = await pollCiGreenlightStatus({
runId,
// Optional: Callback to be called when the run stage changes.
// See https://qawolf.notion.site/1b170576efea411fa785842a71e7c99e for
// documentation on these run stages.
onRunStageChanged: (current, previous) => {
console.log(current, previous);
},
});
if (outcome !== "success") {
// Fail the job.
// This will depend on the CI platform you are using.
// You can also distinguish between "failed" and "aborted" outcomes.
// Only "failed" outcome indicates bugs were found.
process.exit(1);
}
// Continue CI.
})();
This package follows the SemVer versioning scheme. Additional notes:
^
range operator for this package, as it will not introduce breaking changes and guarantee
an up-to-date API usage version.failReason
, abortReason
and httpStatus
fields added to the attemptNotifyDeploy
function result object to provide more context on why the operation failed or was aborted.pollTimeout
parameter for pollCiGreenlightStatus
to allow for a custom
timeout in milliseconds for the polling operation. It now defaults to two hours.abortReason
and httpStatus
fields added to the PollCiGreenlightStatus
type
with "aborted"
outcome to provide more context on why the poll was aborted.DeployConfig.hostingService
type to match API requirements.LogDriver
interface for easy integration with GHA
core
interface.reproducedBugs
field from CI-greenlight API.:warning: These are the last breaking changes brought to the 0.x major version. These are being introduced while the SDK hasn't been advertised to the public yet. Future changes will follow the SemVer versioning scheme.
BREAKING CHANGES:
pollCiGreenlightStatus
and attemptNotifyDeploy
now return a "result" object
with an outcome
field that can be either "success"
, "failed"
or "aborted"
,
instead of exiting the process with a non-zero code. This will provide more
flexibility to the user to decide how to handle the outcome.BREAKING CHANGES:
attemptDeploy
to attemptNotifyDeploy
.Initial release.
/api/deploy_success
/api/v0/ci-greenlight/[root-run-id]
FAQs
A simple SDK for interacting with QAWolf in CI scripts.
The npm package @qawolf/ci-sdk receives a total of 5,616 weekly downloads. As such, @qawolf/ci-sdk popularity was classified as popular.
We found that @qawolf/ci-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.