From 5bafbbe1aac1651802270f0d7f4a1be718f1e6d9 Mon Sep 17 00:00:00 2001 From: BAStos525 Date: Fri, 19 Jul 2024 17:36:10 +0300 Subject: [PATCH] include genesis and executor to image Signed-off-by: BAStos525 --- .github/workflows/iroha2-dev.yml | 200 +++++++++++++++---------------- Dockerfile | 2 + 2 files changed, 101 insertions(+), 101 deletions(-) diff --git a/.github/workflows/iroha2-dev.yml b/.github/workflows/iroha2-dev.yml index 05afb0ded9c..2aedd41389e 100644 --- a/.github/workflows/iroha2-dev.yml +++ b/.github/workflows/iroha2-dev.yml @@ -2,7 +2,7 @@ name: I2::Dev::Publish on: push: - branches: [main] + branches: [feature/DOPS-3319/i2-genesis-executor-in-image] env: CARGO_TERM_COLOR: always @@ -10,7 +10,7 @@ env: jobs: registry: - runs-on: [self-hosted, Linux, iroha2] + runs-on: ubuntu-latest # [self-hosted, Linux, iroha2] steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -28,8 +28,7 @@ jobs: file: Dockerfile tags: | hyperledger/iroha:local - hyperledger/iroha:dev - docker.soramitsu.co.jp/iroha2/iroha:dev + bastos525/iroha:dev cache-from: type=gha cache-to: type=gha,mode=max - name: Test docker-compose.single.yml before pushing @@ -40,114 +39,113 @@ jobs: run: | docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.local.yml up --wait || exit 1 docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.local.yml down - - name: Test docker-compose.yml before pushing - run: | - docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml up --wait || exit 1 - docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml down + # - name: Test docker-compose.yml before pushing + # run: | + # docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml up --wait || exit 1 + # docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml down - name: Login to DockerHub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Login to Soramitsu Harbor - uses: docker/login-action@v3 - with: - registry: docker.soramitsu.co.jp - username: ${{ secrets.HARBOR_USERNAME }} - password: ${{ secrets.HARBOR_TOKEN }} + # - name: Login to Soramitsu Harbor + # uses: docker/login-action@v3 + # with: + # registry: docker.soramitsu.co.jp + # username: ${{ secrets.HARBOR_USERNAME }} + # password: ${{ secrets.HARBOR_TOKEN }} - name: Push iroha2:dev image uses: docker/build-push-action@v6 with: context: . push: true tags: | - hyperledger/iroha:dev - docker.soramitsu.co.jp/iroha2/iroha:dev + bastos525/iroha:dev labels: commit=${{ github.sha }} - archive_binaries_and_schema: - runs-on: ubuntu-latest - container: - image: hyperledger/iroha2-ci:nightly-2024-04-18 - steps: - - uses: actions/checkout@v4 - - uses: Swatinem/rust-cache@v2 - - name: Build - run: mold --run cargo build --release --verbose - - name: Archive iroha - uses: actions/upload-artifact@v3 - with: - name: cargo-build-release - path: target/release/iroha - - name: Archive Iroha client CLI - uses: actions/upload-artifact@v3 - with: - name: cargo-client-cli-build-release - path: target/release/iroha - - name: Archive kagami - uses: actions/upload-artifact@v3 - with: - name: cargo-crypto-cli-build-release - path: target/release/kagami - - name: Generate schema - run: | - mkdir -p target/schema - cargo run --bin kagami -- schema >target/schema/schema.json - - name: Archive schema - uses: actions/upload-artifact@v3 - with: - name: schema - path: target/schema + # archive_binaries_and_schema: + # runs-on: ubuntu-latest + # container: + # image: hyperledger/iroha2-ci:nightly-2024-04-18 + # steps: + # - uses: actions/checkout@v4 + # - uses: Swatinem/rust-cache@v2 + # - name: Build + # run: mold --run cargo build --release --verbose + # - name: Archive iroha + # uses: actions/upload-artifact@v3 + # with: + # name: cargo-build-release + # path: target/release/iroha + # - name: Archive Iroha client CLI + # uses: actions/upload-artifact@v3 + # with: + # name: cargo-client-cli-build-release + # path: target/release/iroha + # - name: Archive kagami + # uses: actions/upload-artifact@v3 + # with: + # name: cargo-crypto-cli-build-release + # path: target/release/kagami + # - name: Generate schema + # run: | + # mkdir -p target/schema + # cargo run --bin kagami -- schema >target/schema/schema.json + # - name: Archive schema + # uses: actions/upload-artifact@v3 + # with: + # name: schema + # path: target/schema - telemetry: - # FIXME #2646 - if: false - runs-on: ubuntu-latest - container: - image: hyperledger/iroha2-ci:nightly-2024-04-18 - steps: - - uses: actions/checkout@v4 - - uses: Swatinem/rust-cache@v2 - - name: Run debug tests and save telemetry - env: - TELEMETRY_FILE: ../target/telemetry/debug.json.lz4 - run: | - mkdir -p target/telemetry - mold --run cargo test -p iroha --all-features -- unstable_network || true - - name: Run release tests and save telemetry - env: - TELEMETRY_FILE: ../target/telemetry/release.json.lz4 - run: mold --run cargo test -p iroha --all-features --release -- unstable_network || true - - name: Install script dependencies - run: | - apt-get update - apt-get install -y --no-install-recommends lz4 jq - - name: Print debug telemetry info - run: | - ./scripts/analyze_telemetry.sh target/telemetry/debug.json.lz4 >target/telemetry/debug.md - - name: Print release telemetry info - run: ./scripts/analyze_telemetry.sh target/telemetry/release.json.lz4 >target/telemetry/release.md - - name: Print debug telemetry info - run: | - echo '## Debug build' - cat target/telemetry/debug.md - - name: Print release telemetry info - run: | - echo '## Release build' - cat target/telemetry/release.md - - name: Create telemetry comment - uses: actions-ecosystem/action-create-comment@v1 - with: - body: | - \# Telemetry info - \## Debug build - ${{ steps.debug-telemetry.outputs.body }} - \## Release build - ${{ steps.release-telemetry.outputs.body }} - github_token: ${{ secrets.github_token }} - continue-on-error: true - - name: Archive telemetry - uses: actions/upload-artifact@v3 - with: - name: telemetry - path: target/telemetry + # telemetry: + # # FIXME #2646 + # if: false + # runs-on: ubuntu-latest + # container: + # image: hyperledger/iroha2-ci:nightly-2024-04-18 + # steps: + # - uses: actions/checkout@v4 + # - uses: Swatinem/rust-cache@v2 + # - name: Run debug tests and save telemetry + # env: + # TELEMETRY_FILE: ../target/telemetry/debug.json.lz4 + # run: | + # mkdir -p target/telemetry + # mold --run cargo test -p iroha --all-features -- unstable_network || true + # - name: Run release tests and save telemetry + # env: + # TELEMETRY_FILE: ../target/telemetry/release.json.lz4 + # run: mold --run cargo test -p iroha --all-features --release -- unstable_network || true + # - name: Install script dependencies + # run: | + # apt-get update + # apt-get install -y --no-install-recommends lz4 jq + # - name: Print debug telemetry info + # run: | + # ./scripts/analyze_telemetry.sh target/telemetry/debug.json.lz4 >target/telemetry/debug.md + # - name: Print release telemetry info + # run: ./scripts/analyze_telemetry.sh target/telemetry/release.json.lz4 >target/telemetry/release.md + # - name: Print debug telemetry info + # run: | + # echo '## Debug build' + # cat target/telemetry/debug.md + # - name: Print release telemetry info + # run: | + # echo '## Release build' + # cat target/telemetry/release.md + # - name: Create telemetry comment + # uses: actions-ecosystem/action-create-comment@v1 + # with: + # body: | + # \# Telemetry info + # \## Debug build + # ${{ steps.debug-telemetry.outputs.body }} + # \## Release build + # ${{ steps.release-telemetry.outputs.body }} + # github_token: ${{ secrets.github_token }} + # continue-on-error: true + # - name: Archive telemetry + # uses: actions/upload-artifact@v3 + # with: + # name: telemetry + # path: target/telemetry diff --git a/Dockerfile b/Dockerfile index 4623e1aba5f..d38da32a814 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,5 +79,7 @@ EOT COPY --from=builder $TARGET_DIR/irohad $BIN_PATH COPY --from=builder $TARGET_DIR/iroha $BIN_PATH COPY --from=builder $TARGET_DIR/kagami $BIN_PATH +COPY configs/swarm/genesis.json $CONFIG_DIR +COPY configs/swarm/executor.wasm $CONFIG_DIR USER $USER CMD ["irohad"]