Skip to content

Commit 4252e48

Browse files
alexgghalvicsam
andauthored
ci: fix worker binaries could not be found (#1198)
* ci: fix worker binaries could not be found Signed-off-by: Alexandru Gheorghe <[email protected]> * Add missing bits Signed-off-by: Alexandru Gheorghe <[email protected]> * Fix malus build Signed-off-by: Alexandru Gheorghe <[email protected]> --------- Signed-off-by: Alexandru Gheorghe <[email protected]> Co-authored-by: Alexander Samusev <[email protected]>
1 parent 70ab64b commit 4252e48

File tree

5 files changed

+23
-5
lines changed

5 files changed

+23
-5
lines changed

.gitlab/pipeline/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ build-linux-stable:
1818
# Ensure we run the UI tests.
1919
RUN_UI_TESTS: 1
2020
script:
21-
- time cargo build --locked --profile testnet --features pyroscope,fast-runtime --bin polkadot
21+
- time cargo build --locked --profile testnet --features pyroscope,fast-runtime --bin polkadot --bin polkadot-prepare-worker --bin polkadot-execute-worker
2222
# pack artifacts
2323
- mkdir -p ./artifacts
2424
- VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name
2525
- mv ./target/testnet/polkadot ./artifacts/.
26+
- mv ./target/testnet/polkadot-prepare-worker ./artifacts/.
27+
- mv ./target/testnet/polkadot-execute-worker ./artifacts/.
2628
- pushd artifacts
2729
- sha256sum polkadot | tee polkadot.sha256
2830
- shasum -c polkadot.sha256
@@ -64,10 +66,12 @@ build-malus:
6466
- .run-immediately
6567
- .collect-artifacts
6668
script:
67-
- time cargo build --locked --profile testnet --verbose -p polkadot-test-malus
69+
- time cargo build --locked --profile testnet --verbose -p polkadot-test-malus --bin malus --bin polkadot-prepare-worker --bin polkadot-execute-worker
6870
# pack artifacts
6971
- mkdir -p ./artifacts
7072
- mv ./target/testnet/malus ./artifacts/.
73+
- mv ./target/testnet/polkadot-execute-worker ./artifacts/.
74+
- mv ./target/testnet/polkadot-prepare-worker ./artifacts/.
7175
- echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION
7276
- echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG
7377
- echo "polkadot-test-malus = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"

docker/malus_injected.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ RUN apt-get update && \
3939

4040

4141
# add adder-collator binary to docker image
42-
COPY ./artifacts/malus /usr/local/bin
42+
COPY ./artifacts/malus ./artifacts/polkadot-execute-worker ./artifacts/polkadot-prepare-worker /usr/local/bin
4343

4444
USER nonroot
4545

docker/polkadot_injected_debug.Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ RUN apt-get update && \
3232
chown -R polkadot:polkadot /data && \
3333
ln -s /data /polkadot/.local/share/polkadot
3434

35-
# add polkadot binary to docker image
36-
COPY ./artifacts/polkadot /usr/local/bin
35+
# add polkadot binaries to docker image
36+
COPY ./artifacts/polkadot ./artifacts/polkadot-execute-worker ./artifacts/polkadot-prepare-worker /usr/local/bin
3737

3838
USER polkadot
3939

4040
# check if executable works in this container
4141
RUN /usr/local/bin/polkadot --version
42+
RUN /usr/local/bin/polkadot-execute-worker --version
43+
RUN /usr/local/bin/polkadot-prepare-worker --version
4244

4345
EXPOSE 30333 9933 9944
4446
VOLUME ["/polkadot"]

docker/polkadot_injected_release.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ USER polkadot
4444

4545
# check if executable works in this container
4646
RUN /usr/bin/polkadot --version
47+
RUN /usr/local/bin/polkadot-execute-worker --version
48+
RUN /usr/local/bin/polkadot-prepare-worker --version
4749

4850
EXPOSE 30333 9933 9944
4951
VOLUME ["/polkadot"]

polkadot/Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,16 @@ assets = [
159159
"/usr/bin/",
160160
"755",
161161
],
162+
[
163+
"target/release/polkadot-prepare-worker",
164+
"/usr/lib/polkadot/",
165+
"755"
166+
],
167+
[
168+
"target/release/polkadot-execute-worker",
169+
"/usr/lib/polkadot/",
170+
"755"
171+
],
162172
[
163173
"scripts/packaging/polkadot.service",
164174
"/lib/systemd/system/",

0 commit comments

Comments
 (0)