Commit 20db694
authored
feat: migrate from GitPod to GitHub Codespaces (#1678)
* feat: add GitHub Codespaces support for cloud development
Add comprehensive GitHub Codespaces configuration to replace GitPod
as the primary cloud development environment (GitPod free tier has sunset).
Changes:
- Add .devcontainer/devcontainer.json with Docker-in-Docker and GitHub CLI
- Add .devcontainer/setup.sh for automated environment setup
- Add dockerfiles/codespacesURL.sh for Codespaces URL configuration
- Add CODESPACES_MIGRATION_PLAN.md with detailed migration strategy
- Update README.md with Codespaces quick start and instructions
- Update .gitignore for local development files
- Set default empty values for GITPOD_WORKSPACE_URL to suppress warnings
Features:
- Automatic yq installation for YAML processing
- Port forwarding for Jenkins (8080) with public visibility
- Environment-aware URL configuration using CODESPACE_NAME
- Maintains backward compatibility with GitPod configuration
- 60 hours/month free tier (sufficient for all tutorials)
- Welcome message displayed on every terminal session
The migration maintains dual support for both Codespaces and GitPod
during the transition period, allowing users to choose their preferred
environment.
* fix: add welcome message to .bashrc for persistent display
Configure setup script to append welcome message to .bashrc so it
displays automatically on every new terminal session in Codespaces.
This is more reliable than postStartCommand which doesn't always
show output in the terminal.
* fix: add automated port visibility setting and troubleshooting docs
Add gh CLI command to automatically set port 8080 to public during setup.
Create .devcontainer/README.md with manual steps for port visibility.
The devcontainer.json visibility setting doesn't reliably work, so we now:
1. Attempt automatic setting via gh CLI in setup.sh
2. Provide clear manual steps in README if automation fails
This addresses the persistent issue where ports default to private
even with visibility: public in devcontainer.json.
* fix: open Jenkins in browser instead of VS Code preview
Change onAutoForward from 'openPreview' to 'openBrowser' to avoid
preview pane issues with Jenkins security headers.
The VS Code preview shows 'Please reopen the preview' due to Jenkins
X-Frame-Options headers. Opening in a regular browser tab works fine.
Updated README to clarify this behavior.
* chore: disable GitPod Dependabot updates (legacy platform)
Add note that GitPod is legacy (free tier sunset) and we've migrated
to GitHub Codespaces. Disable Dependabot monitoring of GitPod image
updates by setting open-pull-requests-limit to 0.
Codespaces uses devcontainer.json which cannot be monitored by
Dependabot (not a Dockerfile). Manual updates as needed.
* refactor: improve code quality and reproducibility
- Pin yq version to v4.44.3 with curl fallback
- Pin devcontainer features (Docker 27.0, gh CLI 2.62)
- Add shell safety flags (set -Eeuo pipefail)
- Replace hardcoded paths with git rev-parse
- Improve variable quoting throughout scripts
- Add validation checks (yq exists, gh authenticated)
- Enhance error handling in all scripts
Addresses all valid suggestions from AI reviewers (CodeRabbitAI and Gemini).
* feat: add UpdateCLI tracking for Codespaces dependencies
- Add updatecli manifest for yq, Docker, and GitHub CLI versions
- Update dependabot.yml to reference UpdateCLI for Codespaces deps
- Clarify port visibility is not blocking access in README
- Document that private ports work for Codespace owners
UpdateCLI will now automatically create PRs when new versions
of devcontainer dependencies are available.
* fix: add missing sourceid to UpdateCLI condition
The dockerhub-image-exists condition was missing the required
sourceid attribute, causing UpdateCLI validation to fail.
Tested locally with updatecli diff - manifest now works correctly
and detects available updates:
- yq: v4.44.3 → v4.48.1
- Docker: 27.0 → 28.5
- GitHub CLI: 2.62 → 2.81.0
The manifest will run successfully once this PR is merged to main.
* fix: correct UpdateCLI regex patterns for file matching
Fixed three pattern matching issues:
1. yq pattern: Added missing closing brace '}' before final quote
2. Docker pattern: Simplified to match line-by-line with search filter
3. GitHub CLI pattern: Simplified to match line-by-line with search filter
Tested locally - all targets now detect updates correctly:
- ⚠ [yq-setup-script] v4.44.3 → v4.48.1
- ⚠ [docker-feature-version] 27.0 → 28.5
- ⚠ [github-cli-feature-version] 2.62 → 2.81.0
* fix: use printf instead of echo for ANSI escape sequences
Replaced echo with printf for lines containing ANSI color codes
to improve portability across different shells.
Fixes Codacy warnings:
- Line 44: echo → printf for color formatting
- Line 45: echo → printf with proper format string
- Line 51: echo → printf in loop with format placeholders
The echo command's handling of escape sequences is not
standardized across shells. printf is the portable solution
and is recommended by POSIX for formatted output.
* refactor: use printf directly instead of string concatenation
Replace string concatenation with direct printf calls for building
the profiles list message. This is more maintainable and consistent
with other printf statements in the script.
Benefits:
- Avoids error-prone string building with ANSI escape sequences
- More consistent with the rest of the script
- Cleaner and easier to maintain
- No temporary variables needed
Addresses Copilot AI code review suggestion.1 parent 2f55a59 commit 20db694
File tree
10 files changed
+755
-10
lines changed- .devcontainer
- .github
- dockerfiles
- updatecli/updatecli.d
10 files changed
+755
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
| |||
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
65 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments