diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 529b86a81b..fe68a6063a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,7 +30,8 @@ jobs: - name: Install protoc run: | set -eux -o pipefail - PROTOC_ZIP=protoc-3.11.1-linux-x86_64.zip + PROTOC_VERSION=3.11.1 + PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.11.1/$PROTOC_ZIP sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' @@ -42,11 +43,12 @@ jobs: - name: Install pandoc run: | set -eux -o pipefail - PANDOC_ZIP=pandoc-2.11.1-linux-amd64.tar.gz - curl -OL https://github.com/jgm/pandoc/releases/download/2.11.1/$PANDOC_ZIP + PANDOC_VERSION=2.14.2 + PANDOC_ZIP=pandoc-$PANDOC_VERSION-linux-amd64.tar.gz + curl -OL https://github.com/jgm/pandoc/releases/download/$PANDOC_VERSION/$PANDOC_ZIP sudo tar xvzf $PANDOC_ZIP --strip-components 1 -C /usr/local rm -f $PANDOC_ZIP - echo /usr/local/pandoc-2.11.1/bin >> $GITHUB_PATH + echo /usr/local/pandoc-$PANDOC_VERSION/bin >> $GITHUB_PATH - name: Get dependencies run: go mod download - name: Make codegen diff --git a/api/event-bus.md b/api/event-bus.md index 6ea8fd6e84..1dce585fc2 100644 --- a/api/event-bus.md +++ b/api/event-bus.md @@ -536,7 +536,7 @@ same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: -https://kubernetes.io/docs/concepts/containers/images\#specifying-imagepullsecrets-on-a-pod +https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
@@ -664,7 +664,7 @@ Description (Optional)Name of the StorageClass required by the claim. More info: -https://kubernetes.io/docs/concepts/storage/persistent-volumes\#class-1 +https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
@@ -678,7 +678,7 @@ Kubernetes core/v1.PersistentVolumeAccessMode (Optional)Available access modes such as ReadWriteOnce, ReadWriteMany -https://kubernetes.io/docs/concepts/storage/persistent-volumes/\#access-modes +https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes
diff --git a/api/event-source.md b/api/event-source.md index 3380ab7505..183c4e7526 100644 --- a/api/event-source.md +++ b/api/event-source.md @@ -226,7 +226,7 @@ AMQPExchangeDeclareConfigExchangeDeclare holds the configuration for the exchange on the server For more information, visit -https://godoc.org/github.com/streadway/amqp\#Channel.ExchangeDeclare +https://godoc.org/github.com/streadway/amqp#Channel.ExchangeDeclare
@@ -243,7 +243,7 @@ QueueDeclare holds the configuration of a queue to hold messages and deliver to consumers. Declaring creates a queue if it doesn’t already exist, or ensures that an existing queue matches the same parameters For more information, visit -https://godoc.org/github.com/streadway/amqp\#Channel.QueueDeclare +https://godoc.org/github.com/streadway/amqp#Channel.QueueDeclare @@ -260,7 +260,7 @@ QueueBind holds the configuration that binds an exchange to a queue so that publishings to the exchange will be routed to the queue when the publishing routing key matches the binding routing key For more information, visit -https://godoc.org/github.com/streadway/amqp\#Channel.QueueBind +https://godoc.org/github.com/streadway/amqp#Channel.QueueBind @@ -275,7 +275,7 @@ information, visitConsume holds the configuration to immediately starts delivering queued messages For more information, visit -https://godoc.org/github.com/streadway/amqp\#Channel.Consume +https://godoc.org/github.com/streadway/amqp#Channel.Consume
@@ -2222,7 +2222,7 @@ Insecure tls verification (Optional)Active refers to status of the webhook for event deliveries. -https://developer.github.com/webhooks/creating/\#active +https://developer.github.com/webhooks/creating/#active
@@ -2351,7 +2351,7 @@ setup Deprecated: use Projects instead. Will be unsupported in v 1.7Events are gitlab event to listen to. Refer -https://github.com/xanzy/go-gitlab/blob/bf34eca5d13a9f4c3f501d8a97b8ac226d55e4d9/projects.go\#L794. +https://github.com/xanzy/go-gitlab/blob/bf34eca5d13a9f4c3f501d8a97b8ac226d55e4d9/projects.go#L794.
RedisEventSource describes an event source for the Redis PubSub. More info at -https://godoc.org/github.com/go-redis/redis\#example-PubSub +https://godoc.org/github.com/go-redis/redis#example-PubSub
(Optional)
-Supported operations like ==, !=, <=, >= etc. Defaults to ==. -Refer -https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/\#label-selectors +Supported operations like ==, !=, \<=, \>= etc. Defaults to ==. Refer +https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors for more info. |
@@ -4186,7 +4185,7 @@ creation of the service will fail. This field can not be changed through
updates. Valid values are “None”, empty string (“”), or a valid IP
address. “None” can be specified for headless services when proxying is
not required. More info:
-https://kubernetes.io/docs/concepts/services-networking/service/\#virtual-ips-and-service-proxies
+https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
@@ -4664,7 +4663,7 @@ same namespace to use for pulling any of the images used by this
PodSpec. If specified, these secrets will be passed to individual puller
implementations for them to use. For example, in the case of docker,
only DockerConfig type secrets are honored. More info:
-https://kubernetes.io/docs/concepts/containers/images\#specifying-imagepullsecrets-on-a-pod
+https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
diff --git a/api/sensor.md b/api/sensor.md
index 3595a7c5ba..e192930956 100644
--- a/api/sensor.md
+++ b/api/sensor.md
@@ -592,7 +592,7 @@ Path is the JSONPath of the event’s (JSON decoded) data key Path is a
series of keys separated by a dot. A key may contain wildcard characters
‘\*’ and ‘?’. To access an array value use the index as the key. The dot
and wildcard characters can be escaped with ‘’. See
-https://github.com/tidwall/gjson\#path-syntax
+https://github.com/tidwall/gjson#path-syntax
for more information on how to use this.
@@ -627,9 +627,9 @@ strconv.ParseFloat() Strings are taken as is Nils this value is ignored
-Comparator compares the event data with a user given value. Can be -“>=”, “>”, “=”, “!=”, “<”, or “<=”. Is optional, and if left -blank treated as equality “=”. +Comparator compares the event data with a user given value. Can be “>=”, +“>”, “=”, “!=”, “\<”, or “\<=”. Is optional, and if left blank treated +as equality “=”. |
@@ -1475,7 +1475,7 @@ URL of the Kafka broker, multiple URLs separated by comma.
Name of the topic. More info at -https://kafka.apache.org/documentation/\#intro\_topics +https://kafka.apache.org/documentation/#intro_topics |
@@ -1866,7 +1866,7 @@ Path is the JSONPath of the event’s (JSON decoded) data key Path is a
series of keys separated by a dot. A key may contain wildcard characters
‘\*’ and ‘?’. To access an array value use the index as the key. The dot
and wildcard characters can be escaped with ‘’. See
-https://github.com/tidwall/gjson\#path-syntax
+https://github.com/tidwall/gjson#path-syntax
for more information on how to use this.
@@ -2673,7 +2673,7 @@ same namespace to use for pulling any of the images used by this
PodSpec. If specified, these secrets will be passed to individual puller
implementations for them to use. For example, in the case of docker,
only DockerConfig type secrets are honored. More info:
-https://kubernetes.io/docs/concepts/containers/images\#specifying-imagepullsecrets-on-a-pod
+https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
@@ -2922,7 +2922,7 @@ dependency
Dest is the JSONPath of a resource key. A path is a series of keys
separated by a dot. The colon character can be escaped with ‘.’ The -1
key can be used to append a value to an existing array. See
-https://github.com/tidwall/sjson\#path-syntax
+https://github.com/tidwall/sjson#path-syntax
for more information about how this is used.
@@ -3005,7 +3005,7 @@ ContextKey is a series of keys separated by a dot. A key may contain
wildcard characters ‘\*’ and ‘?’. To access an array value use the index
as the key. The dot and wildcard characters can be escaped with
‘’. See
-https://github.com/tidwall/gjson\#path-syntax
+https://github.com/tidwall/gjson#path-syntax
for more information on how to use this.
@@ -3037,7 +3037,7 @@ DataKey is the JSONPath of the event’s (JSON decoded) data key DataKey
is a series of keys separated by a dot. A key may contain wildcard
characters ‘\*’ and ‘?’. To access an array value use the index as the
key. The dot and wildcard characters can be escaped with ‘’. See
-https://github.com/tidwall/gjson\#path-syntax
+https://github.com/tidwall/gjson#path-syntax
for more information on how to use this.
diff --git a/hack/crdgen.sh b/hack/crdgen.sh
index 984565accb..ec2df8ea51 100755
--- a/hack/crdgen.sh
+++ b/hack/crdgen.sh
@@ -16,6 +16,8 @@ fi
header "Generating CRDs"
controller-gen crd:crdVersions=v1,trivialVersions=true,maxDescLen=0 paths=./pkg/apis/... output:dir=manifests/base/crds
+mv manifests/base/crds/argoproj.io_eventbuses.yaml manifests/base/crds/argoproj.io_eventbus.yaml
+
find manifests/base/crds -name 'argoproj.io*.yaml' | while read -r file; do
echo "Patching ${file}"
# remove junk fields
diff --git a/hack/crds.go b/hack/crds.go
index 3d08b841d8..0d6f010d9f 100644
--- a/hack/crds.go
+++ b/hack/crds.go
@@ -20,10 +20,17 @@ func cleanCRD(filename string) {
}
delete(crd, "status")
metadata := crd["metadata"].(obj)
+ if metadata["name"] == "eventbuses.argoproj.io" {
+ metadata["name"] = "eventbus.argoproj.io"
+ }
delete(metadata, "annotations")
delete(metadata, "creationTimestamp")
spec := crd["spec"].(obj)
delete(spec, "validation")
+ names := spec["names"].(obj)
+ if names["plural"] == "eventbuses" {
+ names["plural"] = "eventbus"
+ }
versions := spec["versions"].([]interface{})
version := versions[0].(obj)
properties := version["schema"].(obj)["openAPIV3Schema"].(obj)["properties"].(obj)
diff --git a/hack/generate-proto.sh b/hack/generate-proto.sh
index 2102543032..a7aab2c229 100755
--- a/hack/generate-proto.sh
+++ b/hack/generate-proto.sh
@@ -7,6 +7,7 @@ set -o pipefail
source $(dirname $0)/library.sh
header "generating proto files"
+ensure_protobuf
ensure_vendor
if [ "`command -v protoc-gen-gogo`" = "" ]; then
diff --git a/hack/library.sh b/hack/library.sh
index f37ffa3ce2..3c8ee1cc0e 100644
--- a/hack/library.sh
+++ b/hack/library.sh
@@ -45,6 +45,13 @@ ensure_pandoc() {
fi
}
+ensure_protobuf() {
+ if [ "`command -v protoc`" = "" ]; then
+ warning "Please install protobuf with - brew install protobuf"
+ exit 1
+ fi
+}
+
ensure_mockery() {
if [ "`command -v mockery`" = "" ]; then
warning "Please install mockery with - brew install vektra/tap/mockery"