Skip to content
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

build: rearrange Dockerfile and Makefile commands #237

Merged
merged 11 commits into from
Jul 18, 2023

Conversation

zemyblue
Copy link
Member

@zemyblue zemyblue commented Jul 13, 2023

Description

closes: #227

Now there are only two Dockerfile in this repository.

  • first: default Dockerfile in root dir
  • second: networks/local/finschianode/Dockerfile for localnet multi-node testing.

Changes

  • Remove builders/Dockerfile.static_centos7
  • Remove contrib/Dockerfile.test
  • Remove contrib/devtools/Makefile
  • Remove networks/local/Makefile
  • move from builders/Dockerfile.static to networks/local/finschianode/Dockerfile
  • Modify the image of networks/local/finschianode/Dockerfiles build-env to be the same as the default Dockerfile.
  • remove including contrib/devtools/Makefile in Makefile.

Removed commands in Makefile

  • build-release-bundle: no used, because the build assets command is changed in feat: compile static binary as release assets and docker image #221.
  • build-docker-finschianode: no used.
  • test-docker: no used
  • test-docker-push: no used
  • build-contract-tests-hooks: no used
  • build-reproducible-arm64 and build-reproducible-amd64: => combined to build-reproducible.

Motivation and context

There are many unused commands in Makefile.
And there are many Dockerfiles, all with different base docker images and build steps. Unity is needed.

How has this been tested?

Screenshots (if appropriate):

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.

Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
 - remove `./networks/local/finschianode/Dockerfile`
 - move from `./builders/Dockerfile.static` to `networks/local/finschianode/Dockerfile`
 - remove `./networks/Makefile`
 - remove `./contrib/Dockerfile.test`
 - remove unused commands in Makefile
   - `build-docker-finschianode`
   - `test-docker`
   - `test-docker-push`

Signed-off-by: zemyblue <zemyblue@gmail.com>
 - build-contract-tests-hooks
 - include contrib/devtools/Makefile

Signed-off-by: zemyblue <zemyblue@gmail.com>
@zemyblue zemyblue self-assigned this Jul 13, 2023
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
@zemyblue zemyblue marked this pull request as ready for review July 14, 2023 00:41
Copy link
Contributor

@0Tech 0Tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found logic on db variants remaining intact. Also, there are redundant duplicates in Makefile, e.g. build-reproducible-amd64 and its arm64 variant. One can use an arch variable, because the structure resembles.

Signed-off-by: zemyblue <zemyblue@gmail.com>
And change the property of Makefile from `ARCH` to `TARGET_ARCH`, and add new `ARCH` as new meaning

Signed-off-by: zemyblue <zemyblue@gmail.com>
@zemyblue
Copy link
Member Author

I found logic on db variants remaining intact. Also, there are redundant duplicates in Makefile, e.g. build-reproducible-amd64 and its arm64 variant. One can use an arch variable, because the structure resembles.

I combined build-reproductible-arm64 and build-reproducible-amd64 to build-reproducible using ARCH.
And I rearranged the relations of amd64 / x86_64 and arm64 / aarch64.

@zemyblue zemyblue requested a review from 0Tech July 17, 2023 08:38
jaeseung-bae
jaeseung-bae previously approved these changes Jul 17, 2023
dudong2
dudong2 previously approved these changes Jul 17, 2023
Makefile Outdated Show resolved Hide resolved
…nput

Signed-off-by: zemyblue <zemyblue@gmail.com>
@zemyblue zemyblue requested review from Scottbae37 and removed request for Scottbae37 July 18, 2023 07:20
@zemyblue zemyblue merged commit f2155f2 into Finschia:main Jul 18, 2023
23 checks passed
@zemyblue zemyblue deleted the feat/arrange_makefile branch July 18, 2023 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unifying compilation and docker image build
5 participants