Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
2171f581
Commit
2171f581
authored
May 31, 2022
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: op-exporter build
The build and the docker build was broken, this commit fixes that
parent
dfab86ff
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
185 additions
and
7 deletions
+185
-7
.gitignore
.gitignore
+1
-0
Dockerfile
op-exporter/Dockerfile
+2
-0
Makefile
op-exporter/Makefile
+4
-4
go.sum
op-exporter/go.sum
+174
-0
main.go
op-exporter/main.go
+4
-3
No files found.
.gitignore
View file @
2171f581
...
...
@@ -44,3 +44,4 @@ coverage.out
# Ignore bedrock go bindings local output files
op-bindings/bin
op-exporter
op-exporter/Dockerfile
View file @
2171f581
FROM
golang:1.18.0-alpine3.15 as builder
# build from root of repo
COPY
./op-exporter /app
WORKDIR
/app/
RUN
apk
--no-cache
add make bash jq git
RUN
make build
FROM
alpine:3.15
...
...
op-exporter/Makefile
View file @
2171f581
...
...
@@ -10,9 +10,9 @@ ifndef BUILDDATE
BUILDDATE
:=
`
date
+%Y-%m-%d
`
endif
LDFLAGSSTRING
:=
-X
github.com/ethereum-optimism/op
_
exporter/version.Version
=
$(VERSION)
LDFLAGSSTRING
+=
-X
github.com/ethereum-optimism/op
_
exporter/version.GitCommit
=
$(GITCOMMIT)
LDFLAGSSTRING
+=
-X
github.com/ethereum-optimism/op
_
exporter/version.BuildDate
=
$(BUILDDATE)
LDFLAGSSTRING
:=
-X
github.com/ethereum-optimism/op
-
exporter/version.Version
=
$(VERSION)
LDFLAGSSTRING
+=
-X
github.com/ethereum-optimism/op
-
exporter/version.GitCommit
=
$(GITCOMMIT)
LDFLAGSSTRING
+=
-X
github.com/ethereum-optimism/op
-
exporter/version.BuildDate
=
$(BUILDDATE)
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
...
...
@@ -22,4 +22,4 @@ all: build
# Build binary
build
:
CGO_ENABLED
=
0 go build
$(LDFLAGS)
\ No newline at end of file
CGO_ENABLED
=
0 go build
$(LDFLAGS)
op-exporter/go.sum
View file @
2171f581
This diff is collapsed.
Click to expand it.
op-exporter/main.go
View file @
2171f581
...
...
@@ -10,8 +10,9 @@ import (
"sync"
"time"
"github.com/ethereum-optimism/op_exporter/k8sClient"
"github.com/ethereum-optimism/op_exporter/version"
"github.com/ethereum-optimism/optimism/op-exporter/k8sClient"
"github.com/ethereum-optimism/optimism/op-exporter/version"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/prometheus/client_golang/prometheus/promhttp"
log
"github.com/sirupsen/logrus"
...
...
@@ -76,7 +77,7 @@ func main() {
kingpin
.
Parse
()
if
*
versionFlag
{
fmt
.
Printf
(
"(version=%s, gitcommit=%s)
\n
"
,
version
.
Version
,
version
.
GitCommit
)
fmt
.
Printf
(
"(go=%s,
user=%s, date=%s)
\n
"
,
version
.
GoVersion
,
version
.
BuildUser
,
version
.
BuildDate
)
fmt
.
Printf
(
"(go=%s,
date=%s)
\n
"
,
version
.
GoVersion
,
version
.
BuildDate
)
os
.
Exit
(
0
)
}
log
.
Infoln
(
"exporter config"
,
*
listenAddress
,
*
rpcProvider
,
*
networkLabel
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment