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

Ap/switch to rules oci #1

Merged
merged 32 commits into from
Oct 13, 2023
Merged

Ap/switch to rules oci #1

merged 32 commits into from
Oct 13, 2023

Conversation

apesternikov
Copy link
Contributor

@apesternikov apesternikov commented Aug 21, 2023

Deprecate and remove rules_docker
switch to rules_oci

fixes #3

env:
USE_BAZEL_VERSION: "5.3.1"
USE_BAZEL_VERSION: "6.3.2"
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we want to keep this consistent with .bazelversion

Comment on lines 105 to 137
# k8s_deploy(
# name = "gitops_custom_path",
# cluster = CLUSTER,
# deployment_branch = "helloworld-gitops-custom-path",
# gitops_path = "custom_cloud",
# image_digest_tag = True, # test optional image tagging
# image_registry = REGISTRY + "/k8s", # override the default registry for production
# images = [":image"],
# manifests = [
# "deployment.yaml",
# "service.yaml",
# ],
# name_suffix = "-gitops-custom-path",
# namespace = NAMESPACE,
# user = USER,
# )

# sh_test(
# name = "k8s_deploy_test",
# srcs = ["k8s_deploy_test.sh"],
# args = [
# CLUSTER,
# NAMESPACE,
# ],
# data = [
# ":canary.show",
# ":mynamespace.show",
# ":prod_west.show",
# ],
# deps = [
# "@bazel_tools//tools/bash/runfiles",
# ],
# )
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -27,3 +34,13 @@ load("@com_adobe_rules_gitops//gitops:defs.bzl", "k8s_deploy")
("mynamespace", "dev-cluster"),
]
]

# test expected transofmation results.
write_source_files(
Copy link
Collaborator

Choose a reason for hiding this comment

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

where is the test that asserts the equality of these files and the rendered output

Copy link
Contributor Author

Choose a reason for hiding this comment

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

write_source_fiels create the test and binary to update the golden file

Copy link
Collaborator

Choose a reason for hiding this comment

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

is this intended to be committed -- seems like it could be used ephemerally for test comparisons

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is a golden file for the test

@@ -183,7 +183,7 @@ func main() {
for _, target := range targets {
log.Println("train", train, "target", target)
bin := bazel.TargetToExecutable(target)
exec.Mustex("", bin, "--nopush", "--nobazel", "--deployment_root", gitopsdir)
exec.Mustex("", bin, "--nopush", "--deployment_root", gitopsdir)
Copy link
Collaborator

Choose a reason for hiding this comment

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

remind me why we had --nobazel originally?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

--nobazel is not used anywhere currently. It was an early attempt to make sure the binary is working under bazel run as well as direct execution of a script in bazel-bin/ as create_gitops_prs run it. Later it was achieved without using of any command line flags but this historical artifact remains.

Comment on lines 5 to 6
# "legacy_image_name", # DEPRECATED AND REMOVED short name
# "registry", DEPRECATED AND REMOVED. use repository
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove?

@DolceTriade
Copy link

Any blockers on this PR?

@apesternikov apesternikov merged commit 456568b into main Oct 13, 2023
@apesternikov apesternikov deleted the ap/switch_to_rules_oci branch April 26, 2024 16:19
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.

switch from rules_docker to rules_oci
3 participants