Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dmoove/cdk-gitlab-runner

This CDK constructs helps you to setup and maintain a gitlab runner
https://github.com/dmoove/cdk-gitlab-runner

cdk gitlab runner

Last synced: about 3 hours ago
JSON representation

This CDK constructs helps you to setup and maintain a gitlab runner

Awesome Lists containing this project

README

        

# @yanu23/cdk-gitlab-runner

A construct to build gitlab runners running in AWS.

## Example

```typescript
import { App, Stack } from 'aws-cdk-lib';
import { GitLabRunner, DockerExecutorType } from '@yanu23/cdk-gitlab-runner';
import { Secret } from 'aws-cdk-lib/aws-secretsmanager';
import {
InstanceClass,
InstanceSize,
InstanceType,
MachineImage,
Vpc,
} from 'aws-cdk-lib/aws-ec2';

const app = new App();
const stack = new Stack(app, 'stack');

const token = Secret.fromSecretNameV2(stack, 'token', 'gitlab-runner-token');
const vpc = Vpc.fromLookup(stack, 'vpc', { isDefault: true });

const runner = new GitLabRunner(stack, 'GitLabRunner', {
runnerConfig: {
token,
concurrent: 4,
},
});
runner.addDockerExecutor(DockerExecutorType.SINGLE_INSTANCE, {
instanceType: InstanceType.of(InstanceClass.T3A, InstanceSize.MEDIUM),
machineImage: MachineImage.latestAmazonLinux2023(),
vpc,
});
```