Metadata-Version: 2.1
Name: cdktf-gitlab-runner
Version: 0.0.88
Summary: The CDK for Terraform Construct for Gitlab Runner on GCP
Home-page: https://github.com/neilkuan/cdktf-gitlab-runner.git
Author: Neil Kuan<guan840912@gmail.com>
License: Apache-2.0
Project-URL: Source, https://github.com/neilkuan/cdktf-gitlab-runner.git
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: JavaScript
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Typing :: Typed
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

[![NPM version](https://badge.fury.io/js/cdktf-gitlab-runner.svg)](https://badge.fury.io/js/cdktf-gitlab-runner)
[![PyPI version](https://badge.fury.io/py/cdktf-gitlab-runner.svg)](https://badge.fury.io/py/cdktf-gitlab-runner)
![Release](https://github.com/neilkuan/cdktf-gitlab-runner/workflows/release/badge.svg)

![Downloads](https://img.shields.io/badge/-DOWNLOADS:-brightgreen?color=gray)
![npm](https://img.shields.io/npm/dt/cdktf-gitlab-runner?label=npm&color=orange)
![PyPI](https://img.shields.io/pypi/dm/cdktf-gitlab-runner?label=pypi&color=blue)

# Welcome to `cdktf-gitlab-runner`

Use CDK fo Terraform to create gitlab runner, and use [gitlab runner](https://gitlab.com/gitlab-org/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)](https://gitlab.com/gitlab-org/gitlab-runner)

### Feature

* Instance Manager Group
* Auto Register Gitlab Runner
* Auto Unregister Gitlab Runner ([when destroy and shutdown](https://cloud.google.com/compute/docs/shutdownscript))
* Support [preemptible](https://cloud.google.com/compute/docs/instances/preemptible)

### Init CDKTF Project

```bash
mkdir demo
cd demo
cdktf init --template typescript --local
```

### Install `cdktf-gitlab-runner`

```bash
yarn add cdktf-gitlab-runner
or
npm i cdktf-gitlab-runner
```

### Example

```python
# Example automatically generated from non-compiling source. May contain errors.
import cdktf_cdktf_provider_google as gcp
import cdktf as cdktf
from constructs import Construct
from ..index import GitlabRunnerAutoscaling

class IntegDefaultStack(cdktf.TerraformStack):
    def __init__(self, scope, id):
        super().__init__(scope, id)
        local = "asia-east1"
        project_id = f"{process.env.PROJECT_ID}"
        provider = gcp.GoogleProvider(self, "GoogleAuth",
            region=local,
            zone=local + "-c",
            project=project_id
        )
        GitlabRunnerAutoscaling(self, "GitlabRunnerAutoscaling",
            gitlab_token=f"{process.env.GITLAB_TOKEN}",
            provider=provider
        )

app = cdktf.App()
IntegDefaultStack(app, "gitlab-runner")
app.synth()
```


