Skip to content

Commit

Permalink
[BLD]: build images for Tilt once
Browse files Browse the repository at this point in the history
  • Loading branch information
codetheweb committed Jan 10, 2025
1 parent e05cae8 commit 96b6e01
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/actions/tilt/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Start Tilt services
description: "This action starts Tilt services"
inputs:
cached-image-ref:
description: "The image reference to use for the cached image"
runs:
using: "composite"
steps:
Expand All @@ -21,6 +24,8 @@ runs:
- name: Start Tilt
shell: bash
run: tilt ci
env:
CACHED_IMAGE_REF: ${{ inputs.cached-image-ref }}
- name: Forward ports
shell: bash
run: |
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/_go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,21 @@ jobs:
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/go
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: (temp) build rust image
run: |
docker login registry.depot.dev -u x-token -p $DEPOT_TOKEN
depot build --save --metadata-file build.json .
project_id=$(cat build.json | jq -r '."depot.build".projectID')
build_id=$(cat build.json | jq -r '."depot.build".buildID')
echo "cached_image_ref=$project_id/$build_id" >> $GITHUB_ENV
env:
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
- uses: ./.github/actions/tilt
with:
cached-image-ref: ${{ env.cached_image_ref }}
- run: bin/cluster-test.sh bash -c 'cd go && go test -timeout 30s -run ^TestNodeWatcher$ github.com/chroma-core/chroma/go/pkg/memberlist_manager'
- name: Save service logs to artifact
if: always()
Expand Down
6 changes: 4 additions & 2 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@ docker_build(
'.',
only=["rust/", "idl/", "Cargo.toml", "Cargo.lock"],
dockerfile='./rust/worker/Dockerfile',
target='query_service'
target='query_service',
cache_from=['type=registry,ref=registry.depot.dev/' + os.getenv('CACHED_IMAGE_REF')]
)

docker_build(
'local:compaction-service',
'.',
only=["rust/", "idl/", "Cargo.toml", "Cargo.lock"],
dockerfile='./rust/worker/Dockerfile',
target='compaction_service'
target='compaction_service',
cache_from=['type=registry,ref=registry.depot.dev/' + os.getenv('CACHED_IMAGE_REF')]
)

k8s_yaml(
Expand Down

0 comments on commit 96b6e01

Please sign in to comment.