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.1091.tar.gz
.
File metadata
- Download URL: cdktf_gitlab_runner-0.0.1091.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 | 0766da99137dc50f6cd74e5cfd89c6414282807c6a7886c13d2e13b23dc2dfbe |
|
MD5 | 6e33d91e3efd0852f56ad6458d7f6b7b |
|
BLAKE2b-256 | 2befafaf0d355de55401e72fc59e8c12267b584d383d257d2a2ae87b96d5b638 |
File details
Details for the file cdktf_gitlab_runner-0.0.1091-py3-none-any.whl
.
File metadata
- Download URL: cdktf_gitlab_runner-0.0.1091-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 | 027a890b59523a18e03563dc22444f184f71cdd5d34317bf986b689b7120af6b |
|
MD5 | 6a3a675d8ed4b65f507063faf52c5a19 |
|
BLAKE2b-256 | 0f400cbf57e0a9100347789c6e3d2438403f525b2c0f8f517ffc0ffce9f0accb |