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
# Example automatically generated from non-compiling source. May contain errors.
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.122.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93923d3e18fc11dc2238060d25e0668df2df97cf7dfb3dc02d58caf0f67c3f78 |
|
MD5 | 7d8f5c7b0e8036e8d81fbc81e578dc5a |
|
BLAKE2b-256 | 5074bda3d1f22bf8b9ae3d6b41eeee50a8231c9cb61dc25e0aef2bc53a6fb301 |
Close
Hashes for cdktf_gitlab_runner-0.0.122-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad40fc124f3974495a7ae02a67e34f0f19af84083d9412d3a849eceacd94647f |
|
MD5 | 55d3e4639e3cb1d2b5dac039c03fc2eb |
|
BLAKE2b-256 | bdfed41dfb0317a8d6a327d9849ea0cb3be95bcfa83a64648a79def3c8d800a8 |