diff --git a/.github/actions/prepare_matrix/action.yaml b/.github/actions/prepare_matrix/action.yaml new file mode 100644 index 000000000..c38a0bb46 --- /dev/null +++ b/.github/actions/prepare_matrix/action.yaml @@ -0,0 +1,30 @@ +name: "Prepare build matrix" +description: "Prepare build matrix" +inputs: + matrix: + description: "Candidate build jobs" + required: true + default: "" +outputs: + jobs: + description: "matrix" + value: ${{ steps.prepare-matrix.outputs.jobs }} + +runs: + using: composite + steps: + - name: Check and output changed files + id: changed-files + uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # v45.0.4 + with: + files_ignore: | + **/*.md + separator: ',' + write_output_files: 'true' + - id: prepare-matrix + shell: bash + env: + INPUT_MATRIX: ${{ inputs.matrix }} + run: | + ./generate_matrix + echo "jobs=$(cat .github/outputs/__matrix.json)" >> $GITHUB_OUTPUT diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f1160915f..032332ca5 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -6,244 +6,254 @@ on: - "main" - "ceph-v*" jobs: + prepare_matrix: + runs-on: ubuntu-22.04 + outputs: + jobs: ${{ steps.prepare-matrix.outputs.jobs }} + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/prepare_matrix + id: prepare-matrix + with: + matrix: | + - dir: "./admission" + container-image: "neco-admission" + make-targets: "check-generate test" + - dir: "./alertmanager" + container-image: "alertmanager" + - dir: "./argocd" + container-image: "argocd" + - dir: "./argocd-image-updater" + container-image: "argocd-image-updater" + - dir: "./bird" + container-image: "bird" + - dir: "./blackbox_exporter" + container-image: "blackbox_exporter" + - dir: "./bmc-reverse-proxy" + container-image: "bmc-reverse-proxy" + make-targets: "setup check-generate test" + - dir: "./bmc-log-collector" + container-image: "bmc-log-collector" + make-targets: "setup check-generate test" + - dir: "./bpf-map-pressure-exporter" + container-image: "bpf-map-pressure-exporter" + make-targets: "check-generate test" + - dir: "./cadvisor" + container-image: "cadvisor" + - dir: "./cephcsi" + container-image: "cephcsi" + request-scan: "false" + - dir: "./cep-checker" + container-image: "cep-checker" + make-targets: "test" + - dir: "./ceph-extra-exporter" + container-image: "ceph-extra-exporter" + make-targets: "check-generate test" + - dir: "./cert-manager" + container-image: "cert-manager" + - dir: "./chrony" + container-image: "chrony" + - dir: "./cilium-certgen" + container-image: "cilium-certgen" + request-scan: "false" + - dir: "./cilium-operator-generic" + container-image: "cilium-operator-generic" + request-scan: "false" + - dir: "./configmap-reload" + container-image: "configmap-reload" + - dir: "./contour" + container-image: "contour" + - dir: "./coredns" + container-image: "coredns" + - dir: "csi-attacher" + container-image: "csi-attacher" + - dir: "csi-node-driver-registrar" + container-image: "csi-node-driver-registrar" + - dir: "csi-provisioner" + container-image: "csi-provisioner" + - dir: "csi-resizer" + container-image: "csi-resizer" + - dir: "csi-snapshotter" + container-image: "csi-snapshotter" + - dir: "./dex" + container-image: "dex" + - dir: "./etcd" + container-image: "etcd" + - dir: "./external-dns" + container-image: "external-dns" + - dir: "./fluent-bit" + container-image: "fluent-bit" + - dir: "./golang-all/golang-1.22-jammy" + container-image: "golang" + enable_arm64: true + request-scan: "true" + - dir: "./golang-all/golang-1.23-jammy" + container-image: "golang" + enable_arm64: true + request-scan: "true" + - dir: "./golang-all/golang-1.22-noble" + container-image: "golang" + enable_arm64: true + request-scan: "true" + - dir: "./golang-all/golang-1.23-noble" + container-image: "golang" + enable_arm64: true + request-scan: "true" + - dir: "./grafana" + container-image: "grafana" + - dir: "./grafana-operator" + container-image: "grafana-operator" + - dir: "./haproxy" + container-image: "haproxy" + - dir: "./heartbeat" + container-image: "heartbeat" + make-targets: "setup check-generate test" + - dir: "./kube-metrics-adapter" + container-image: "kube-metrics-adapter" + - dir: "./kube-state-metrics" + container-image: "kube-state-metrics" + - dir: "./kube-storage-version-migrator" + container-image: "storage-version-migration-initializer" + target: "initializer" + - dir: "./kube-storage-version-migrator" + container-image: "storage-version-migration-migrator" + target: "migrator" + - dir: "./kube-storage-version-migrator" + container-image: "storage-version-migration-trigger" + target: "trigger" + - dir: "./kubernetes" + container-image: "kubernetes" + - dir: "./local-pv-provisioner" + container-image: "local-pv-provisioner" + make-targets: "check-generate test ci-e2e-test" + - dir: "./loki" + container-image: "loki" + - dir: "./machines-endpoints" + container-image: "machines-endpoints" + make-targets: "setup check-generate test" + - dir: "./memcached" + container-image: "memcached" + - dir: "./memcached-exporter" + container-image: "memcached-exporter" + - dir: "./meows-dctest-runner" + container-image: "meows-dctest-runner" + request-scan: "true" + - dir: "./meows-neco-runner" + container-image: "meows-neco-runner" + request-scan: "true" + - dir: "./moco-switchover-downtime-monitor" + container-image: "moco-switchover-downtime-monitor" + - dir: "./opentelemetry-collector" + container-image: "opentelemetry-collector" + - dir: "./hubble" + container-image: "hubble" + - dir: "./hubble-relay" + container-image: "hubble-relay" + request-scan: "false" + - dir: "./hubble-ui" + container-image: "hubble-ui-frontend" + request-scan: "true" + target: "frontend" + - dir: "./hubble-ui" + container-image: "hubble-ui-backend" + request-scan: "true" + target: "backend" + - dir: "./pause" + container-image: "pause" + - dir: "./pod-delete-rate-limiter" + container-image: "pod-delete-rate-limiter" + make-targets: "test" + - dir: "./pomerium" + container-image: "pomerium" + - dir: "./prometheus-adapter" + container-image: "prometheus-adapter" + - dir: "./prometheus-config-reloader" + container-image: "prometheus-config-reloader" + - dir: "./promtail" + container-image: "promtail" + - dir: "./promtail-debug" + container-image: "promtail-debug" + - dir: "./pushgateway" + container-image: "pushgateway" + - dir: "./redis" + container-image: "redis" + - dir: "./registry" + container-image: "registry" + - dir: "./rook" + container-image: "rook" + - dir: "./sealed-secrets" + container-image: "sealed-secrets" + - dir: "./s3gw" + container-image: "s3gw" + make-targets: "setup check-generate test" + - dir: "./serf" + container-image: "serf" + - dir: "./stakater-reloader" + container-image: "stakater-reloader" + - dir: "./spegel" + container-image: "spegel" + - dir: "./squid" + container-image: "squid" + - dir: "./squid-exporter" + container-image: "squid-exporter" + make-targets: "test" + - dir: "./tcp-keepalive" + container-image: "tcp-keepalive" + make-targets: "check-diff test" + - dir: "./teleport-node" + container-image: "teleport-node" + - dir: "./tempo" + container-image: "tempo" + - dir: "./testhttpd" + container-image: "testhttpd" + make-targets: "setup check-generate test" + - dir: "./trust-manager" + container-image: "trust-manager" + - dir: "./trust-packages" + container-image: "trust-packages" + make-targets: "download-certificates" + - dir: "./unbound" + container-image: "unbound" + make-targets: "check-generate" + make-post-targets: "validate" + - dir: "./unbound_exporter" + container-image: "unbound_exporter" + - dir: "./vault" + container-image: "vault" + - dir: "./victoriametrics" + container-image: "victoriametrics-vmagent" + target: "vmagent" + - dir: "./victoriametrics" + container-image: "victoriametrics-vmalert" + target: "vmalert" + - dir: "./victoriametrics" + container-image: "victoriametrics-vmbackup" + target: "vmbackup" + - dir: "./victoriametrics" + container-image: "victoriametrics-vmctl" + target: "vmctl" + - dir: "./victoriametrics" + container-image: "victoriametrics-vminsert" + target: "vminsert" + - dir: "./victoriametrics" + container-image: "victoriametrics-vmrestore" + target: "vmrestore" + - dir: "./victoriametrics" + container-image: "victoriametrics-vmselect" + target: "vmselect" + - dir: "./victoriametrics" + container-image: "victoriametrics-vmsingle" + target: "vmsingle" + - dir: "./victoriametrics" + container-image: "victoriametrics-vmstorage" + target: "vmstorage" + - dir: "./victoriametrics-operator" + container-image: "victoriametrics-operator" build_container: + needs: prepare_matrix strategy: matrix: - job: - - dir: "./admission" - container-image: "neco-admission" - make-targets: "check-generate test" - - dir: "./alertmanager" - container-image: "alertmanager" - - dir: "./argocd" - container-image: "argocd" - - dir: "./argocd-image-updater" - container-image: "argocd-image-updater" - - dir: "./bird" - container-image: "bird" - - dir: "./blackbox_exporter" - container-image: "blackbox_exporter" - - dir: "./bmc-reverse-proxy" - container-image: "bmc-reverse-proxy" - make-targets: "setup check-generate test" - - dir: "./bmc-log-collector" - container-image: "bmc-log-collector" - make-targets: "setup check-generate test" - - dir: "./bpf-map-pressure-exporter" - container-image: "bpf-map-pressure-exporter" - make-targets: "check-generate test" - - dir: "./cadvisor" - container-image: "cadvisor" - - dir: "./cephcsi" - container-image: "cephcsi" - request-scan: "false" - - dir: "./cep-checker" - container-image: "cep-checker" - make-targets: "test" - - dir: "./ceph-extra-exporter" - container-image: "ceph-extra-exporter" - make-targets: "check-generate test" - - dir: "./cert-manager" - container-image: "cert-manager" - - dir: "./chrony" - container-image: "chrony" - - dir: "./cilium-certgen" - container-image: "cilium-certgen" - request-scan: "false" - - dir: "./cilium-operator-generic" - container-image: "cilium-operator-generic" - request-scan: "false" - - dir: "./configmap-reload" - container-image: "configmap-reload" - - dir: "./contour" - container-image: "contour" - - dir: "./coredns" - container-image: "coredns" - - dir: "csi-attacher" - container-image: "csi-attacher" - - dir: "csi-node-driver-registrar" - container-image: "csi-node-driver-registrar" - - dir: "csi-provisioner" - container-image: "csi-provisioner" - - dir: "csi-resizer" - container-image: "csi-resizer" - - dir: "csi-snapshotter" - container-image: "csi-snapshotter" - - dir: "./dex" - container-image: "dex" - - dir: "./etcd" - container-image: "etcd" - - dir: "./external-dns" - container-image: "external-dns" - - dir: "./fluent-bit" - container-image: "fluent-bit" - - dir: "./golang-all/golang-1.22-jammy" - container-image: "golang" - enable_arm64: true - request-scan: "true" - - dir: "./golang-all/golang-1.23-jammy" - container-image: "golang" - enable_arm64: true - request-scan: "true" - - dir: "./golang-all/golang-1.22-noble" - container-image: "golang" - enable_arm64: true - request-scan: "true" - - dir: "./golang-all/golang-1.23-noble" - container-image: "golang" - enable_arm64: true - request-scan: "true" - - dir: "./grafana" - container-image: "grafana" - - dir: "./grafana-operator" - container-image: "grafana-operator" - - dir: "./haproxy" - container-image: "haproxy" - - dir: "./heartbeat" - container-image: "heartbeat" - make-targets: "setup check-generate test" - - dir: "./kube-metrics-adapter" - container-image: "kube-metrics-adapter" - - dir: "./kube-state-metrics" - container-image: "kube-state-metrics" - - dir: "./kube-storage-version-migrator" - container-image: "storage-version-migration-initializer" - target: "initializer" - - dir: "./kube-storage-version-migrator" - container-image: "storage-version-migration-migrator" - target: "migrator" - - dir: "./kube-storage-version-migrator" - container-image: "storage-version-migration-trigger" - target: "trigger" - - dir: "./kubernetes" - container-image: "kubernetes" - - dir: "./local-pv-provisioner" - container-image: "local-pv-provisioner" - make-targets: "check-generate test ci-e2e-test" - - dir: "./loki" - container-image: "loki" - - dir: "./machines-endpoints" - container-image: "machines-endpoints" - make-targets: "setup check-generate test" - - dir: "./memcached" - container-image: "memcached" - - dir: "./memcached-exporter" - container-image: "memcached-exporter" - - dir: "./meows-dctest-runner" - container-image: "meows-dctest-runner" - request-scan: "true" - - dir: "./meows-neco-runner" - container-image: "meows-neco-runner" - request-scan: "true" - - dir: "./moco-switchover-downtime-monitor" - container-image: "moco-switchover-downtime-monitor" - - dir: "./opentelemetry-collector" - container-image: "opentelemetry-collector" - - dir: "./hubble" - container-image: "hubble" - - dir: "./hubble-relay" - container-image: "hubble-relay" - request-scan: "false" - - dir: "./hubble-ui" - container-image: "hubble-ui-frontend" - request-scan: "true" - target: "frontend" - - dir: "./hubble-ui" - container-image: "hubble-ui-backend" - request-scan: "true" - target: "backend" - - dir: "./pause" - container-image: "pause" - - dir: "./pod-delete-rate-limiter" - container-image: "pod-delete-rate-limiter" - make-targets: "test" - - dir: "./pomerium" - container-image: "pomerium" - - dir: "./prometheus-adapter" - container-image: "prometheus-adapter" - - dir: "./prometheus-config-reloader" - container-image: "prometheus-config-reloader" - - dir: "./promtail" - container-image: "promtail" - - dir: "./promtail-debug" - container-image: "promtail-debug" - - dir: "./pushgateway" - container-image: "pushgateway" - - dir: "./redis" - container-image: "redis" - - dir: "./registry" - container-image: "registry" - - dir: "./rook" - container-image: "rook" - - dir: "./sealed-secrets" - container-image: "sealed-secrets" - - dir: "./s3gw" - container-image: "s3gw" - make-targets: "setup check-generate test" - - dir: "./serf" - container-image: "serf" - - dir: "./stakater-reloader" - container-image: "stakater-reloader" - - dir: "./spegel" - container-image: "spegel" - - dir: "./squid" - container-image: "squid" - - dir: "./squid-exporter" - container-image: "squid-exporter" - make-targets: "test" - - dir: "./tcp-keepalive" - container-image: "tcp-keepalive" - make-targets: "check-diff test" - - dir: "./teleport-node" - container-image: "teleport-node" - - dir: "./tempo" - container-image: "tempo" - - dir: "./testhttpd" - container-image: "testhttpd" - make-targets: "setup check-generate test" - - dir: "./trust-manager" - container-image: "trust-manager" - - dir: "./trust-packages" - container-image: "trust-packages" - make-targets: "download-certificates" - - dir: "./unbound" - container-image: "unbound" - make-targets: "check-generate" - make-post-targets: "validate" - - dir: "./unbound_exporter" - container-image: "unbound_exporter" - - dir: "./vault" - container-image: "vault" - - dir: "./victoriametrics" - container-image: "victoriametrics-vmagent" - target: "vmagent" - - dir: "./victoriametrics" - container-image: "victoriametrics-vmalert" - target: "vmalert" - - dir: "./victoriametrics" - container-image: "victoriametrics-vmbackup" - target: "vmbackup" - - dir: "./victoriametrics" - container-image: "victoriametrics-vmctl" - target: "vmctl" - - dir: "./victoriametrics" - container-image: "victoriametrics-vminsert" - target: "vminsert" - - dir: "./victoriametrics" - container-image: "victoriametrics-vmrestore" - target: "vmrestore" - - dir: "./victoriametrics" - container-image: "victoriametrics-vmselect" - target: "vmselect" - - dir: "./victoriametrics" - container-image: "victoriametrics-vmsingle" - target: "vmsingle" - - dir: "./victoriametrics" - container-image: "victoriametrics-vmstorage" - target: "vmstorage" - - dir: "./victoriametrics-operator" - container-image: "victoriametrics-operator" - + job: ${{ fromJson(needs.prepare_matrix.outputs.jobs) }} runs-on: ubuntu-22.04 env: go-version: "1.23.3" diff --git a/generate_matrix b/generate_matrix new file mode 100755 index 000000000..a5f50ebf9 --- /dev/null +++ b/generate_matrix @@ -0,0 +1,26 @@ +#!/bin/bash -e + +# https://github.com/tj-actions/changed-files?tab=readme-ov-file#outputs- +cat .github/outputs/all_changed_and_modified_files.txt | tr ',' '\n' | xargs realpath > .github/outputs/__diff.txt + +echo "Changed Files:" +cat .github/outputs/__diff.txt | jq -n --raw-input '[inputs]' | yq -P + +JSON_MATRIX="$(echo "${INPUT_MATRIX}" | yq -ojson)" +OUTPUT_MATRIX='[]' +for i in $(seq $(echo "${JSON_MATRIX}" | jq length)); do + ENTRY=$(echo "${JSON_MATRIX}" | jq ".[$i - 1]") + CONTAINER_DIR=$(echo "${ENTRY}" | jq -r '.dir') + CONTAINER_NAME=$(echo "${ENTRY}" | jq -r '."container-image"') + echo "Checking ${CONTAINER_NAME}..." + if grep -F $(realpath "${CONTAINER_DIR}") .github/outputs/__diff.txt > /dev/null; then + OUTPUT_MATRIX="$(jq -nc '[inputs] | flatten' <(echo "${OUTPUT_MATRIX}") <(echo "[${ENTRY}]"))" + echo ' OK' + fi +done + +echo "Result:" +echo "${OUTPUT_MATRIX}" | yq -P + +# Render matrix +echo "${OUTPUT_MATRIX}" | jq -c > .github/outputs/__matrix.json diff --git a/squid/TAG b/squid/TAG index 81f1df119..3ae64ac5d 100644 --- a/squid/TAG +++ b/squid/TAG @@ -1 +1 @@ -6.12.0.1 +6.12.0.2 diff --git a/victoriametrics/TAG b/victoriametrics/TAG index fac26c401..b1ab1ddd5 100644 --- a/victoriametrics/TAG +++ b/victoriametrics/TAG @@ -1 +1 @@ -1.106.1.1 +1.106.1.2