Skip to content

Commit

Permalink
ap/update deps (#125)
Browse files Browse the repository at this point in the history
* update go and bazel dependencies
* make it work with bazel 6
* deprecate bazel 5.1.1 and switch to 6.0.0 in github actions
  • Loading branch information
apesternikov authored Feb 23, 2023
1 parent 6ffcfb3 commit e64798e
Show file tree
Hide file tree
Showing 2,058 changed files with 260,025 additions and 62,428 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.1
6.0.0
6 changes: 4 additions & 2 deletions .fasterci/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
workflows:

- &build_workflow
name: Faster CI / build (5.1.1)
image: us.gcr.io/fasterci/bazelbuilder:9530886
name: Faster CI / build (6.0.0)
env:
USE_BAZEL_VERSION: "6.0.0"
image: us.gcr.io/fasterci/bazelbuilder:5e59f651dbb5
on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
bazel-version:
- 5.1.1
- 6.0.0
- 5.3.1
env:
USE_BAZEL_VERSION: ${{ matrix.bazel-version }}
Expand Down
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# gazelle:build_tags darwin,linux
# gazelle:exclude examples
# gazelle:proto disable_global

load("@bazel_gazelle//:def.bzl", "gazelle")
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
Expand Down
39 changes: 27 additions & 12 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "56d8c5a5c91e1af73eca71a6fab2ced959b67c86d12ba37feedb0a2dfea441a6",
sha256 = "dd926a88a564a9246713a9c00b35315f54cbd46b31a26d5d8fb264c07045f05d",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
],
)

http_archive(
name = "com_github_bazelbuild_buildtools",
sha256 = "ca524d4df8c91838b9e80543832cf54d945e8045f6a2b9db1a1d02eec20e8b8c",
strip_prefix = "buildtools-6.0.1",
urls = [
"https://github.com/bazelbuild/buildtools/archive/refs/tags/6.0.1.tar.gz",
],
)

Expand All @@ -41,6 +50,21 @@ rules_gitops_repositories()
#
# Development dependencies
#

http_archive(
name = "com_google_protobuf",
sha256 = "d0f5f605d0d656007ce6c8b5a82df3037e1d8fe8b121ed42e536f569dec16113",
strip_prefix = "protobuf-3.14.0",
urls = [
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.14.0.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v3.14.0.tar.gz",
],
)

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

load(
"@io_bazel_rules_docker//go:image.bzl",
go_image_repositories = "repositories",
Expand All @@ -52,15 +76,6 @@ load("@bazel_skylib//lib:unittest.bzl", "register_unittest_toolchains")

register_unittest_toolchains()

http_archive(
name = "com_github_bazelbuild_buildtools",
sha256 = "ae34c344514e08c23e90da0e2d6cb700fcd28e80c02e23e4d5715dddcb42f7b3",
strip_prefix = "buildtools-4.2.2",
urls = [
"https://github.com/bazelbuild/buildtools/archive/refs/tags/4.2.2.tar.gz",
],
)

load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies")

buildifier_dependencies()
Expand Down
23 changes: 5 additions & 18 deletions gitops/analysis/BUILD
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

proto_library(
name = "analysis_proto",
srcs = ["analysis.proto"],
visibility = ["//visibility:public"],
deps = ["//gitops/blaze_query:blaze_query_proto"],
)

go_proto_library(
name = "analysis_go_proto",
importpath = "github.com/adobe/rules_gitops/gitops/analysis",
proto = ":analysis_proto",
visibility = ["//visibility:public"],
deps = ["//gitops/blaze_query:go_default_library"],
)

go_library(
name = "go_default_library",
embed = [":analysis_go_proto"],
srcs = ["analysis.pb.go"],
importpath = "github.com/adobe/rules_gitops/gitops/analysis",
visibility = ["//visibility:public"],
deps = [
"//gitops/blaze_query:go_default_library",
"//vendor/github.com/golang/protobuf/proto:go_default_library",
],
)
19 changes: 2 additions & 17 deletions gitops/blaze_query/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

# Copyright 2020 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
Expand All @@ -17,20 +14,8 @@ licenses(["notice"]) # Apache 2.0

go_library(
name = "go_default_library",
embed = [":blaze_query_go_proto"],
importpath = "github.com/adobe/rules_gitops/gitops/blaze_query",
visibility = ["//visibility:public"],
)

proto_library(
name = "blaze_query_proto",
srcs = ["build.proto"],
visibility = ["//visibility:public"],
)

go_proto_library(
name = "blaze_query_go_proto",
srcs = ["build.pb.go"],
importpath = "github.com/adobe/rules_gitops/gitops/blaze_query",
proto = ":blaze_query_proto",
visibility = ["//visibility:public"],
deps = ["//vendor/github.com/golang/protobuf/proto:go_default_library"],
)
2 changes: 1 addition & 1 deletion gitops/commitmsg/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ go_library(
go_test(
name = "go_default_test",
srcs = ["commitmsg_test.go"],
embed = [":go_default_library"],
deps = [":go_default_library"],
)
24 changes: 3 additions & 21 deletions gitops/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,14 @@ def rules_gitops_dependencies():
],
)

maybe(
http_archive,
name = "com_google_protobuf",
sha256 = "9748c0d90e54ea09e5e75fb7fac16edce15d2028d4356f32211cfa3c0e956564",
strip_prefix = "protobuf-3.11.4",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.11.4.zip"],
)

maybe(
http_archive,
name = "io_bazel_rules_go",
sha256 = "56d8c5a5c91e1af73eca71a6fab2ced959b67c86d12ba37feedb0a2dfea441a6",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
],
)

# gazelle is required by go_image_repositories
maybe(
http_archive,
name = "bazel_gazelle",
sha256 = "efbbba6ac1a4fd342d5122cbdfdb82aeb2cf2862e35022c752eaddffada7c3f3",
sha256 = "448e37e0dbf61d6fa8f00aaa12d191745e14f07c31cabfa731f0c8e8a4f41b97",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.27.0/bazel-gazelle-v0.27.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.27.0/bazel-gazelle-v0.27.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.28.0/bazel-gazelle-v0.28.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.28.0/bazel-gazelle-v0.28.0.tar.gz",
],
)

Expand Down
2 changes: 1 addition & 1 deletion gitops/prer/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ go_library(
"//gitops/git/bitbucket:go_default_library",
"//gitops/git/github:go_default_library",
"//gitops/git/gitlab:go_default_library",
"@com_github_golang_protobuf//proto:go_default_library",
"//vendor/github.com/golang/protobuf/proto:go_default_library",
],
)

Expand Down
5 changes: 0 additions & 5 deletions gitops/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ GtiOps rules repositories initialization
"""

load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
load("@io_bazel_rules_docker//repositories:repositories.bzl", container_repositories = "repositories")
load("@io_bazel_rules_docker//repositories:go_repositories.bzl", container_go_deps = "go_deps")
Expand All @@ -27,9 +25,6 @@ def rules_gitops_repositories():
"""

bazel_skylib_workspace()
protobuf_deps()
go_rules_dependencies()
go_register_toolchains()
gazelle_dependencies()
container_repositories()
container_go_deps()
Expand Down
55 changes: 48 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,56 @@
module github.com/adobe/rules_gitops

go 1.12
go 1.19

require (
github.com/ghodss/yaml v1.0.0
github.com/golang/protobuf v1.5.2
github.com/google/go-cmp v0.5.5
github.com/google/go-cmp v0.5.9
github.com/google/go-github/v32 v32.1.0
github.com/xanzy/go-gitlab v0.49.0
golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c
k8s.io/api v0.21.0
k8s.io/apimachinery v0.21.0
k8s.io/client-go v0.21.0
github.com/xanzy/go-gitlab v0.80.2
golang.org/x/oauth2 v0.5.0
k8s.io/api v0.26.1
k8s.io/apimachinery v0.26.1
k8s.io/client-go v0.26.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.2 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.90.0 // indirect
k8s.io/kube-openapi v0.0.0-20230217203603-ff9a8e8fa21d // indirect
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit e64798e

Please sign in to comment.