Skip to content

How Tilt livereload works? #2

@demkom58

Description

@demkom58

Can you explain a bit on how live-reload works in case of tilt?

# Build
custom_build(
    # Name of the container image
    ref = 'book-service',
    # Command to build the container image
    command = './gradlew bootBuildImage --imageName $EXPECTED_REF',
    # Files to watch that trigger a new build
    deps = ['build.gradle', './bin/main'],
    # Enables live reload
    live_update = [
        sync('./bin/main', '/workspace/BOOT-INF/classes')
    ]
)

# Deploy
k8s_yaml(['config/deployment.yml', 'config/service.yml'])

# Manage
k8s_resource('book-service', port_forwards=['8080:8080', '9090:9090'])

In particular, what exactly is './bin/main'? I'm asking this question because I can't get this work and official examples are completely different.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions