-
Notifications
You must be signed in to change notification settings - Fork 206
Added CI/CD for code interpreter template #116
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
Merged
mishushakov
merged 55 commits into
main
from
code-interpreter-cicd-for-templates-e2b-2391
Jun 6, 2025
Merged
Changes from 51 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
c8e2a59
added GitHub workflows
mishushakov 9841d00
added test toml template
mishushakov 432cfd9
changed tests to use test template in CI
mishushakov 251ed0f
js sdk and python sdk to wait on template
mishushakov 7f9394a
ensured some env variables in yaml
mishushakov c0a626d
added ifs to JS/Python test jobs
mishushakov 9266341
split secrets and envs
mishushakov efba8aa
updated checkout github action
mishushakov ea59c6a
removed fetch-depth as this is default
mishushakov 2acdbe3
changed inputs > with
mishushakov 5622371
fixed unrecognized named value secrets
mishushakov 786b17f
removed unused E2B_CI_TEMPLATE from build_template.yml workflow
mishushakov 31669b0
added inputs types
mishushakov aef65ab
updated build-template workflow
mishushakov 2d5555f
added E2B_ACCESS_TOKEN to pull_request.yml
mishushakov 9143977
fixes option '--config <e2b-toml>' argument missing on CI
mishushakov e229b07
combine CI build tasks into separate steps
mishushakov 6f72501
vars > inputs in CI workflows
mishushakov 4442288
changed default test tempate name
mishushakov 58c3520
dynamic template id for each build
mishushakov 3156d90
fixes syntax error in build_template.yml
mishushakov ed6485e
remove e2b.toml on CI to be able to override the template
mishushakov 407d2f4
changed working dir for removing e2b template
mishushakov 138a6ab
redirect stderr in e2b template build ci correctly
mishushakov bf5f38e
removed unnecessary std redirect in build
mishushakov a604958
changed template id extraction logic
mishushakov 9361d51
removed unnecessary line
mishushakov e11858d
removed E2B_TEMPLATE_CONFIG
mishushakov 0bbe315
removed unused inputs, added cleanup job
mishushakov 6df9f06
unexpected value inputs
mishushakov f1ebc55
remove DOCKERHUB_USERNAME not required
mishushakov fe0fbff
removed hardcoded team id in CI
mishushakov 7f84ecf
fixed GitHub Actions syntax in cleanup
mishushakov f4bb60f
set outputs correctly in build job
mishushakov fb40236
added gha cache for CI/CD template build
mishushakov 7129f9d
debug cleanup CI
mishushakov 72bd91e
removed unexpected value env
mishushakov 330d2dc
rewired outputs in build
mishushakov 18c30ba
outputs in build_template.yml
mishushakov 38d6d48
Rename to test template
jakubno e5aca25
Fix secrets
jakubno 7ce915f
Fix bun version
jakubno 44c2926
Change to _TESTS_
jakubno c1c6e1e
Confirm template delete
jakubno 54f3a42
pass image id from docker-build step to build-template
mishushakov a0705d2
tagged test docker imag
mishushakov adc9678
grep template from e2b.toml after the build has been completed
mishushakov fa779de
changed tag and added load: true to make the image visible locally
mishushakov 5b22e57
removed the docker image as the CLI is always trying to pull
mishushakov 0b71807
renamed build job
mishushakov 3fbad08
changed pr workflow checks
mishushakov a5a29ca
cleanup wait for js sdk, python sdk
mishushakov 09abade
Kuba's suggestion
mishushakov f35487b
changed condition
mishushakov a37d1f5
Merge branch 'main' into code-interpreter-cicd-for-templates-e2b-2391
mishushakov 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 |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: Build Template | ||
|
|
||
| on: | ||
| workflow_call: | ||
| secrets: | ||
| E2B_TESTS_ACCESS_TOKEN: | ||
| required: true | ||
| inputs: | ||
| E2B_DOMAIN: | ||
| required: false | ||
| type: string | ||
| outputs: | ||
| template_id: | ||
| description: "The ID of the built template" | ||
| value: ${{ jobs.build.outputs.template_id }} | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build E2B Template | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| template_id: ${{ steps.build-template.outputs.template_id }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set package version | ||
| working-directory: ./template | ||
| run: | | ||
| VERSION=$(cat ../chart_data_extractor/pyproject.toml | grep version | cut -d '"' -f 2) | ||
| echo "Version: $VERSION" | ||
| sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt | ||
|
|
||
| - name: Install E2B CLI | ||
| run: npm install -g @e2b/cli | ||
|
|
||
| - name: Build E2B template | ||
| id: build-template | ||
| run: | | ||
| rm -f e2b.toml | ||
| e2b template build --memory-mb 1024 -c "/root/.jupyter/start-up.sh" -d "Dockerfile" | ||
| TEMPLATE_ID=$(grep "template_id" e2b.toml | cut -d '"' -f 2) | ||
| echo "Captured Template ID: $TEMPLATE_ID" | ||
| echo "template_id=$TEMPLATE_ID" >> $GITHUB_OUTPUT | ||
| working-directory: ./template | ||
| env: | ||
| E2B_ACCESS_TOKEN: ${{ secrets.E2B_TESTS_ACCESS_TOKEN }} | ||
| E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }} | ||
|
|
||
| - name: Output template ID | ||
| run: | | ||
| echo "Template ID from step output: ${{ steps.build-template.outputs.template_id }}" |
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 |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: Cleanup Build Template | ||
|
|
||
| on: | ||
| workflow_call: | ||
| secrets: | ||
| E2B_TESTS_ACCESS_TOKEN: | ||
| required: true | ||
| inputs: | ||
| E2B_DOMAIN: | ||
| required: false | ||
| type: string | ||
| E2B_TESTS_TEMPLATE: | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| cleanup: | ||
| name: Cleanup Build Template | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Install E2B CLI | ||
| run: npm install -g @e2b/cli | ||
|
|
||
| - name: Cleanup E2B template | ||
| id: cleanup-template | ||
| run: | | ||
| e2b template delete -y "${{ inputs.E2B_TESTS_TEMPLATE }}" | ||
| env: | ||
| E2B_ACCESS_TOKEN: ${{ secrets.E2B_TESTS_ACCESS_TOKEN }} | ||
| E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }} |
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 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 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.
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.