From c4198c8ba54c050951b08d4b44551cdbfd2750e0 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Tue, 9 Jul 2024 13:59:42 -0400 Subject: [PATCH] feat: add kurtosis package (#25) * feat: add kurtosis package * feat(ci): add dockerfile lint * chore: add newline --- .github/workflows/ci_release.yml | 3 +-- .github/workflows/docker-build-publish.yml | 8 +------ .github/workflows/lint.yml | 5 ++++ kurtosis.yml | 4 ++++ main.star | 28 ++++++++++++++++++++++ 5 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 kurtosis.yml create mode 100644 main.star diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index a918873..ead060c 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -5,8 +5,7 @@ on: - main # Trigger on version tags tags: - - 'v[0-9]+\.[0-9]+\.[0-9]+' - - 'v[0-9]+\.[0-9]+\.[0-9]+-rc(?:[0-9]+|\.[0-9]+)' + - "v*" pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/docker-build-publish.yml b/.github/workflows/docker-build-publish.yml index d70e5ac..2aa7afe 100644 --- a/.github/workflows/docker-build-publish.yml +++ b/.github/workflows/docker-build-publish.yml @@ -5,14 +5,8 @@ on: push: branches: - "main" - - "v[0-9].[0-9].x" - - "v[0-9].[0-9][0-9].x" - - "v[0-9].x" tags: - - "v[0-9]+.[0-9]+.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" + - "v*" pull_request: jobs: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index df10c16..2fb8bcd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -41,3 +41,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: rollkit/.github/.github/actions/markdown-lint@v0.4.1 + + dockerfile-lint: + uses: rollkit/.github/.github/workflows/reuseable_dockerfile_lint.yml + with: + failure-threshold: "error" diff --git a/kurtosis.yml b/kurtosis.yml new file mode 100644 index 0000000..554a1bf --- /dev/null +++ b/kurtosis.yml @@ -0,0 +1,4 @@ +name: github.com/rollkit/local-da +description: |- + Rollkit Local DA Kurtosis package +replace: {} diff --git a/main.star b/main.star new file mode 100644 index 0000000..6c1f01d --- /dev/null +++ b/main.star @@ -0,0 +1,28 @@ +# This Kurtosis package spins up a local DA + +def run(plan): + local_da_port_number = 7980 + local_da_port_spec = PortSpec( + number=local_da_port_number, + transport_protocol="TCP", + application_protocol="http", + ) + local_da_ports = { + "jsonrpc": local_da_port_spec, + } + local_da = plan.add_service( + name="local-da", + config=ServiceConfig( + image="ghcr.io/rollkit/local-da:v0.2.1", + ports=local_da_ports, + public_ports=local_da_ports, + ), + ) + + # Set the local DA address to return for rollups + local_da_address = "http://{0}:{1}".format( + local_da.ip_address, local_da.ports["jsonrpc"].number + ) + + return local_da_address + \ No newline at end of file