Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .github/workflows/build-images-pr.yml

This file was deleted.

230 changes: 7 additions & 223 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build Image
uses: redhat-actions/buildah-build@v2
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2.13
with:
image: stps-funder
tags: latest
tags: funder-latest
dockerfiles: |
./utils/dockerfiles/Dockerfile.funder
build-args: |
Expand All @@ -28,24 +28,24 @@ jobs:
with:
registry: docker.io/paritytech
image: stps-funder
tags: latest
tags: funder-latest
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Check the image
run: |
echo "New image has been pushed to ${{ steps.push-to-dockerhub.outputs.registry-path }}"

sender-tick:
name: Build and push sender (tick) image
sender:
name: Build and push sender image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Image
uses: redhat-actions/buildah-build@v2
with:
image: stps-sender
tags: tick-latest
tags: sender-latest
dockerfiles: |
./utils/dockerfiles/Dockerfile.sender
build-args: |
Expand All @@ -59,227 +59,11 @@ jobs:
with:
registry: docker.io/paritytech
image: stps-sender
tags: tick-latest
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Check the image
run: |
echo "New image has been pushed to ${{ steps.push-to-dockerhub.outputs.registry-path }}"

tps-tick:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So now, we can basically use sender/funder and the previous images are not needed ?

@Sajjon Sajjon Sep 22, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, so in 700b4d8 the repo was significantly changed, and all the feature-flags got removed, however, the Github workflow pipeline were not updated, nor the Dockerfile.

So this PR (tries to) sync the Dockerfiles and Github workflow pipeline with the code base.

name: Build and push tps (tick) image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Image
uses: redhat-actions/buildah-build@v2
with:
image: stps-tps
tags: tick-latest
dockerfiles: |
./utils/dockerfiles/Dockerfile.tps
build-args: |
CHAIN=tick
VCS_REF=${{ github.ref }}
BUILD_DATE=${{ github.event.release.published_at }}

- name: Push image to docker.io
id: push-to-dockerhub
uses: redhat-actions/push-to-registry@v2
with:
registry: docker.io/paritytech
image: stps-tps
tags: tick-latest
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Check the image
run: |
echo "New image has been pushed to ${{ steps.push-to-dockerhub.outputs.registry-path }}"

sender-versi-tick:
name: Build and push sender (versi-tick) image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Image
uses: redhat-actions/buildah-build@v2
with:
image: stps-sender
tags: versi-tick-latest
dockerfiles: |
./utils/dockerfiles/Dockerfile.sender
build-args: |
CHAIN=versi-tick
VCS_REF=${{ github.ref }}
BUILD_DATE=${{ github.event.release.published_at }}

- name: Push image to docker.io
id: push-to-dockerhub
uses: redhat-actions/push-to-registry@v2
with:
registry: docker.io/paritytech
image: stps-sender
tags: versi-tick-latest
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Check the image
run: |
echo "New image has been pushed to ${{ steps.push-to-dockerhub.outputs.registry-path }}"

sender-versi-relay:
name: Build and push sender (versi-relay) image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Image
uses: redhat-actions/buildah-build@v2
with:
image: stps-sender
tags: versi-relay-latest
dockerfiles: |
./utils/dockerfiles/Dockerfile.sender
build-args: |
CHAIN=versi-relay
VCS_REF=${{ github.ref }}
BUILD_DATE=${{ github.event.release.published_at }}

- name: Push image to docker.io
id: push-to-dockerhub
uses: redhat-actions/push-to-registry@v2
with:
registry: docker.io/paritytech
image: stps-sender
tags: versi-relay-latest
tags: sender-latest
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Check the image
run: |
echo "New image has been pushed to ${{ steps.push-to-dockerhub.outputs.registry-path }}"

tps-versi-relay:
name: Build and push tps (versi-relay) image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Image
uses: redhat-actions/buildah-build@v2
with:
image: stps-tps
tags: versi-relay-latest
dockerfiles: |
./utils/dockerfiles/Dockerfile.tps
build-args: |
CHAIN=versi-relay
VCS_REF=${{ github.ref }}
BUILD_DATE=${{ github.event.release.published_at }}

- name: Push image to docker.io
id: push-to-dockerhub
uses: redhat-actions/push-to-registry@v2
with:
registry: docker.io/paritytech
image: stps-tps
tags: versi-relay-latest
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Check the image
run: |
echo "New image has been pushed to ${{ steps.push-to-dockerhub.outputs.registry-path }}"

tps-versi-tick:
name: Build and push tps (versi-tick) image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Image
uses: redhat-actions/buildah-build@v2
with:
image: stps-tps
tags: versi-tick-latest
dockerfiles: |
./utils/dockerfiles/Dockerfile.tps
build-args: |
CHAIN=tick
VCS_REF=${{ github.ref }}
BUILD_DATE=${{ github.event.release.published_at }}

- name: Push image to docker.io
id: push-to-dockerhub
uses: redhat-actions/push-to-registry@v2
with:
registry: docker.io/paritytech
image: stps-tps
tags: versi-tick-latest
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Check the image
run: |
echo "New image has been pushed to ${{ steps.push-to-dockerhub.outputs.registry-path }}"

sender-rococo:
name: Build and push sender (rococo) image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Image
uses: redhat-actions/buildah-build@v2
with:
image: stps-sender
tags: rococo-latest
dockerfiles: |
./utils/dockerfiles/Dockerfile.sender
build-args: |
CHAIN=rococo
VCS_REF=${{ github.ref }}
BUILD_DATE=${{ github.event.release.published_at }}

- name: Push image to docker.io
id: push-to-dockerhub
uses: redhat-actions/push-to-registry@v2
with:
registry: docker.io/paritytech
image: stps-sender
tags: rococo-latest
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Check the image
run: |
echo "New image has been pushed to ${{ steps.push-to-dockerhub.outputs.registry-path }}"

tps-rococo:
name: Build and push tps (rococo) image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Image
uses: redhat-actions/buildah-build@v2
with:
image: stps-tps
tags: rococo-latest
dockerfiles: |
./utils/dockerfiles/Dockerfile.tps
build-args: |
CHAIN=rococo
VCS_REF=${{ github.ref }}
BUILD_DATE=${{ github.event.release.published_at }}

- name: Push image to docker.io
id: push-to-dockerhub
uses: redhat-actions/push-to-registry@v2
with:
registry: docker.io/paritytech
image: stps-tps
tags: rococo-latest
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Check the image
run: |
echo "New image has been pushed to ${{ steps.push-to-dockerhub.outputs.registry-path }}"
18 changes: 10 additions & 8 deletions utils/dockerfiles/Dockerfile.funder
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
FROM rust:latest as builder
FROM rust:latest AS builder

COPY . /build

WORKDIR /build/utils/funder
WORKDIR /build

RUN cargo build --release -p funder

FROM ubuntu:latest
Comment thread
Sajjon marked this conversation as resolved.

ARG VCS_REF
ARG BUILD_DATE

RUN cargo build --release

FROM docker.io/library/ubuntu:22.04
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*

COPY --from=builder /build/utils/funder/target/release/funder /usr/local/bin
COPY --from=builder /build/target/release/funder /usr/local/bin

LABEL description="Docker image for sTPS funder binary" \
io.parity.image.authors="mattia@parity.io, devops-team@parity.io" \
Expand All @@ -20,8 +22,8 @@ LABEL description="Docker image for sTPS funder binary" \
io.parity.image.created="${BUILD_DATE}" \
io.parity.image.source="https://github.com/paritytech/polkadot-stps/blob/${VCS_REF}/utils/dockerfiles/Dockerfile.funder"

RUN useradd -m -u 1000 -U -s /bin/sh -d /funder funder
RUN id -u funder >/dev/null 2>&1 || useradd -m -U -s /bin/sh -d /home/funder funder
Comment thread
Sajjon marked this conversation as resolved.

USER funder

ENTRYPOINT [ "/usr/local/bin/funder" ]
ENTRYPOINT ["/usr/local/bin/funder"]
21 changes: 10 additions & 11 deletions utils/dockerfiles/Dockerfile.sender
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
FROM rust:latest as builder
FROM rust:latest AS builder

COPY . /build

WORKDIR /build/utils/sender
WORKDIR /build

ARG CHAIN
ARG VCS_REF
ARG BUILD_DATE
RUN cargo build --release -p sender

ENV FEATURE=${CHAIN}
FROM ubuntu:latest
Comment thread
Sajjon marked this conversation as resolved.

RUN cargo build --features=$FEATURE --release
ARG VCS_REF
ARG BUILD_DATE

FROM docker.io/library/ubuntu:22.04
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*

COPY --from=builder /build/utils/sender/target/release/sender /usr/local/bin
COPY --from=builder /build/target/release/sender /usr/local/bin

LABEL description="Docker image for sTPS sender binary" \
io.parity.image.authors="mattia@parity.io, devops-team@parity.io" \
Expand All @@ -23,8 +22,8 @@ LABEL description="Docker image for sTPS sender binary" \
io.parity.image.created="${BUILD_DATE}" \
io.parity.image.source="https://github.com/paritytech/polkadot-stps/blob/${VCS_REF}/utils/dockerfiles/Dockerfile.sender"

RUN useradd -m -u 1000 -U -s /bin/sh -d /sender sender
RUN id -u sender >/dev/null 2>&1 || useradd -m -U -s /bin/sh -d /home/sender sender
Comment thread
Sajjon marked this conversation as resolved.

USER sender

ENTRYPOINT [ "/usr/local/bin/sender" ]
ENTRYPOINT ["/usr/local/bin/sender"]
Loading
Loading