From fbaa1bfa16f3f69de6a6c355e13b28c8d258bd7a Mon Sep 17 00:00:00 2001 From: KonradStaniec Date: Tue, 25 Jun 2024 16:23:16 +0200 Subject: [PATCH] use public repo signer --- .circleci/config.yml | 3 --- Dockerfile | 7 +------ Makefile | 2 +- go.mod | 19 +++++++------------ go.sum | 4 ++-- 5 files changed, 11 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e499dd4..aa565d0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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" }} @@ -46,7 +45,6 @@ jobs: resource_class: large steps: - checkout - - add_ssh_keys - aws-ecr/build-image: push-image: false dockerfile: Dockerfile @@ -54,7 +52,6 @@ jobs: 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: | diff --git a/Dockerfile b/Dockerfile index 028717f..bdd3ddc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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."git@github.com:".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/ diff --git a/Makefile b/Makefile index 43809bb..6b21cf6 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/go.mod b/go.mod index a8c9d01..bc0f09f 100644 --- a/go.mod +++ b/go.mod @@ -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 @@ -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 @@ -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 diff --git a/go.sum b/go.sum index c6fce88..8c67255 100644 --- a/go.sum +++ b/go.sum @@ -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=