Skip to content

Fix broken build targets, ld-flags during docker builds, work-tree state during docker builds, etc.#70

Merged
unmarshall merged 4 commits into
ai-dynamo:mainfrom
renormalize:dev-prod
Apr 23, 2025
Merged

Fix broken build targets, ld-flags during docker builds, work-tree state during docker builds, etc.#70
unmarshall merged 4 commits into
ai-dynamo:mainfrom
renormalize:dev-prod

Conversation

@renormalize

Copy link
Copy Markdown
Contributor

This PR primarily focuses on fixing the build targets in operator, among other things.

  • Introduce root level Makefile to call common targets for all modules.

  • Deduplicate redundant scripts across the repository, through a centralized hack directory.

  • Introduce more directories that are to be ignored in .gitignore.

  • The make docker-build-<x> target which used to fail due to not finding the relevant make target inside the build is now fixed.

  • The make docker-build-<x> did not parse the platform from the target correctly and pass it to the hack/docker-build.sh script. This is also fixed.

  • The entire repository is copied into the build layer, as access to the .git directory is necessary for ld-flags.

  • The Go base image used for the build step is upgraded to 1.24.2.

  • Add operator/hack/kind/ to operator/Dockerfile.dockerignore, as it dirties the work tree in the docker image builds.

  • The operator/.dockerignore file is renamed to operator/Dockerfile.dockerignore to solve only the .dockerignore present in the root of the context being considered by Docker. This can be circumvented by placing the ignore file in the same directory as the Dockerfile, and naming it as <Dockerfile-name>.dockerignore.

  • Upgrade to kindest/node:v1.32.2.

  • Remove unnecessary extraPortMappings for the kind cluster.

NOTE: Please squash and merge, as I've made multiple commits for easy commit-by-commit review.

… the repository.

* Introduce root level `Makefile` to call common targets for all modules.

* Deduplicate redundant scripts across the repository, through a centralized `hack` directory.

* Introduce more directories that are to be ignored in `.gitignore`.

Signed-off-by: Saketh Kalaga <51327242+renormalize@users.noreply.github.com>
* The `make docker-build-<x>` target which used to fail due to not
  finding the relevant make target inside the build is now fixed.

* The `make docker-build-<x>` did not parse the platform from the target
  correctly and pass it to the `hack/docker-build.sh` script. This is also fixed.

* The entire repository is copied into the build layer,
  as access to the `.git` directory is necessary for `ld-flags`.

* The Go base image used for the build step is upgraded to `1.24.2`.

* Add `operator/hack/kind/` to `operator/Dockerfile.dockerignore`, as
  it dirties the work tree in the docker image builds.

* The `operator/.dockerignore` file is renamed to `operator/Dockerfile.dockerignore`
  to solve only the `.dockerignore` present in the root of the context being considered by
  Docker. This can be circumvented by placing the ignore file in the
  same directory as the `Dockerfile`, and naming it as `<Dockerfile-name>.dockerignore`.
  Reference: https://docs.docker.com/build/concepts/context/#filename-and-location.

Signed-off-by: Saketh Kalaga <51327242+renormalize@users.noreply.github.com>
Signed-off-by: Saketh Kalaga <51327242+renormalize@users.noreply.github.com>
Signed-off-by: Saketh Kalaga <51327242+renormalize@users.noreply.github.com>
@unmarshall unmarshall merged commit 24abb3a into ai-dynamo:main Apr 23, 2025
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.

2 participants