The CDK for Terraform Construct for Gitlab Runner on GCP
Project description
Welcome to cdktf-gitlab-runner
Use CDK fo Terraform to create gitlab runner, and use gitlab runner to help you execute your Gitlab Pipeline Job.
GitLab Runner is the open source project that is used to run your CI/CD jobs and send the results back to GitLab. (source repo)
Feature
- Instance Manager Group
- Auto Register Gitlab Runner
- Auto Unregister Gitlab Runner (when destroy and shutdown)
- Support preemptible
Init CDKTF Project
mkdir demo
cd demo
cdktf init --template typescript --local
Install cdktf-gitlab-runner
yarn add cdktf-gitlab-runner
or
npm i cdktf-gitlab-runner
Example
import * as gcp from '@cdktf/provider-google';
import * as cdktf from 'cdktf';
import { Construct } from 'constructs';
import { GitlabRunnerAutoscaling } from './index';
export class IntegDefaultStack extends cdktf.TerraformStack {
constructor(scope: Construct, id: string) {
super(scope, id);
const local = 'asia-east1';
const projectId = `${process.env.PROJECT_ID}`;
const provider = new gcp.GoogleProvider(this, 'GoogleAuth', {
region: local,
zone: local+'-c',
project: projectId,
});
new GitlabRunnerAutoscaling(this, 'GitlabRunnerAutoscaling', {
gitlabToken: `${process.env.GITLAB_TOKEN}`,
provider,
});
}
}
const app = new cdktf.App();
new IntegDefaultStack(app, 'gitlab-runner');
app.synth();
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cdktf_gitlab_runner-0.0.1048.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d57f89228a2a83c616b89258cd81ff5b843c0afc3fee4a28264fe4f4a3841f3 |
|
MD5 | 1742a18960723e6980c4e42519e59afe |
|
BLAKE2b-256 | dcbd53aed6088495d10fa93e4bcb875928a77b918feebb9d0667c2d5319346e4 |
Close
Hashes for cdktf_gitlab_runner-0.0.1048-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 505239c1ae92302643b0cd3f3ac8c7e3446946b526027d46f714f0ce14314d97 |
|
MD5 | 3ea04d2c13d688770847933b5f007b77 |
|
BLAKE2b-256 | ab4223eb99b4f8896a2cb8e509f05e27e3653575a46eb7b286946284e784a865 |