403Webshell
Server IP : 104.129.129.72  /  Your IP : 216.73.216.229
Web Server : LiteSpeed
System : Linux 123answers 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
User : answe8064 ( 1002)
PHP Version : 8.2.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /opt/installer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/installer/.gitlab-ci.yml
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml

image:
  name: hashicorp/terraform:light
  entrypoint:
    - '/usr/bin/env'
    - 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
services:
    - name: docker:dind

variables:
  TF_ROOT: ${CI_PROJECT_DIR}/infra_ci_test  # The relative path to the root directory of the Terraform project
  # TF_STATE_NAME: ${TF_STATE_NAME:-default}  # The name of the state file used by the GitLab Managed Terraform state backend
  CI_CWM_CLIENTID: $CI_CWM_CLIENTID
  CI_CWM_SECRET: $CI_CWM_SECRET
  CI_CWM_TEST_PASSWORD: $CI_CWM_TEST_PASSWORD
  DOCKER_DRIVER: overlay2

before_script:
  - cd ${TF_ROOT}
  - terraform init
  - apk add gettext
  - envsubst < terraform.tfvars.tmpl > terraform.tfvars
stages:
  - validate
  - build
  - deploy
  - cleanup

cache:
  key: "${TF_ROOT}"
  paths:
    - ${TF_ROOT}/.terraform/

fmt:
  stage: validate
  script:
    - terraform fmt -check -recursive
  allow_failure: true

validate:
  stage: validate
  script:
    - terraform validate

build:
  stage: build
  script:
    - terraform plan --out plan
  # resource_group: ${TF_STATE_NAME}
  dependencies:
    - validate
  artifacts:
    paths:
      - ${TF_ROOT}/plan
    reports:
      terraform: ${TF_ROOT}/plan

deploy:
  stage: deploy
  script:
    - terraform apply --auto-approve -parallelism=50 plan 
  # resource_group: ${TF_STATE_NAME}
  dependencies:
    - build
  artifacts:
    paths:
      - ${TF_ROOT}/terraform.tfstate
    reports:
        terraform: ${TF_ROOT}/terraform.tfstate
  allow_failure: true
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
      when: manual

destroy:
  stage: cleanup
  script:
    - terraform destroy --auto-approve
  # resource_group: ${TF_STATE_NAME}
  dependencies:
    - deploy
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
      when: manual

Youez - 2016 - github.com/yon3zu
LinuXploit