Skip to content

Commit

Permalink
feat: make gitlabToken be required
Browse files Browse the repository at this point in the history
  • Loading branch information
Unerty committed Nov 9, 2021
1 parent 1234b9c commit 458e13c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cdk-gitlab-runner-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export interface GitlabRunnerStackProps extends StackProps {
managerInstanceType?: InstanceType;
managerKeyPairName?: string; // You won't be able to ssh into an instance without the Key Pair
gitlabUrl?: string; // URL of your GitLab instance
gitlabToken?: string; // RUNNER_TOKEN. Note this is different from the registration token used by `gitlab-runner register`
gitlabToken: string; // RUNNER_TOKEN. Note this is different from the registration token used by `gitlab-runner register`
gitlabRunnerInstanceType?: InstanceType;
gitlabDockerImage?: string; // Define the default Docker image to be used by the child runners if it’s not defined in .gitlab-ci.yml
gitlabMaxBuilds?: number; // Maximum job (build) count before machine is removed.
Expand All @@ -88,7 +88,6 @@ const defaultProps: Partial<GitlabRunnerStackProps> = {
managerInstanceType: InstanceType.of(InstanceClass.T2, InstanceSize.MICRO),
managerKeyPairName: undefined,
gitlabUrl: "https://gitlab.com",
gitlabToken: undefined,
gitlabRunnerInstanceType: InstanceType.of(
InstanceClass.T2,
InstanceSize.MICRO
Expand Down Expand Up @@ -473,7 +472,7 @@ export class GitlabRunnerStack extends Stack {
"amazonec2-region=${this.region}",
"amazonec2-vpc-id=${vpc.vpcId}",
"amazonec2-zone=${availabilityZone}",
"amazonec2-subnet-id=${vpcSubnet.subnets[0].subnetId}",
"amazonec2-subnet-id=${vpcSubnet}",
"amazonec2-security-group=${
this.stackName
}-RunnersSecurityGroup",
Expand Down
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const prodEnv = {
const app = new App();

new GitlabRunnerStack(app, "GitlabRunnerStack", {
gitlabToken: "",
vpcIdToLookUp: "vpc-0c8e4fbcc7f6b524a",
env: prodEnv,
});
Expand Down

0 comments on commit 458e13c

Please sign in to comment.