generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: Language plugins choose the runner image #3268
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
af09001
feat: Language plugins choose the runner image
matt2e 34da47d
more progress
matt2e fca885a
do not have specific docker image field, use ModuleRuntime instead
matt2e e062266
plugins return runner image name
matt2e 7901c04
add local jvm dockerfile
matt2e c0653bc
Smarter image name replacement
matt2e f7fa52a
cleaning up
matt2e 2ac197e
jvm runner image doesnt need to make deployments dir
matt2e d07172b
Update internal/schema/module.go
matt2e ced8165
rename workflow?
matt2e 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 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 |
---|---|---|
|
@@ -236,15 +236,18 @@ jobs: | |
- uses: cashapp/[email protected] | ||
- uses: ./.github/actions/build-cache | ||
- run: just build-docker provisioner | ||
docker-build-runner: | ||
name: Build Runner Docker Image | ||
docker-build-runners: | ||
name: Build Runner Docker Images | ||
# if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-all') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cashapp/[email protected] | ||
- uses: ./.github/actions/build-cache | ||
- run: just build-docker runner | ||
- name: Build Runner Docker Image | ||
run: just build-docker runner | ||
- name: Build JVM Docker Image | ||
run: just build-docker runner-jvm | ||
docker-build-box: | ||
name: Build Box Docker Image | ||
# if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-all') | ||
|
This file contains 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 |
---|---|---|
|
@@ -4,15 +4,15 @@ on: | |
- "v[0-9]+.[0-9]+.[0-9]+" | ||
name: Automatically Build Release | ||
jobs: | ||
build-runner: | ||
name: Build Runner Docker Image | ||
build-runners: | ||
name: Build Runner Docker Images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Init Hermit | ||
uses: cashapp/[email protected] | ||
- name: Build | ||
- name: Build Runner | ||
run: | | ||
just build-docker runner | ||
mkdir -p artifacts/ftl-runner | ||
|
@@ -23,6 +23,17 @@ jobs: | |
name: docker-runner-artifact | ||
path: artifacts/ftl-runner/ftl-runner.tar | ||
retention-days: 1 | ||
- name: Build JVM Runner | ||
run: | | ||
just build-docker runner-jvm | ||
mkdir -p artifacts/ftl-runner-jvm | ||
docker save -o artifacts/ftl-runner-jvm/ftl-runner-jvm.tar ftl0/ftl-runner-jvm:latest | ||
- name: Temporarily save JVM Docker image | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docker-runner-jvm-artifact | ||
path: artifacts/ftl-runner-jvm/ftl-runner-jvm.tar | ||
retention-days: 1 | ||
build-controller: | ||
name: Build Controller Docker Image | ||
runs-on: ubuntu-latest | ||
|
@@ -86,7 +97,7 @@ jobs: | |
permissions: | ||
contents: read | ||
packages: write | ||
needs: [build-runner, build-controller, build-provisioner, build-box] | ||
needs: [build-runners, build-controller, build-provisioner, build-box] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
@@ -99,6 +110,11 @@ jobs: | |
with: | ||
name: docker-runner-artifact | ||
path: artifacts/ftl-runner | ||
- name: Retrieve JVM Runner Docker image | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: docker-runner-jvm-artifact | ||
path: artifacts/ftl-runner-jvm | ||
- name: Retrieve Controller Docker image | ||
uses: actions/download-artifact@v4 | ||
with: | ||
|
@@ -116,6 +132,8 @@ jobs: | |
path: artifacts/ftl-box | ||
- name: Load Runner Docker image | ||
run: docker load -i artifacts/ftl-runner/ftl-runner.tar | ||
- name: Load JVM Runner Docker image | ||
run: docker load -i artifacts/ftl-runner-jvm/ftl-runner-jvm.tar | ||
- name: Load Controller Docker image | ||
run: docker load -i artifacts/ftl-controller/ftl-controller.tar | ||
- name: Load Provisioner Docker image | ||
|
@@ -133,6 +151,9 @@ jobs: | |
docker tag ftl0/ftl-runner:latest ftl0/ftl-runner:"$GITHUB_SHA" | ||
docker tag ftl0/ftl-runner:latest ftl0/ftl-runner:"$version" | ||
docker push -a ftl0/ftl-runner | ||
docker tag ftl0/ftl-runner-jvm:latest ftl0/ftl-runner-jvm:"$GITHUB_SHA" | ||
docker tag ftl0/ftl-runner-jvm:latest ftl0/ftl-runner-jvm:"$version" | ||
docker push -a ftl0/ftl-runner-jvm | ||
docker tag ftl0/ftl-controller:latest ftl0/ftl-controller:"$GITHUB_SHA" | ||
docker tag ftl0/ftl-controller:latest ftl0/ftl-controller:"$version" | ||
docker push -a ftl0/ftl-controller | ||
|
This file contains 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 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,19 @@ | ||
FROM ubuntu:24.04 AS builder | ||
RUN apt-get update | ||
RUN apt-get install -y curl git zip | ||
|
||
# Seed some of the most common tools - this will be cached | ||
COPY ./bin /src/bin | ||
ENV PATH="/src/bin:$PATH" | ||
ENV HERMIT_STATE_DIR=/hermit | ||
RUN hermit install openjdk-17.0.8_7 | ||
RUN mvn -B --version | ||
|
||
# Finally create the runtime image. | ||
FROM ftl0/ftl-runner:latest | ||
|
||
WORKDIR /root/ | ||
|
||
ENV PATH="/root/jdk/bin:$PATH" | ||
ENV JAVA_HOME="/root/jdk" | ||
COPY --from=builder /hermit/pkg/openjdk-17.0.8_7/ /root/jdk/ |
This file contains 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could/should this be a matrix instead? Compute the matrix using something like
ftl language list
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in the future yes, but we need to have
ftl-runner
available before buildingftl-runner-jvm
.Once theres more than one image built on top of
ftl-runner
(python super soon), then those can be put in a matrix.