Skip to content

Commit

Permalink
Squashed 'bridges/' content from commit 746a4027
Browse files Browse the repository at this point in the history
git-subtree-dir: bridges
git-subtree-split: 746a402731df1e16ca36bd5075cf67fe7503fbeb
  • Loading branch information
HCastano committed Apr 8, 2021
0 parents commit 0097a04
Show file tree
Hide file tree
Showing 331 changed files with 71,379 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 1
update_configs:
- package_manager: "rust:cargo"
directory: "/"
update_schedule: "weekly"
ignored_updates:
- match:
dependency_name: "sp-*"
- match:
dependency_name: "sc-*"
- match:
dependency_name: "substrate-*"
- match:
dependency_name: "frame-*"
- match:
dependency_name: "pallet-*"
- match:
dependency_name: "node-inspect"
automerged_updates:
- match:
update_type: "all"
version_requirement_updates: "auto"
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/target/
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true
[*]
indent_style=tab
indent_size=tab
tab_width=4
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
max_line_length=100
insert_final_newline=true

[*.{yml,md,yaml,sh}]
indent_style=space
indent_size=2
tab_width=8
end_of_line=lf
39 changes: 39 additions & 0 deletions .github/workflows/deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Cargo deny

on:
pull_request:
schedule:
- cron: '0 0 * * *'
push:
branches:
- master
tags:
- v*
paths-ignore:
- '**.md'
- diagrams/*
- docs/*
jobs:
cargo-deny:
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources
# Prevent sudden announcement of a new advisory from failing CI:
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout sources & submodules
uses: actions/checkout@master
with:
fetch-depth: 5
submodules: recursive
- name: Cargo deny
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
43 changes: 43 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Check style

on:
pull_request:
push:
branches:
- master
tags:
- v*
paths-ignore:
- '**.md'
- diagrams/*
- docs/*
schedule: # Weekly build
- cron: '0 0 * * 0'
jobs:
## Check stage
check-fmt:
name: Check RustFmt
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: full
steps:

- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources & submodules
uses: actions/checkout@master
with:
fetch-depth: 5
submodules: recursive

- name: Add rustfmt
run: rustup component add rustfmt

- name: rust-fmt check
uses: actions-rs/cargo@master
with:
command: fmt
args: --all -- --check
76 changes: 76 additions & 0 deletions .github/workflows/publish-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Publish Dependencies to Docker hub

on:
push:
tags:
- v*
paths-ignore:
- '**.md'
- diagrams/*
- docs/*
schedule: # Weekly build
- cron: '0 0 * * 0'

jobs:
## Publish to Docker hub
publish:
name: Publishing
runs-on: ubuntu-latest
container:
image: docker:git
steps:

- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources & submodules
uses: actions/checkout@v2
with:
fetch-depth: 5
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Prepare
id: prep
run: |
DOCKER_IMAGE=paritytech/bridge-dependencies
VERSION=latest
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
fi
TAGS=${DOCKER_IMAGE}:${VERSION}
TAGS=$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}
echo ::set-output name=TAGS::${TAGS}
echo ::set-output name=DATE::$(date +%d-%m-%Y)
- name: Build and push
uses: docker/build-push-action@v2
with:
file: deployments/BridgeDeps.Dockerfile
push: true
cache-from: type=registry,ref=paritytech/bridge-dependencies:latest
cache-to: type=inline
tags: ${{ steps.prep.outputs.TAGS }}
labels: |
org.opencontainers.image.title=bridge-dependencies
org.opencontainers.image.description=bridge-dependencies - component of Parity Bridges Common
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.url=https://github.com/paritytech/parity-bridges-common
org.opencontainers.image.documentation=https://github.com/paritytech/parity-bridges-common/README.md
org.opencontainers.image.created=${{ steps.prep.outputs.DATE }}
org.opencontainers.image.revision=${{ github.sha }}
[email protected]
org.opencontainers.image.vendor=Parity Technologies
org.opencontainers.image.licenses=GPL-3.0 License
93 changes: 93 additions & 0 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Publish images to Docker hub

on:
push:
tags:
- v*
paths-ignore:
- '**.md'
- diagrams/*
- docs/*
schedule: # Nightly build
- cron: '0 1 * * *'

jobs:
## Publish to Docker hub
publish:
name: Publishing
strategy:
matrix:
project:
- rialto-bridge-node
- millau-bridge-node
- ethereum-poa-relay
- substrate-relay
include:
- project: rialto-bridge-node
healthcheck: http://localhost:9933/health
- project: millau-bridge-node
healthcheck: http://localhost:9933/health
- project: ethereum-poa-relay
healthcheck: http://localhost:9616/metrics
- project: substrate-relay
healthcheck: http://localhost:9616/metrics

runs-on: ubuntu-latest
steps:

- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources & submodules
uses: actions/checkout@v2
with:
fetch-depth: 5
submodules: recursive

- name: Prepare
id: prep
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
fi
TAGS="${VERSION} sha-${GITHUB_SHA::8} latest"
echo ::set-output name=TAGS::${VERSION}
echo ::set-output name=TAGS::${TAGS}
echo ::set-output name=DATE::$(date +%d-%m-%Y)
- name: Workaround rootless build
run: |
sudo apt-get install fuse-overlayfs
mkdir -vp ~/.config/containers
printf "[storage.options]\nmount_program=\"/usr/bin/fuse-overlayfs\"" > ~/.config/containers/storage.conf
- name: Build image for ${{ matrix.project }}
uses: redhat-actions/[email protected]
with:
image: ${{ matrix.project }}
tags: ${{ steps.prep.outputs.TAGS }}
dockerfiles: ./Dockerfile
build-args: |
PROJECT=${{ matrix.project }}
HEALTH=${{ matrix.healthcheck }}
VCS_REF=sha-${GITHUB_SHA::8}
BUILD_DATE=${{ steps.prep.outputs.DATE }}
VERSION=${{ steps.prep.outputs.VERSION }}
- name: Push ${{ matrix.project }} image to docker.io
id: push-to-dockerhub
uses: redhat-actions/[email protected]
with:
registry: docker.io/paritytech
image: ${{ matrix.project }}
tags: ${{ steps.prep.outputs.TAGS }}
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

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

0 comments on commit 0097a04

Please sign in to comment.