Skip to content

Commit

Permalink
Merge pull request #50 from babylonchain/hot-fix-use-public-signer
Browse files Browse the repository at this point in the history
use public repo signer
  • Loading branch information
KonradStaniec authored Jun 26, 2024
2 parents 84c14cd + fbaa1bf commit c7f7b36
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 24 deletions.
3 changes: 0 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
command: "go env"
- go/load-cache:
key: go-mod-v6-{{ checksum "go.sum" }}
- add_ssh_keys
- go/mod-download
- go/save-cache:
key: go-mod-v6-{{ checksum "go.sum" }}
Expand Down Expand Up @@ -46,15 +45,13 @@ jobs:
resource_class: large
steps:
- checkout
- add_ssh_keys
- aws-ecr/build-image:
push-image: false
dockerfile: Dockerfile
path: ./
build-path: ./
tag: "$CIRCLE_SHA1,$CIRCLE_TAG"
repo: "cli-tools"
extra-build-args: "--secret id=sshKey,src=/home/circleci/.ssh/$DEPLOY_KEY_NAME"
- run:
name: Save Docker image to export it to workspace
command: |
Expand Down
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@ RUN apk add --no-cache --update openssh git make build-base linux-headers libc-d
pkgconfig zeromq-dev musl-dev alpine-sdk libsodium-dev \
libzmq-static libsodium-static gcc

# Load private repos SSH deploy key and configure ssh
RUN mkdir -p /root/.ssh && ssh-keyscan github.com >> /root/.ssh/known_hosts
RUN git config --global url."[email protected]:".insteadOf "https://github.com/"
ENV GOPRIVATE=github.com/babylonchain/*

# Build
WORKDIR /go/src/github.com/babylonchain/cli-tools
# Cache dependencies
COPY go.mod go.sum /go/src/github.com/babylonchain/cli-tools/
RUN --mount=type=secret,id=sshKey,target=/root/.ssh/id_rsa go mod download
RUN go mod download
# Copy the rest of the files
COPY ./ /go/src/github.com/babylonchain/cli-tools/

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $(BUILDDIR)/:
mkdir -p $(BUILDDIR)/

build-docker:
$(DOCKER) build --secret id=sshKey,src=${BBN_PRIV_DEPLOY_KEY} --tag babylonchain/cli-tools -f Dockerfile \
$(DOCKER) build --tag babylonchain/cli-tools -f Dockerfile \
$(shell git rev-parse --show-toplevel)

.PHONY: build build-docker install tests
Expand Down
19 changes: 7 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@ toolchain go1.22.4

require (
github.com/babylonchain/babylon v0.8.6-0.20240426101001-7778c798e236
github.com/babylonchain/covenant-signer v0.2.5
github.com/babylonchain/networks/parameters v0.2.1
github.com/btcsuite/btcd v0.24.0
github.com/btcsuite/btcd/btcec/v2 v2.3.2
github.com/btcsuite/btcd/btcutil v1.1.5
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.4
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
github.com/golang/mock v1.6.0
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.17.6 // indirect
github.com/lightningnetwork/lnd v0.16.4-beta.rc1
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
github.com/ory/dockertest/v3 v3.10.0
github.com/prometheus/client_golang v1.18.0
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.9.0
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
Expand Down Expand Up @@ -48,16 +55,6 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require (
github.com/babylonchain/covenant-signer v0.1.2
github.com/babylonchain/networks/parameters v0.2.1
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.4
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
github.com/golang/mock v1.6.0
github.com/prometheus/client_golang v1.18.0
)

require (
cloud.google.com/go v0.110.10 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
Expand Down Expand Up @@ -326,5 +323,3 @@ require (
pgregory.net/rapid v1.1.0 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/babylonchain/covenant-signer => github.com/babylonchain/covenant-signer-private v0.2.5
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ github.com/aws/aws-sdk-go v1.44.312/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
github.com/babylonchain/babylon v0.8.6-0.20240426101001-7778c798e236 h1:Ydna4VcP56xu1+zdgygqHdSCeMduZjuznVhr4exO5do=
github.com/babylonchain/babylon v0.8.6-0.20240426101001-7778c798e236/go.mod h1:lfeASLNJgcUsX7LEns3HRUv0k+MjzcB2q2AMasfz38M=
github.com/babylonchain/covenant-signer-private v0.2.5 h1:rmk4E0bsqJpkjhB6sYpri9iUxV4pZhS8KijvDhjMXxk=
github.com/babylonchain/covenant-signer-private v0.2.5/go.mod h1:IM0AdfRmUTWx6tQiDvC0oHh14bkDufC9Dvw9v9rQZ/E=
github.com/babylonchain/covenant-signer v0.2.5 h1:RUyLhOCKjZnbjF8zn68VoVnudtDVZyVK78iF0oe3mjQ=
github.com/babylonchain/covenant-signer v0.2.5/go.mod h1:IM0AdfRmUTWx6tQiDvC0oHh14bkDufC9Dvw9v9rQZ/E=
github.com/babylonchain/networks/parameters v0.2.1 h1:OKHiCnwL/UdVN17cMwCrHz/bAjO/USauLiPyNlnVl6E=
github.com/babylonchain/networks/parameters v0.2.1/go.mod h1:nejhvrL7Iwh5Vunvkg7pnomQZlHnyNzOY9lQaDp6tOA=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
Expand Down

0 comments on commit c7f7b36

Please sign in to comment.