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

rename confusing properties/flags #82

Merged
merged 7 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ go build
#### Example: build the docker image for gaia v6.0.0:

```bash
heighliner build -c gaia -v v6.0.0
heighliner build --chain gaia --git-ref v6.0.0
```

Docker image `heighliner/gaia:v6.0.0` will now be available in your local docker images
Expand All @@ -40,7 +40,7 @@ Docker image `gaia:local` will be built and stored in your local docker images.

```bash
# docker login ...
heighliner build -r ghcr.io/strangelove-ventures/heighliner -c gaia -v v6.0.0
heighliner build -r ghcr.io/strangelove-ventures/heighliner -c gaia -g v6.0.0
```

Docker image `ghcr.io/strangelove-ventures/heighliner/gaia:v6.0.0` will be built and pushed to ghcr.io
Expand Down Expand Up @@ -77,15 +77,15 @@ Customize the platform(s) to be built with the `--platform` flag.
#### Example: build x64 and arm64 docker images for gaia v7.0.1:

```bash
heighliner build -c gaia -v v7.0.1
heighliner build -c gaia -g v7.0.1
```

Docker images for `heighliner/gaia:v7.0.1` will now be available in your local docker. The manifest for the tag will contain both amd64 and arm64 images.

#### Example: Use custom buildkit server, build x64 and arm64 docker images for gaia v7.0.1, and push:

```bash
heighliner build -b --buildkit-addr tcp://192.168.1.5:8125 -c gaia -v v7.0.1 -r ghcr.io/strangelove-ventures/heighliner
heighliner build -b --buildkit-addr tcp://192.168.1.5:8125 -c gaia -g v7.0.1 -r ghcr.io/strangelove-ventures/heighliner
```

Docker images for `heighliner/gaia:v7.0.1` will be built on the remote buildkit server and then pushed to the container repository. The manifest for the tag will contain both amd64 and arm64 images.
Expand Down
6 changes: 3 additions & 3 deletions addChain.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Please keep chains in alphabetical order.

`github-repo` -> The repo name of the location of the chain binary.

`language` -> Used in the Docker `FROM` argument to create a a docker base image. OPTIONS: "go, rust, nix, imported". Use "imported" if you are not able to build the chain binary from source and are importing a pre-made docker container.
`dockerfile` -> Which dockerfile strategy to use (folder names under dockerfile/). OPTIONS: `cosmos`, `cargo`, `imported`, or `none`. Use `imported` if you are importing an existing public docker image as a base for the heighliner image. Use `none` if you are not able to build the chain binary from source and need to download binaries into the image instead.
Copy link
Contributor

@DavidNix DavidNix Feb 1, 2023

Choose a reason for hiding this comment

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

What's the purpose and differences between Dockerfile, native.Dockerfile, local.Dockerfile? Is there any special handling to keep them all in sync?

Copy link
Member Author

@agouin agouin Feb 1, 2023

Choose a reason for hiding this comment

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

  • Dockerfile is for buildkit. it is not compatible with standard docker build due to FROM --platform=$BUILDPLATFORM which is necessary in buildkit builds to cross compile from an image on the machine's arch. This is the "production" use dockerfile.
  • native.Dockerfile is for non-buildkit builds on your local machine, without the -b flag. It will fetch the chain source from the remote git repository similar to the Dockerfile. This is used for building an local image from git source, which is good for things like a local test before making a PR for a chains.yaml addition, or debugging interchaintest cases.
  • local.Dockerfile is used when the --local flag is passed. This will use the current working directory for the chain source code and is mainly used for chain development flows as it does not require changes to be committed and pushed to the remote git repository to build

A contributor doc would be helpful to explain these differences to keep them in sync, as most changes should be made to all 3.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think all of that in the README would be excellent.


`build-env` -> Environment variables to be created during the build.

`pre-build` -> Any extra arguments needed to build the chain binary.

`build-target` -> The argument to call after `make` (language=golang), `cargo` (language=rust) or `nix` (language=nix).
`build-target` -> The build command specific to the chosen `dockerfile`. For `cosmos`, likely `make install`. For `cargo`, likely `build --release`.

`binaries` -> The location of where the the build target places the binarie(s). Adding a ":" after the path allows for the ability to rename the binary.

Expand All @@ -33,7 +33,7 @@ Please keep chains in alphabetical order.

Please check the image builds successfully before submitting PR:

`./heighliner build -c <CHAIN-NAME> -v <VERSION>
`./heighliner build -c <CHAIN-NAME> -g <BRANCH OR TAG>`

Ensure binary runs in image:

Expand Down
Loading