Skip to content

Gitpod integration

This guide helps you to setup Gitpod. To get started coding with Gitpod include the following file Gitpod configuration in your repository and finally configure the required Gitpod variables in your preferences.

image: registry.gitlab.com/xrow-public/repository/gitpod:latest

tasks:
  - name: Setup env
    before: |    
      source <(curl -s https://gitlab.com/xrow-public/ci-tools/-/raw/3.0/scripts/library.sh) && gitpod_set_env
      gp sync-done env
  - name: Install
    before: |
      gp sync-await env
    init: |
      composer install
      gp sync-done install
  - name: Connect kubernetes
    command: |
      source <(curl -s https://gitlab.com/xrow-public/ci-tools/-/raw/3.0/scripts/library.sh) && gitpod_connect_kubernetes
  - name: Encore
    before: |
      gp sync-await install
    command: |
      $(yarn bin)/encore dev-server --host 0.0.0.0 --port 9000 --config-name ibexa --allowed-hosts .gitpod.io --public https://9000-$GITPOD_WORKSPACE_ID.$GITPOD_WORKSPACE_CLUSTER_HOST
  - name: Start server
    before: |
      gp sync-await install
    command: |
      source <(curl -s https://gitlab.com/xrow-public/ci-tools/-/raw/3.0/scripts/library.sh) && gitpod_s2i_run
    openMode: tab-after

ports:
  - port: 1-65535
    onOpen: ignore
  - port: 8080
    onOpen: open-browser

vscode:
  extensions:
    - ms-azuretools.vscode-docker
    - ms-kubernetes-tools
    - bmewburn.vscode-intelephense-client
    - TheNouillet.symfony-vscode
    - mblode.twig-language-2
    - felixfbecker.php-debug

Gitpod variables

Name Required Encoding Description
HELM_RELEASE yes string Name of your HELM release
GITHUB_KEY yes string Auth for GitHub
KUBECONFIG_CONTENT yes string + base64 Your Kubernetes configuration file with access to your cluster
KUBERNETES_CONTEXT_OVERWRITE yes string Context to use from your Kubernetes configuration file
KUBERNETES_NAMESPACE_OVERWRITE yes string Namespace to use from your Kubernetes configuration file
INSTALLATION_ID yes string Your Ibexa licence id
LICENCE_KEY yes string Your Ibexa licence key
APP_ENV yes string You Symfony app environment
XDEBUG_MODE no string XDebug mode for debugging