Menu
Guides
VTEX IO Apps

VTEX IO Apps
🚀 Developer Guide: CI/CD Workflow
Community extension
Version: 2.39.30
Latest version: 2.39.30

This guide details the new workflow for the Adyen Connector project, focused on environment isolation, E2E test automation, and security, using the Corebiz CLI.


1. Environment Preparation

Before any task, ensure your environment is properly set up according to your operating system.

1.1 Windows Setup (via WSL2)

📌 Note: Compatible with Windows 10 (Build 19041+) and Windows 11. Use Ubuntu 22.04/24.04.

  1. Install WSL: Open PowerShell as Admin and run wsl --install. Restart your machine.
  2. Install Ubuntu: Run wsl --install -d Ubuntu-24.04.
  3. Install Homebrew:

    _10
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    _10
    echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc
    _10
    source ~/.bashrc

  4. Install Dependencies:

    _10
    brew install node yarn jq pv gitleaks osv-scanner semgrep trivy bandit zip
    _10
    yarn global add @lhci/cli sfcc-ci vtex

  5. Install Corebiz CLI:

    _10
    curl -ksSL https://santiago.corebiz.cl/cncli/install.sh | bash
    _10
    cb setting:token gitlab # Use a GitLab PAT with 'api' and 'write_repository' scopes

1.2 MacOS Setup

  1. Install Homebrew:

    _10
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    _10
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
    _10
    source ~/.zshrc

  2. Install Dependencies:

    _10
    brew install node yarn jq pv gitleaks osv-scanner semgrep trivy bandit zip
    _10
    yarn global add @lhci/cli sfcc-ci vtex

  3. Install Rosetta 2 (Apple Silicon only):

    _10
    /usr/sbin/softwareupdate -install-rosetta -agree-to-license

  4. Install Corebiz CLI:

    _10
    curl -ksSL https://santiago.corebiz.cl/cncli/install.sh | bash
    _10
    cb setting:token gitlab

1.3 Linux Setup (Ubuntu/Debian)

  1. Install Homebrew:

    _10
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    _10
    test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)"
    _10
    test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

  2. Install Dependencies:

    _10
    brew install node yarn jq pv gitleaks osv-scanner semgrep trivy bandit zip
    _10
    yarn global add @lhci/cli sfcc-ci vtex

  3. Install Corebiz CLI:

    _10
    curl -ksSL https://santiago.corebiz.cl/cncli/install.sh | bash
    _10
    cb setting:token gitlab


2. Docker Setup (Optional)

Development and testing environments can be containerized using Docker for consistency.

2.1 Windows & MacOS

Download and Install Docker Desktop following the Official Documentation.

2.2 Linux (Ubuntu/Debian)

  1. Follow the Official Docker Engine Installation.
  2. Configure Permissions: Add your user to the docker group to run commands without sudo:

    _10
    sudo groupadd docker
    _10
    sudo usermod -aG docker ${USER}

    Note: You may need to log out and back in for this to take effect.

3. Starting a Task

Never create branches or workspaces manually. Use the automated workflow to ensure standardization.


_10
# 1. Ensure you are on the updated master branch
_10
git checkout master && git pull origin master
_10
_10
# 2. Start the task (The CLI will create the feat/ID branch and the corresponding VTEX workspace)
_10
cb vtex wf init
_10
_10
# 3. Final authentication
_10
cb vtex login
_10
yarn install
_10
vtex setup


4. Development Standards

  • Semicolons: NEVER use a semicolon ; at the end of statements (mandatory lint rule).
  • Imports:
    • AuthorizationRequest from @vtex/payment-provider.
    • ServiceContext from @vtex/api.

5. Local Validations and Security


_10
# Run full validation (Husky runs this automatically on commit)
_10
cb vtex test precommit
_10
_10
# Run only secrets scan
_10
cb vtex test gitleaks


6. Commits and Push

We follow the Conventional Commits standard with a mandatory IMPACT section.


_10
git commit -m "feat: your description | IMPACT: Your business impact"
_10
git push origin feat/your-branch


7. Pipeline Flow (QA & Production)

  1. Homologation: Open an MR to homolog. A Dynamic Workspace is created, and Smoke Test E2E is triggered.
  2. Release Candidate: Created from homolog at the end of the sprint. Triggers Full E2E Regression.
  3. Production: MR from RC to master. Final deployment to the Adyen account.

💡 Troubleshooting Tips

  • 3DS Error? Check if the qa-tests pipeline completed the Admin setup job.
  • Concurrency: GitLab manages the QA account queue automatically via resource_group.
  • Memory: CI is configured to allocate 4GB for builds automatically.
On this page
1. Environment Preparation
Was this helpful?