HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/quadcode.com/builds/-DFbjr9L/0/foach/quadcode.com/.gitlab-ci.yml
stages:
  - build
  - deploy

variables:
  ANSIBLE_USER: qc_deploy

build:
  stage: build
  image: node:16.20.2-alpine3.18
  before_script:
    - PWD_DIR=$(pwd)
  script:
    - cd $PWD_DIR
    - node -v
    - npm install
    - npm run build
  artifacts:
    name: quadcode_com
    expire_in: 1d
    paths:
      - build
      - node_modules
      - .svelte-kit
  tags:
    - linux_amd64_standard

.job-deploy: &job-deploy
  stage: deploy
  image: registry.mobbtech.com/infra/ansible-ci:2.9.14-2
  when: manual
  before_script:
    - mkdir -m 700 ~/.ssh
    - echo "$DEPLOY_SSH_KEY" > ~/.ssh/id_rsa
    - ssh-keyscan gitlab.mobbtech.com >> ~/.ssh/known_hosts
    - chmod 600 ~/.ssh/id_rsa
    - mkdir -p -m 700 ~/.ansible/roles
    - ansible-galaxy install -f -r .deploy/roles/requirements.yml -vv
    - export ANSIBLE_CONFIG=.deploy/ansible.cfg
    - PWD_DIR=$(pwd)
  script:
    - cd $PWD_DIR && tar -czf $PWD_DIR/.deploy/app.tgz build node_modules .svelte-kit package.json
    - tar -tvf $PWD_DIR/.deploy/app.tgz
    - ansible-playbook .deploy/main.yml -i .deploy/inventory -l $GITLAB_DEPLOY_TO -u "${ANSIBLE_USER}" -D -v
  tags:
    - linux_amd64_standard
    - $GITLAB_DEPLOY_TO
  dependencies:
    - build

production:
  <<: *job-deploy
  environment: production
  only:
    - main
    - /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/
    - deploy
  variables:
    GITLAB_DEPLOY_TO: production

integration:
  <<: *job-deploy
  environment: integration
  variables:
    GITLAB_DEPLOY_TO: integration