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
File details
Details for the file cdktf_gitlab_runner-0.0.1086.tar.gz
.
File metadata
- Download URL: cdktf_gitlab_runner-0.0.1086.tar.gz
- Upload date:
- Size: 47.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a9c751447a269171382145f173ed024e4369455d1590a9093a6b3a4ce7d7e19 |
|
MD5 | 0686a9ad812386a756704c0d733a0e62 |
|
BLAKE2b-256 | ac38663db29a7b820a27b7e5cd526fffda20935fbee36caed740766b80dc474a |
File details
Details for the file cdktf_gitlab_runner-0.0.1086-py3-none-any.whl
.
File metadata
- Download URL: cdktf_gitlab_runner-0.0.1086-py3-none-any.whl
- Upload date:
- Size: 45.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70eaf75da0468d9c2b0b6d0f666eb6a32d6fb84ac39d3f12606fc232bc2b69fb |
|
MD5 | e7920880f9c34fef504de0ca457f026c |
|
BLAKE2b-256 | e0b9a93964c735f7fbf867c9d0bb38b5194f433c82d4cfe87fb61fcd5799f4ad |