git.delta.rocks / unique-network / refs/commits / 99b1e62d01d4

difftreelog

fix build and start command splited to get exit code available

Alexander Aksenov2022-08-18parent: #156db22.patch.diff
in: master

2 files changed

modified.docker/Dockerfile-try-runtimediffbeforeafterboth
before · .docker/Dockerfile-try-runtime
1# ===== Rust builder =====2FROM ubuntu:20.04 as rust-builder3LABEL maintainer="Unique.Network"45ARG RUST_TOOLCHAIN=67ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN8ENV CARGO_HOME="/cargo-home"9ENV PATH="/cargo-home/bin:$PATH"10ENV TZ=UTC11RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone121314RUN apt-get update && \15    apt-get install -y curl cmake pkg-config libssl-dev git clang && \16    apt-get clean && \17    rm -r /var/lib/apt/lists/*1819RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none2021RUN rustup toolchain uninstall $(rustup toolchain list) && \22    rustup toolchain install $RUST_TOOLCHAIN && \23    rustup default $RUST_TOOLCHAIN && \24    rustup target list --installed && \25    rustup show26RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN2728RUN mkdir /unique_parachain29WORKDIR /unique_parachain303132# ===== BUILD ======33FROM rust-builder as builder-unique3435ARG PROFILE=release36ARG FEATURE=37ARG FORK_FROM=3839COPY . /unique_parachain40WORKDIR /unique_parachain414243RUN echo "Requested features: $FEATURE\n" && \44    echo "Fork from: $FORK_FROM\n" && \45    cargo run --features=$FEATURE --release -- try-runtime on-runtime-upgrade live --uri $FORK_FROM
modified.github/workflows/try-runtime.ymldiffbeforeafterboth
--- a/.github/workflows/try-runtime.yml
+++ b/.github/workflows/try-runtime.yml
@@ -93,6 +93,16 @@
       - name: Build the stack
         run: docker-compose -f ".docker/docker-compose-try-runtime.yml" -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up -d --build  --force-recreate --timeout 300 --remove-orphans
 
+      - name: Collect Docker Logs
+        if: success() || failure()
+        uses: jwalton/gh-docker-logs@v2.2.0
+        with:
+          dest: './try-runtime-logs.${{ matrix.features }}'
+          images: 'try-runtime' 
+
+      - name: Show docker logs
+        run: cat './try-runtime-logs.${{ matrix.features }}/try-runtime.log'
+
       - name: Stop running containers
         if: always()                   # run this step always
         run: docker-compose -f ".docker/docker-compose-try-runtime.yml" -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" down