Skip to content

Commit 9fbe3e1

Browse files
author
Carlos Sanchez
committed
fix: argo-workflows and aso moved
print error if files cannot be downloaded
1 parent 57d348d commit 9fbe3e1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

build.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ function crd_to_json_schema() {
1515
echo "Processing ${1}..."
1616
input="input/${1}.yaml"
1717
if [[ "${1}" != "platformlog" ]]; then
18-
curl -L --silent --show-error "${@:2}" > "${input}"
18+
if ! curl -f -L --silent --show-error "${@:2}" > "${input}"; then
19+
echo "Failed to download ${1} from ${*:2}"
20+
return
21+
fi
1922
fi
2023

2124
# Clean the input for compound schema docs that don't contain a yaml seperator (e.g., aso)
@@ -67,15 +70,16 @@ function write_schema() {
6770
}
6871

6972
crd_to_json_schema argo-cd https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
70-
crd_to_json_schema argo-workflows https://raw.githubusercontent.com/argoproj/argo-workflows/stable/manifests/install.yaml
73+
crd_to_json_schema argo-workflows https://raw.githubusercontent.com/argoproj/argo-workflows/main/manifests/base/crds/full/argoproj.io_{clusterworkflowtemplates,cronworkflows,workflowartifactgctasks,workfloweventbindings,workflows,workflowtaskresults,workflowtasksets,workflowtemplates}.yaml
7174
crd_to_json_schema argo-rollouts https://raw.githubusercontent.com/argoproj/argo-rollouts/stable/manifests/install.yaml
7275
crd_to_json_schema cert-manager https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.crds.yaml
7376
crd_to_json_schema helm-operator https://raw.githubusercontent.com/fluxcd/helm-operator/master/deploy/crds.yaml
7477
crd_to_json_schema helm-repository https://raw.githubusercontent.com/fluxcd/source-controller/main/config/crd/bases/source.toolkit.fluxcd.io_helmrepositories.yaml
7578
crd_to_json_schema prometheus-operator https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/master/example/prometheus-operator-crd/monitoring.coreos.com_{alertmanagers,alertmanagerconfigs,podmonitors,probes,prometheuses,prometheusrules,servicemonitors,thanosrulers}.yaml
7679
crd_to_json_schema contour https://raw.githubusercontent.com/phylake/contour/v1.5-adobe/examples/contour/01-crds.yaml
7780
crd_to_json_schema istio https://raw.githubusercontent.com/istio/istio/master/manifests/charts/base/crds/crd-all.gen.yaml
78-
crd_to_json_schema aso https://raw.githubusercontent.com/Azure/azure-service-operator/master/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_{apimgmtapis,apimservices,appinsights,appinsightsapikeys,azureloadbalancers,azurenetworkinterfaces,azurepublicipaddresses,azuresqlactions,azuresqldatabases,azuresqlfailovergroups,azuresqlfirewallrules,azuresqlmanagedusers,azuresqlservers,azuresqlusers,azuresqlvnetrules,azurevirtualmachineextensions,azurevirtualmachines,azurevmscalesets,blobcontainers,consumergroups,cosmosdbs,cosmosdbsqldatabases,eventhubnamespaces,eventhubs,keyvaultkeys,keyvaults,mysqlaadusers,mysqldatabases,mysqlfirewallrules,mysqlservers,mysqlserveradministrators,mysqlusers,mysqlvnetrules,postgresqldatabases,postgresqlfirewallrules,postgresqlservers,postgresqlusers,postgresqlvnetrules,rediscacheactions,rediscachefirewallrules,rediscaches,resourcegroups,storageaccounts,virtualnetworks}.azure.microsoft.com.yaml
81+
# ASO v1 CRDs were removed in https://github.com/Azure/azure-service-operator/pull/4659/files#diff-78c0fb61556d0d6c471b5ba2130322c0cef0bc8caca2e4aaaedad3d3d6edda1f
82+
crd_to_json_schema aso https://raw.githubusercontent.com/Azure/azure-service-operator/a388035/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_{apimgmtapis,apimservices,appinsights,appinsightsapikeys,azureloadbalancers,azurenetworkinterfaces,azurepublicipaddresses,azuresqlactions,azuresqldatabases,azuresqlfailovergroups,azuresqlfirewallrules,azuresqlmanagedusers,azuresqlservers,azuresqlusers,azuresqlvnetrules,azurevirtualmachineextensions,azurevirtualmachines,azurevmscalesets,blobcontainers,consumergroups,cosmosdbs,cosmosdbsqldatabases,eventhubnamespaces,eventhubs,keyvaultkeys,keyvaults,mysqlaadusers,mysqldatabases,mysqlfirewallrules,mysqlservers,mysqlserveradministrators,mysqlusers,mysqlvnetrules,postgresqldatabases,postgresqlfirewallrules,postgresqlservers,postgresqlusers,postgresqlvnetrules,rediscacheactions,rediscachefirewallrules,rediscaches,resourcegroups,storageaccounts,virtualnetworks}.azure.microsoft.com.yaml
7983
crd_to_json_schema cilium https://raw.githubusercontent.com/cilium/cilium/master/pkg/k8s/apis/cilium.io/client/crds/v2/cilium{clusterwidenetworkpolicies,endpoints,externalworkloads,identities,localredirectpolicies,networkpolicies,nodes}.yaml
8084
crd_to_json_schema dynamodb-controller https://raw.githubusercontent.com/aws-controllers-k8s/dynamodb-controller/main/helm/crds/dynamodb.services.k8s.{aws_backups,aws_globaltables,aws_tables}.yaml
8185
crd_to_json_schema aws-adopted-resources https://raw.githubusercontent.com/aws-controllers-k8s/dynamodb-controller/main/helm/crds/services.k8s.aws_adoptedresources.yaml

0 commit comments

Comments
 (0)