The following files are needed to turn a Docker Desktop extension into a skill:
datalog
- datalog subscriptionsskill.yaml
- skill metadataDockerfile
- copyingskill.yaml
anddatalog
into the file system root of the final image; add thecom.docker.skill.api.version="extension/v2"
label- Add
@atomist/[email protected]
to your dependencies
With these changes in place, you can now call subscribe
in your Extension UI:
skill.subscribe({
namespace: "atomist",
name: "skill-extension",
apiKey: "<api key>",
workspaceId: "<workspace id>",
debug: true,
}, {"new_issue": async ctx => {
setResponse(JSON.stringify(ctx.event.context.subscription.result[0][0]));
return skill.status.completed("Handled new issue event");
}}, require("pusher-js/with-encryption"));
In order to register the extension as skill, you need to docker build
and push the image to your Docker registry and make sure that the image is visible in your Atomist workspace. When we transact the image, we'll discover the skill metadata and register the skill.
Once it is build and registered, navigate to https://skills.dso.docker.com/catalog/skills/atomist/skill-extension?stability=unstable
and enable your skill.