Files
upstream-mirror 240db4e2a7
Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
Server CI Nightly Race / Build Environment (push) Failing after 1s
snapshot of https://github.com/mattermost/mattermost.git (master, 2026-09-16; blobs > 131072B omitted)
2026-09-16 00:29:55 +05:00
..

Cursor Cloud Agent Environment

This directory defines the checked-in Cloud Agent environment for this repository. Cursor resolves .cursor/environment.json before personal or team saved environments, so this replaces the snapshot-dependent /onboard flow for agents started from this repo.

The Docker build context is .cursor/ only. The Dockerfile intentionally does not copy the repository; Cursor checks out the requested commit at runtime.

What Is Baked Into The Image

  • Ubuntu 24.04.
  • Docker CE 28.5.2 with fuse-overlayfs and iptables-legacy, matching Cursor's Docker-in-Cloud guidance for complex compose setups.
  • Go from server/.go-version (currently 1.26.7). The install hook installs that version if the image is stale or the agent did not boot from this Dockerfile.
  • Node from .nvmrc (currently 24.11, image pin 24.11.1) via nvm. The install hook installs that version if the image is stale or the agent did not boot from this Dockerfile.
  • Browser runtime libraries for the Playwright e2e suite.
  • AWS CLI v2 for S3 uploads.
  • Common Mattermost build/test tools: make, jq, xmlsec1, pgloader, Git LFS, GitHub CLI, Python 3, and build essentials.

Runtime Hooks

  • cloud-agent-install.sh runs after Cursor checks out the repo. It refreshes nvm, locates or clones mattermost/enterprise, runs server Go dependency hydration, installs webapp dependencies, and runs Playwright npm ci.
  • cloud-agent-start.sh materializes .cursor/cursor.md as .cursor/AGENTS.md, fixes current-session Docker socket access, starts Docker, waits until docker info and docker compose version succeed, then logs in to Docker Hub when credentials are configured.

The environment declares github.com/mattermost/enterprise in repositoryDependencies so Cursor can provide it as part of the multi-repo workspace and so the Cloud Agent GitHub token can read that private repo. Cursor currently clones the repositories as siblings when you explicitly select the multi-repo environment, such as /agent/repos/mattermost and /agent/repos/enterprise, which matches server/Makefile's default ../../enterprise path.

Git-triggered automations (for example, a PR label) still launch in a single-repo layout. repositoryDependencies only adds enterprise to the token scope in that mode; it does not check the repo out. The install hook therefore clones https://github.com/mattermost/enterprise.git into ../enterprise when no usable checkout is present. It uses ENTERPRISE_BRANCH when set, otherwise preferring an exact branch matching the Mattermost checkout and falling back to Enterprise's default branch. If the sibling path is not writable or is not a usable work tree (for example a bare repo), the hook clones into $HOME/enterprise and writes BUILD_ENTERPRISE_DIR to server/config.override.mk. server/Makefile includes that file before Enterprise detection so make run-server honors the fallback path.

Useful Skips

Set these environment variables to true to shorten startup for narrow tasks:

  • CLOUD_AGENT_SKIP_ENTERPRISE
  • CLOUD_AGENT_SKIP_GO_DEPS
  • CLOUD_AGENT_SKIP_WEBAPP_DEPS
  • CLOUD_AGENT_SKIP_PLAYWRIGHT_DEPS

Expected Secrets

Configure these in the Cursor Cloud Agents dashboard as environment-scoped secrets for the Mattermost Cloud Agent environment.

  • AWS uploads use the standard AWS CLI environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_S3_BUCKET_NAME. The image only supplies the aws binary.
  • Docker Hub pulls use the same variable names as CI: DOCKERHUB_USERNAME and DOCKERHUB_TOKEN. The start hook runs docker login after dockerd is ready. Mark DOCKERHUB_TOKEN as redacted in the dashboard. When both are set, agents can pull the full default make start-docker image set without hitting anonymous rate limits.