Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup docker images after build #157

Merged
merged 10 commits into from
Aug 11, 2023
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
20 changes: 14 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: rosetta-wallet

jobs:
rustfmt:
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -29,8 +29,16 @@ jobs:
- name: cargo fmt
run: cargo fmt --all -- --check

- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: --enable=all --shell=bash
with:
severity: style
scandir: './scripts'

clippy:
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -45,7 +53,7 @@ jobs:
run: cargo clippy --locked --workspace --examples --tests --all-features -- -D warnings

cargo-deny:
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -54,7 +62,7 @@ jobs:
uses: EmbarkStudios/cargo-deny-action@v1

test:
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -71,10 +79,10 @@ jobs:
target: x86_64-unknown-linux-musl

- name: Build connectors
run: ./build_connectors.sh
run: ./scripts/build_connectors.sh

- name: Pull nodes
run: ./pull_nodes.sh
run: ./scripts/pull_nodes.sh

- name: cargo test
run: cargo test --locked --all-features --workspace
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
targets: x86_64-unknown-linux-musl

- name: Build connector Docker images
run: ./build_connectors.sh
run: ./scripts/build_connectors.sh

- name: Push connector images to Dockerhub
run: ./push_connectors.sh ${{ needs.set-tags.outputs.commit_hash8 }}
run: ./scripts/push_connectors.sh ${{ needs.set-tags.outputs.commit_hash8 }}
122 changes: 0 additions & 122 deletions build_connectors.sh

This file was deleted.

15 changes: 10 additions & 5 deletions chains/astar/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
ARG REGISTRY_PATH
ARG IMAGE_VERSION
ARG VCS_REF
ARG BUILD_DATE

FROM alpine:latest AS certs

ARG BUILD_ID="astar-certs"
LABEL stage="certs" \
build="$BUILD_ID"

RUN apk --update add ca-certificates

FROM scratch

ARG REGISTRY_PATH
ARG IMAGE_VERSION
ARG VCS_REF
ARG BUILD_DATE

# metadata
LABEL summary="Analog’s connectors for astar parachain" \
name="${REGISTRY_PATH}/connector-astar" \
Expand Down
15 changes: 10 additions & 5 deletions chains/bitcoin/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
ARG REGISTRY_PATH
ARG IMAGE_VERSION
ARG VCS_REF
ARG BUILD_DATE

FROM alpine:latest AS certs

ARG BUILD_ID="bitcoin-certs"
LABEL stage="certs" \
build="$BUILD_ID"

RUN apk --update add ca-certificates

FROM scratch

ARG REGISTRY_PATH
ARG IMAGE_VERSION
ARG VCS_REF
ARG BUILD_DATE

# metadata
LABEL summary="Analog’s connectors for bitcoin network" \
name="${REGISTRY_PATH}/connector-bitcoin" \
Expand Down
15 changes: 10 additions & 5 deletions chains/ethereum/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
ARG REGISTRY_PATH
ARG IMAGE_VERSION
ARG VCS_REF
ARG BUILD_DATE

FROM alpine:latest AS certs

ARG BUILD_ID="ethereum-certs"
LABEL stage="certs" \
build="$BUILD_ID"

RUN apk --update add ca-certificates

FROM scratch

ARG REGISTRY_PATH
ARG IMAGE_VERSION
ARG VCS_REF
ARG BUILD_DATE

# metadata
LABEL summary="Analog’s connectors for ethereum network" \
name="${REGISTRY_PATH}/connector-ethereum" \
Expand Down
15 changes: 10 additions & 5 deletions chains/polkadot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
ARG REGISTRY_PATH
ARG IMAGE_VERSION
ARG VCS_REF
ARG BUILD_DATE

FROM alpine:latest AS certs

ARG BUILD_ID="polkadot-certs"
LABEL stage="certs" \
build="$BUILD_ID"

RUN apk --update add ca-certificates

FROM scratch

ARG REGISTRY_PATH
ARG IMAGE_VERSION
ARG VCS_REF
ARG BUILD_DATE

# metadata
LABEL summary="Analog’s connectors for polkadot network" \
name="${REGISTRY_PATH}/connector-polkadot" \
Expand Down
25 changes: 0 additions & 25 deletions push_connectors.sh

This file was deleted.

6 changes: 0 additions & 6 deletions reset_docker.sh

This file was deleted.

4 changes: 2 additions & 2 deletions rosetta-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Ethereum:
**Setting up nodes**

1. First you need to build connectors for that you can run
`./build_connectors.sh`
`./scripts/build_connectors.sh`
if you are running on mac you might get gcc error. To solve it please do following.

2. Run `rustup target add x86_64-unknown-linux-musl` in mac.
Expand All @@ -17,7 +17,7 @@ linker = "x86_64-linux-musl-gcc"
```

4. In `build_connectors.sh` replace `cargo build` with `TARGET_CC=x86_64-linux-musl-gcc cargo build`
5. Run `./build_connectors.sh`.
5. Run `./scripts/build_connectors.sh`.
6. After conenctors are build run `docker compose up`.

**Compiling voting contract**
Expand Down
Loading