-
-
Notifications
You must be signed in to change notification settings - Fork 540
chore(devcontainer): consolidate and simplify dev/test/ci envs #3020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
solnic
wants to merge
12
commits into
master
Choose a base branch
from
chore/devcontainer-no-compose
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
19539ab
chore(devcontainer): simpler setup w/o docker compose
solnic 90d3916
refactor(devcontainer): rename run to ci-run as now only CI needs it
solnic 674b394
chore(devcontainer): for e2e install playwright in headless only
solnic 5e1d6a7
refactor(devcontainer): drop dep on playwright
solnic 730c9b6
chore(devcontainer): bump version
solnic eee0750
chore(devcontainer): bump version
solnic 7a1a27b
refactor(devcontainer): use "latest" for the ruby version
solnic eec1511
chore(devcontainer): bump version
solnic cb21a57
refactor(devcontainer): add redis-server as a dev/test/ci dep
solnic 56f4c8c
chore(devcontainer): bump version
solnic dde3f0a
refactor(devcontainer): install mise via feature
solnic d576ade
chore(devcontainer): bump version
solnic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,20 @@ | ||
| # Devcontainer configuration | ||
| RUBY_VERSION="3.4.9" | ||
|
|
||
| RUBY_VERSION=3.4.9 | ||
|
|
||
| # E2E testing | ||
| SENTRY_DSN="http://user:pass@sentry.localhost/project/42" | ||
| # SENTRY_DSN_JS="http://user:pass@sentry-js.localhost/project/43" | ||
| SENTRY_DSN_JS="" | ||
| SENTRY_DSN=http://user:pass@sentry.localhost/project/42 | ||
| # SENTRY_DSN_JS=http://user:pass@sentry-js.localhost/project/43 | ||
| SENTRY_DSN_JS= | ||
|
|
||
| SENTRY_E2E_RAILS_APP_PORT=4000 | ||
| SENTRY_E2E_SVELTE_APP_PORT=4001 | ||
|
|
||
| SENTRY_E2E_RAILS_APP_URL="http://localhost:4000" | ||
| SENTRY_E2E_SVELTE_APP_URL="http://localhost:4001" | ||
| SENTRY_E2E_RAILS_APP_URL=http://localhost:4000 | ||
| SENTRY_E2E_SVELTE_APP_URL=http://localhost:4001 | ||
|
|
||
| # ActiveJob queue adapter under test: async | inline | sidekiq | resque | delayed_job | solid_queue | ||
| SENTRY_E2E_ACTIVE_JOB_ADAPTER="async" | ||
|
|
||
| # Redis for the sidekiq/resque adapters (the Compose service is named "redis") | ||
| REDIS_URL="redis://redis:6379" | ||
| SENTRY_E2E_ACTIVE_JOB_ADAPTER=async | ||
|
|
||
| # Faster builds with compose | ||
| COMPOSE_BAKE=true | ||
| # Redis for the sidekiq/resque adapters | ||
| REDIS_URL=redis://localhost:6379 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 1.1.0 | ||
| 2.3.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| readonly WORKSPACE=/workspaces/sentry-ruby | ||
|
|
||
| sudo chown -R sentry:sentry "$WORKSPACE" | ||
|
|
||
| cd "$WORKSPACE" | ||
| mise trust "$WORKSPACE" >/dev/null | ||
|
|
||
| exec "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "name": "sentry-ruby toolchain", | ||
| "id": "tools", | ||
| "version": "1.0.0", | ||
| "description": "Installs development dependencies required by the Ruby SDK to run all tests", | ||
| "installsAfter": [ | ||
| "ghcr.io/devcontainers/features/git", | ||
| "ghcr.io/devcontainers/features/github-cli", | ||
| "ghcr.io/nils-geistmann/devcontainers-features/zsh", | ||
| "ghcr.io/rocker-org/devcontainer-features/apt-packages", | ||
| "ghcr.io/devcontainers-extra/features/mise" | ||
| ], | ||
| "options": { | ||
| "rubyVersion": { | ||
| "type": "string", | ||
| "default": "latest", | ||
| "description": "Ruby version to pre-install. Switching versions requires an image rebuild." | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # Installs the sentry-ruby toolchain. | ||
| # | ||
| set -euo pipefail | ||
|
|
||
| RUBY_VERSION="${RUBYVERSION:-latest}" | ||
| USERNAME="${_REMOTE_USER:-sentry}" | ||
| USER_HOME="${_REMOTE_USER_HOME:-/home/${USERNAME}}" | ||
|
|
||
| echo "📦 Installing Chromium and ChromeDriver..." | ||
| echo "deb http://deb.debian.org/debian sid main" > /etc/apt/sources.list.d/debian.list | ||
| wget -qO- https://ftp-master.debian.org/keys/archive-key-12.asc \ | ||
| | gpg --dearmor > /etc/apt/trusted.gpg.d/debian-archive-keyring.gpg | ||
| wget -qO- https://ftp-master.debian.org/keys/archive-key-12-security.asc \ | ||
| | gpg --dearmor > /etc/apt/trusted.gpg.d/debian-archive-security-keyring.gpg | ||
| for directory in bin lib lib32 lib64 libo32 libx32 sbin; do | ||
| dpkg-divert --package base-files --no-rename --remove "/${directory}" | ||
| done | ||
|
solnic marked this conversation as resolved.
|
||
| apt-get update | ||
| apt-get install -y --no-install-recommends chromium chromium-driver | ||
| rm -rf /var/lib/apt/lists/* /var/cache/apt/* /etc/apt/sources.list.d/debian.list | ||
|
|
||
| MISE_BIN="$(command -v mise || echo /usr/local/bin/mise)" | ||
| "$MISE_BIN" --version | ||
|
|
||
| # Activate mise for the remote user's interactive shells. | ||
| echo "eval \"\$(${MISE_BIN} activate bash)\"" >> "${USER_HOME}/.bashrc" | ||
| echo "eval \"\$(${MISE_BIN} activate zsh)\"" >> "${USER_HOME}/.zshenv" | ||
| chown "${USERNAME}:${USERNAME}" "${USER_HOME}/.bashrc" "${USER_HOME}/.zshenv" | ||
|
|
||
| # Feature installers run as root, but the toolchain belongs to the remote user. | ||
| as_user() { | ||
| sudo -u "${USERNAME}" -H env "PATH=${USER_HOME}/.local/bin:/usr/local/bin:/usr/bin:/bin" "$@" | ||
| } | ||
|
|
||
| echo "📦 Pre-installing toolchain..." | ||
| as_user env MISE_RUBY_COMPILE=0 "$MISE_BIN" install \ | ||
| "java@temurin-21" \ | ||
| "ruby@${RUBY_VERSION}" \ | ||
| "node@lts" | ||
|
|
||
| echo "✅ Toolchain pre-install completed!" | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.