Skip to content
Snippets Groups Projects
kicker.json 8.58 KiB
Newer Older
Pierre Smeyers's avatar
Pierre Smeyers committed
{
  "name": "OpenShift",
  "description": "Deploy your code to an [OpenShift](https://www.openshift.com/) environment",
  "template_path": "templates/gitlab-ci-openshift.yml",
  "kind": "hosting",
  "variables": [
    {
      "name": "OS_CLI_IMAGE",
      "description": "the Docker image used to run OpenShift Client (OC) CLI commands - **set the version required by your OpenShift server**",
Pierre Smeyers's avatar
Pierre Smeyers committed
      "default": "openshift/origin-cli:latest"
    },
    {
      "name": "OS_URL",
      "type": "url",
      "description": "Global OpenShift API url",
      "mandatory": true
    },
    {
      "name": "OS_TOKEN",
      "description": "Global OpenShift API token",
      "secret": true,
      "mandatory": true
    },
    {
      "name": "OS_BASE_APP_NAME",
      "description": "Base application name",
      "default": "$CI_PROJECT_NAME",
      "advanced": true
    },
    {
      "name": "OS_SCRIPTS_DIR",
      "description": "directory where OpenShift scripts (templates, hook scripts) are located",
      "default": ".",
      "advanced": true
    },
    {
      "name": "OS_APP_LABEL",
      "description": "The OpenShift [label](https://docs.openshift.com/container-platform/3.11/dev_guide/templates.html#writing-labels) set with the `$appname` dynamic variable.",
      "default": "app",
      "advanced": true
    },
    {
      "name": "OS_ENV_LABEL",
      "description": "The OpenShift [label](https://docs.openshift.com/container-platform/3.11/dev_guide/templates.html#writing-labels) set with the `$env` dynamic variable.",
      "default": "env",
      "advanced": true
    }
  ],
  "features": [
    {
      "id": "review",
      "name": "Review",
      "description": "Dynamic review environments for your topic branches (see GitLab [Review Apps](https://docs.gitlab.com/ee/ci/review_apps/))",
      "variables": [
        {
          "name": "OS_REVIEW_PROJECT",
          "description": "OpenShift project for review env",
          "mandatory": true
        },
        {
          "name": "OS_REVIEW_APP_NAME",
          "description": "The application name for review env (only define if different from global)",
          "advanced": true
        },
        {
          "name": "OS_REVIEW_ENVIRONMENT_SCHEME",
          "description": "The review environment protocol scheme",
          "default": "https",
          "mandatory": true
        },
        {
          "name": "OS_REVIEW_ENVIRONMENT_DOMAIN",
          "description": "The review environment domain (ex: `noprod-openshift.domain.com`).\n\nBy default review `environment.url` will be built as `${OS_REVIEW_ENVIRONMENT_SCHEME}://${$CI_PROJECT_NAME}-${CI_ENVIRONMENT_SLUG}.${OS_REVIEW_ENVIRONMENT_DOMAIN}`",
          "mandatory": true
        },
        {
          "name": "OS_REVIEW_URL",
          "type": "url",
          "description": "OpenShift API url for review env (only define if different from global)",
          "advanced": true
        },
        {
          "name": "OS_REVIEW_TOKEN",
          "description": "OpenShift API token for review env (only define if different from global)",
          "secret": true
        },
        {
          "name": "CLEANUP_ALL_REVIEW",
          "description": "Enables a **manual** job to cleanup all review envs at once.\n\nYou may also use it to [schedule](https://docs.gitlab.com/ee/ci/pipelines/schedules.html) cloud resources cleanup. See documentation.",
          "type": "boolean"
        }
      ]
    },
    {
      "id": "integration",
      "name": "Integration",
      "description": "A continuous-integration environment associated to your integration branch (`develop` by default)",
      "variables": [
        {
          "name": "OS_INTEG_PROJECT",
          "description": "OpenShift project for integration env",
          "mandatory": true
        },
        {
          "name": "OS_INTEG_APP_NAME",
          "description": "The application name for integration env (only define if different from global)",
          "advanced": true
        },
        {
          "name": "OS_INTEG_ENVIRONMENT_URL",
          "type": "url",
          "description": "The integration environment url including scheme (ex: `https://my-application-integration.noprod-openshift.domain.com`).\n\nDo not use variable inside variable definition as it will result in a two level cascade variable and gitlab does not allow that.",
          "mandatory": true
        },
        {
          "name": "OS_INTEG_URL",
          "type": "url",
          "description": "OpenShift API url for integration env (only define if different from global)",
          "advanced": true
        },
        {
          "name": "OS_INTEG_TOKEN",
          "description": "OpenShift API token for integration env (only define if different from global)",
          "secret": true
        }
      ]
    },
    {
      "id": "staging",
      "name": "Staging",
      "description": "An iso-prod environment meant for testing and validation purpose on your production branch (`master` by default)",
      "variables": [
        {
          "name": "OS_STAGING_PROJECT",
          "description": "OpenShift project for staging env",
          "mandatory": true
        },
        {
          "name": "OS_STAGING_APP_NAME",
          "description": "The application name for staging env (only define if different from global)",
          "advanced": true
        },
        {
          "name": "OS_STAGING_ENVIRONMENT_URL",
          "type": "url",
          "description": "The staging environment url including scheme (ex: `https://my-application-staging.noprod-openshift.domain.com`).\n\nDo not use variable inside variable definition as it will result in a two level cascade variable and gitlab does not allow that.",
          "mandatory": true
        },
        {
          "name": "OS_STAGING_URL",
          "type": "url",
          "description": "OpenShift API url for staging env (only define if different from global)",
          "advanced": true
        },
        {
          "name": "OS_STAGING_TOKEN",
          "description": "OpenShift API token for staging env (only define if different from global)",
          "secret": true
        }
      ]
    },
    {
      "id": "prod",
      "name": "Production",
      "description": "The production environment",
      "variables": [
        {
          "name": "OS_PROD_PROJECT",
          "description": "OpenShift project for production env",
          "mandatory": true
        },
        {
          "name": "OS_PROD_APP_NAME",
          "description": "The application name for production env (only define if different from global)",
          "advanced": true
        },
        {
          "name": "OS_PROD_ENVIRONMENT_URL",
          "type": "url",
          "description": "The production environment url including scheme (ex: `https://my-application.openshift.domain.com`).\n\nDo not use variable inside variable definition as it will result in a two level cascade variable and gitlab does not allow that.",
          "mandatory": true
        },
        {
          "name": "AUTODEPLOY_TO_PROD",
          "type": "boolean",
          "description": "Set this variable to auto-deploy to production. If not set deployment to production will be manual (default behaviour)."
        },
        {
          "name": "OS_PROD_URL",
          "type": "url",
          "description": "OpenShift API url for production env (only define if different from global)",
          "advanced": true
        },
        {
          "name": "OS_PROD_TOKEN",
          "description": "OpenShift API token for production env (only define if different from global)",
          "secret": true
        }
      ]
    }
  ],
  "variants": [
    {
      "id": "vault",
      "name": "Vault",
      "description": "Retrieve secrets from a [Vault](https://www.vaultproject.io/) server",
      "template_path": "templates/gitlab-ci-openshift-vault.yml",
      "variables": [
        {
          "name": "TBC_VAULT_IMAGE",
          "description": "The [Vault Secrets Provider](https://gitlab.com/to-be-continuous/tools/vault-secrets-provider) image to use",
          "default": "$CI_REGISTRY/to-be-continuous/tools/vault-secrets-provider:master",
          "advanced": true
        },
Pierre Smeyers's avatar
Pierre Smeyers committed
        {
          "name": "VAULT_BASE_URL",
          "description": "The Vault server base API url"
        },
        {
          "name": "VAULT_ROLE_ID",
          "description": "The [AppRole](https://www.vaultproject.io/docs/auth/approle) RoleID",
          "mandatory": true,
          "secret": true
        },
        {
          "name": "VAULT_SECRET_ID",
          "description": "The [AppRole](https://www.vaultproject.io/docs/auth/approle) SecretID",
          "mandatory": true,
          "secret": true
        }
      ]
    }
  ]
}