Repository navigation
add reproduceable code for CICD #1088
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,56 @@ | ||
| # New release system: MakefileEc2.mk only holds service start / healthcheck | ||
| # commands. Build artifacts are produced by MakefileBuild.mk. | ||
| # | ||
| # Target naming convention: | ||
| # start-${env_key}-${app_name} | ||
| # healthcheck-${env_key}-${app_name} | ||
| # | ||
| # morph-node and tx-submitter on EC2 are started by the release system's own | ||
| # launch flow, so no start targets are defined here yet. Add them below when | ||
| # needed. | ||
| TIMESTAMP := $(shell date +%s | xargs printf '0x%x') | ||
| PWD := $(shell pwd) | ||
| GORUN = env GO111MODULE=on go run | ||
| GITVERSION := v1.0.0 | ||
| LDFLAGSSTRING +=-X main.GitCommit=$(GITCOMMIT) | ||
| LDFLAGSSTRING +=-X main.GitDate=$(GITDATE) | ||
| LDFLAGSSTRING +=-X main.GitVersion=$(GITVERSION) | ||
| LDFLAGS := -ldflags "$(LDFLAGSSTRING)" | ||
|
|
||
| # build for mainnet | ||
| build-bk-prod-morph-prod-mainnet-to-morph-node: | ||
| if [ ! -d dist ]; then mkdir -p dist; fi | ||
| cd $(PWD)/node && make morphnode-repro | ||
| cp node/build/bin/morphnode dist/ | ||
| sha256sum dist/morphnode | ||
| tar -czvf morph-node.tar.gz dist | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| aws s3 cp morph-node.tar.gz s3://morph-0582-morph-technical-department-mainnet-data/morph-setup/morph-node.tar.gz | ||
|
|
||
| build-bk-prod-morph-prod-mainnet-to-morph-tx-submitter: | ||
| if [ ! -d dist ]; then mkdir -p dist; fi | ||
| env GO111MODULE=on CGO_LDFLAGS="-ldl" CGO_ENABLED=1 go build -v $(LDFLAGS) -o tx-submitter/tx-submitter ./tx-submitter/cmd | ||
| cp tx-submitter/tx-submitter dist/ | ||
| tar -czvf tx-submitter.tar.gz dist | ||
| aws s3 cp tx-submitter.tar.gz s3://morph-0582-morph-technical-department-mainnet-data/morph-setup/tx-submitter.tar.gz | ||
|
|
||
| # build for qanet | ||
| build-bk-test-morph-test-qanet-to-morph-node-qanet: | ||
| if [ ! -d dist ]; then mkdir -p dist; fi | ||
| cd $(PWD)/node && make build | ||
| cp node/build/bin/morphnode dist/ | ||
| cp node/build/bin/tendermint dist/ | ||
| tar -czvf morph-node.tar.gz dist | ||
| aws s3 cp morph-node.tar.gz s3://morph-7637-morph-technical-department-qanet-data/morph-setup/morph-node.tar.gz | ||
|
|
||
| build-bk-test-morph-test-qanet-to-morph-tx-submitter-qanet: | ||
| if [ ! -d dist ]; then mkdir -p dist; fi | ||
| env GO111MODULE=on CGO_LDFLAGS="-ldl" CGO_ENABLED=1 go build -v $(LDFLAGS) -o tx-submitter/tx-submitter ./tx-submitter/cmd | ||
| cp tx-submitter/tx-submitter dist/ | ||
| tar -czvf tx-submitter.tar.gz dist | ||
| aws s3 cp tx-submitter.tar.gz s3://morph-7637-morph-technical-department-qanet-data/morph-setup/tx-submitter.tar.gz | ||
|
|
||
| # build for hoodi | ||
| build-bk-prod-morph-prod-testnet-to-morph-node-hoodi: | ||
| if [ ! -d dist ]; then mkdir -p dist; fi | ||
| cd $(PWD)/node && make build | ||
| cp node/build/bin/morphnode dist/ | ||
| cp node/build/bin/tendermint dist/ | ||
| tar -czvf morph-node.tar.gz dist | ||
| aws s3 cp morph-node.tar.gz s3://morph-0582-morph-technical-department-testnet-data/testnet/hoodi/morph-setup/morph-node.tar.gz | ||
|
|
||
| build-bk-prod-morph-prod-testnet-to-morph-tx-submitter-hoodi: | ||
| if [ ! -d dist ]; then mkdir -p dist; fi | ||
| env GO111MODULE=on CGO_LDFLAGS="-ldl" CGO_ENABLED=1 go build -v $(LDFLAGS) -o tx-submitter/tx-submitter ./tx-submitter/cmd | ||
| cp tx-submitter/tx-submitter dist/ | ||
| tar -czvf tx-submitter.tar.gz dist | ||
| aws s3 cp tx-submitter.tar.gz s3://morph-0582-morph-technical-department-testnet-data/testnet/hoodi/morph-setup/tx-submitter.tar.gz | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Populate the transaction submitter’s Git metadata.
On a standalone
make -f MakefileEc2.mkinvocation, this file supplies no values forGITCOMMITorGITDATE. The new transaction-submitter targets therefore pass empty values to the linker, and the application’s version string loses its commit and date. Derive these values from Git or require them as explicit release inputs. (raw.githubusercontent.com)