From 2bc2400f5b88f013f683762f3f3675208ee1f0b3 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Sun, 10 Nov 2019 17:22:30 -0500 Subject: [PATCH] Testing simplified template config --- templates/GitLab-Runner/0/docker-compose.yml | 14 ++-------- templates/GitLab-Runner/0/rancher-compose.yml | 26 ++++--------------- 2 files changed, 7 insertions(+), 33 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index b55aa5c..40a5eae 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -7,7 +7,7 @@ services: - register environment: # Options can be found by running "gitlab-runner register". More info found at https://docs.gitlab.com/runner/configuration/advanced-configuration.html REGISTER_NON_INTERACTIVE: true # Run registration unattended - CI_SERVER_URL: http://gitlab/ # Runner URL + CI_SERVER_URL: http://${GITLAB_HOST}/ # GitLab Server URL REGISTRATION_TOKEN: ${GITLAB_TOKEN} # Runner's registration token RUNNER_EXECUTOR: docker # Select executor, eg. shell, docker, etc. {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} @@ -18,12 +18,7 @@ services: {{- end}} REGISTER_LOCKED: false # Lock Runner for current project DOCKER_IMAGE: docker:latest # Docker image to be used - DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add local alias for GitLab instance within Rancher network DOCKER_VOLUMES: "/var/run/docker.sock:/var/run/docker.sock" # Docker Socket binding - external_links: - {{- if .Values.GITLAB_LINK}} - - ${GITLAB_LINK}:gitlab - {{- end}} labels: io.rancher.container.pull_image: always io.rancher.container.start_once: true @@ -39,7 +34,7 @@ services: - run environment: # Options can be found by running "gitlab-runner register". More info found at https://docs.gitlab.com/runner/configuration/advanced-configuration.html REGISTER_NON_INTERACTIVE: true # Run registration unattended - CI_SERVER_URL: http://gitlab/ # Runner URL + CI_SERVER_URL: http://${GITLAB_HOST}/ # GitLab Server URL REGISTRATION_TOKEN: ${GITLAB_TOKEN} # Runner's registration token RUNNER_EXECUTOR: docker # Select executor, eg. shell, docker, etc. {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} @@ -50,12 +45,7 @@ services: {{- end}} REGISTER_LOCKED: false # Lock Runner for current project DOCKER_IMAGE: docker:latest # Docker image to be used - DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add local alias for GitLab instance within Rancher network DOCKER_VOLUMES: "/var/run/docker.sock:/var/run/docker.sock" # Docker Socket binding - {{- if .Values.GITLAB_LINK}} - external_links: - - ${GITLAB_LINK}:gitlab - {{- end}} labels: io.rancher.container.pull_image: always {{- if .Values.HOST_LABEL}} diff --git a/templates/GitLab-Runner/0/rancher-compose.yml b/templates/GitLab-Runner/0/rancher-compose.yml index 4782668..21bc62a 100644 --- a/templates/GitLab-Runner/0/rancher-compose.yml +++ b/templates/GitLab-Runner/0/rancher-compose.yml @@ -17,12 +17,11 @@ catalog: required: false type: string - - variable: "GITLAB_URL" - label: "GitLab URL" + - variable: "GITLAB_HOST" + label: "GitLab Server Hostname/IP" description: | - The URL which your GitLab instance can be reached at. - You can use the service selection and alias to create a direct link if it is in your Rancher environment. - default: "http://gitlab/" + The Hostname/IP which your GitLab instance can be reached at. + default: "gitlab.com" required: true type: string @@ -49,19 +48,4 @@ catalog: These can be changed later in GitLab. default: "docker" required: false - type: string - - - variable: "GITLAB_LINK" - label: "GitLab Service" - description: | - (Optional) Create a direct link to the GitLab service. - required: false - type: service - - - variable: "GITLAB_IP" - label: "Local GitLab IP" - description: | - (Optional) The local IP address of the GitLab service. - # default: "" - required: false - type: string + type: string \ No newline at end of file