diff --git a/helmfile.yaml.gotmpl b/helmfile.yaml.gotmpl index 3828ee2..7d48d44 100644 --- a/helmfile.yaml.gotmpl +++ b/helmfile.yaml.gotmpl @@ -314,6 +314,12 @@ releases: enabled: true certificateSecret: all-in-one-tls - fileserver: + buildpacks: + {{ range $name, $buildpack := .Values.buildpacks }} + {{ $name }}: + image: {{ $buildpack.image }} + tag: {{ $buildpack.tag }} + {{ end }} enabled: true - sshProxy: enabled: true diff --git a/scripts/sync-cf-deployment-versions.py b/scripts/sync-cf-deployment-versions.py index 2ea2d95..503a753 100755 --- a/scripts/sync-cf-deployment-versions.py +++ b/scripts/sync-cf-deployment-versions.py @@ -17,6 +17,8 @@ "routing": "routing", "uaa": "uaa", } + +BUILDPACKS = [ "java-buildpack", "nodejs-buildpack", "go-buildpack", "binary-buildpack", "dotnet-core-buildpack", "nginx-buildpack", "php-buildpack", "python-buildpack", "r-buildpack", "ruby-buildpack", "staticfile-buildpack"] def latest_cf_deployment_release() -> str: @@ -68,16 +70,20 @@ def main(): release_versions["cf-deployment"] = manifest_version for r in releases: - if r["name"] not in BOSH_RELEASES: + if (r["name"] not in BOSH_RELEASES) and (r["name"] not in BUILDPACKS): print(f"Skipping release update of '{r['name']}': not a managed release", file=sys.stderr) continue - yaml_key = BOSH_RELEASES[r["name"]] - if yaml_key not in values.get("charts", {}): - print(f"error in release update of '{r['name']}': no value found", file=sys.stderr) - sys.exit(1) + yaml_key = BOSH_RELEASES.get(r["name"], "unknown") + if yaml_key in values.get("charts", {}): + values["charts"][yaml_key]["version"] = str(r["version"]) + print(f"Updated release '{r['name']}' to version {r['version']}") + elif r["name"] in BUILDPACKS and r["name"] in values.get("buildpacks", {}): + values["buildpacks"][r["name"]]["tag"] = str(r["version"]) + print(f"Updated buildpack '{r['name']}' to version {r['version']}") + else: + print(f"error in release update of '{r['name']}': no value found", file=sys.stderr) + sys.exit(1) - values["charts"][yaml_key]["version"] = str(r["version"]) - print(f"Updated release '{r['name']}' to version {r['version']}") with open(values_file, "w") as f: yaml.dump(values, f) diff --git a/scripts/upload_buildpacks.sh b/scripts/upload_buildpacks.sh index 29a509f..051a843 100755 --- a/scripts/upload_buildpacks.sh +++ b/scripts/upload_buildpacks.sh @@ -2,21 +2,21 @@ set -e -INSTALLED_BUILPACKS=$(cf curl /v3/buildpacks | jq -r '.resources[] | "#" + .name + "#"') +INSTALLED_BUILDPACKS=$(cf curl /v3/buildpacks | jq -r '.resources[] | "#" + .name + "#"') -buildpacks=("java_buildpack" "nodejs_buildpack" "go_buildpack" "binary_buildpack") +buildpacks=("java-buildpack" "nodejs-buildpack" "go-buildpack" "binary-buildpack") position=1 if [[ $ALL_BUILDPACKS == "true" ]]; then - buildpacks+=("dotnet-core_buildpack" "nginx_buildpack" "php_buildpack" "python_buildpack" "r_buildpack" "ruby_buildpack" "staticfile_buildpack") + buildpacks+=("dotnet-core-buildpack" "nginx-buildpack" "php-buildpack" "python-buildpack" "r-buildpack" "ruby-buildpack" "staticfile-buildpack") fi - for buildpack in "${buildpacks[@]}"; do - if [[ $INSTALLED_BUILPACKS =~ "#$buildpack#" ]]; then - cf update-buildpack "$buildpack" -p "http://fileserver.127-0-0-1.nip.io/${buildpack}-cflinuxfs4.zip" + buildpack_name=$(echo "$buildpack" | sed 's/-buildpack/_buildpack/') + if [[ $INSTALLED_BUILDPACKS =~ "#$buildpack_name#" ]]; then + cf update-buildpack "$buildpack_name" -p "http://fileserver.127-0-0-1.nip.io/${buildpack}/${buildpack}.zip" else - cf create-buildpack "$buildpack" "http://fileserver.127-0-0-1.nip.io/${buildpack}-cflinuxfs4.zip" "$position" + cf create-buildpack "$buildpack_name" "http://fileserver.127-0-0-1.nip.io/${buildpack}/${buildpack}.zip" "$position" fi ((position++)) done diff --git a/versions.yaml b/versions.yaml index 85b0e52..ce97c74 100644 --- a/versions.yaml +++ b/versions.yaml @@ -4,7 +4,7 @@ charts: version: 1.235.0 cfNetworking: url: cloudfoundry-k8s/cf-networking - version: 3.114.0 + version: 3.115.0 cilium: url: cilium/cilium version: 1.18.4 @@ -13,7 +13,7 @@ charts: version: 2.15.8 diego: url: cloudfoundry-k8s/diego - version: 0.23.0 + version: 2.138.0 istioBase: url: istio/base version: 1.29.1 @@ -26,7 +26,7 @@ charts: version: 0.6.3 logCache: url: cloudfoundry-k8s/log-cache - version: 3.2.8 + version: 3.2.10 loggregator: url: cloudfoundry-k8s/loggregator version: 107.0.31 @@ -52,7 +52,42 @@ charts: version: 16.7.27 routing: url: cloudfoundry-k8s/routing - version: 0.382.0 + version: 0.384.0 uaa: url: cloudfoundry-k8s/uaa version: 78.16.0 + +buildpacks: + binary-buildpack: + image: ghcr.io/cloudfoundry/k8s/binary-buildpack + tag: 1.1.26 + dotnet-core-buildpack: + image: ghcr.io/cloudfoundry/k8s/dotnet-core-buildpack + tag: 2.4.51 + java-buildpack: + image: ghcr.io/cloudfoundry/k8s/java-buildpack + tag: 5.0.4 + go-buildpack: + image: ghcr.io/cloudfoundry/k8s/go-buildpack + tag: 1.10.47 + nginx-buildpack: + image: ghcr.io/cloudfoundry/k8s/nginx-buildpack + tag: 1.2.38 + nodejs-buildpack: + image: ghcr.io/cloudfoundry/k8s/nodejs-buildpack + tag: 1.9.2 + php-buildpack: + image: ghcr.io/cloudfoundry/k8s/php-buildpack + tag: 5.0.6 + python-buildpack: + image: ghcr.io/cloudfoundry/k8s/python-buildpack + tag: 1.9.1 + r-buildpack: + image: ghcr.io/cloudfoundry/k8s/r-buildpack + tag: 1.2.28 + ruby-buildpack: + image: ghcr.io/cloudfoundry/k8s/ruby-buildpack + tag: 1.11.1 + staticfile-buildpack: + image: ghcr.io/cloudfoundry/k8s/staticfile-buildpack + tag: 1.6.38