Requirements
Quickstart
$ mkdir myproject && cd myproject
$ pulumi new typescript
# "javascript" works as well
$ npm install
$ npm install @neoskop/pulumi-buddy
# or @neoskop/pulumi-buddy@next for latest preview version
$ pulumi config set buddy:workspace myworkspace-name
$ pulumi config set buddy:token myaccesstoken --secret
# for Buddy On-Premise
$ pulumi config set buddy:apiUrl https://my-buddy-server.com
See here, how to create an access token.
import * as buddy from '@neoskop/pulumi-buddy';
const project1 = new buddy.Project('project1', {
display_name: 'Project #1',
external_project_id: 'domain/repo',
integration: {
hash_id: 'integration_hash'
}
});
export const project_name = project1.name;
const pipeline = new buddy.Pipeline('pipeline1', {
project_name: project1.name,
name: 'Pipeline #1',
ref_name: 'master',
trigger_mode: 'MANUAL'
});
const action = new buddy.ActionRunDockerContainer('action1', {
project_name: project1.name,
pipeline_id: pipeline.pipeline_id,
docker_image_name: 'ubuntu',
docker_image_tag: '19.10',
name: 'Action #1',
inline_commands: 'echo "Hello from @neoskop/pulumi-buddy"',
trigger_time: 'ON_EVERY_EXECUTION'
});