diff --git a/.github/workflows/custom_docker_builds.yml b/.github/workflows/custom_docker_builds.yml index afffff6ea..c222ee357 100644 --- a/.github/workflows/custom_docker_builds.yml +++ b/.github/workflows/custom_docker_builds.yml @@ -43,7 +43,7 @@ jobs: - docker-image: ./images/snapshot-release-tags image-tags: ghcr.io/spack/snapshot-release-tags:0.0.4 - docker-image: ./images/cache-indexer - image-tags: ghcr.io/spack/cache-indexer:0.0.6 + image-tags: ghcr.io/spack/cache-indexer:0.0.7 - docker-image: ./analytics image-tags: ghcr.io/spack/django:0.5.11 - docker-image: ./images/ci-prune-buildcache diff --git a/images/cache-indexer/cache_indexer.py b/images/cache-indexer/cache_indexer.py index ad9b87ed3..9ac042ddf 100644 --- a/images/cache-indexer/cache_indexer.py +++ b/images/cache-indexer/cache_indexer.py @@ -98,10 +98,12 @@ def build_json(bucket_name, index_paths): mirror_label = get_label(parts[1]) if mirror_label: try: + index_url = get_index_url(bucket_name, p) json_data[ref].append({ "label": mirror_label, - "url": get_index_url(bucket_name, p), + "url": index_url, }) + print(f"Adding index to label {mirror_label}: {index_url}") except IndexManifestError as e: print(f"Skipping {p} due to: {e}") continue @@ -118,6 +120,7 @@ def query_bucket(bucket_name): for obj in page["Contents"]: if INDEX_MATCHER.search(obj["Key"]): results.append(obj["Key"]) + print("Found index at: " + obj["Key"]) return results diff --git a/k8s/production/custom/cache-indexer/cron-jobs.yaml b/k8s/production/custom/cache-indexer/cron-jobs.yaml index 9043ad0e2..845d3dc03 100644 --- a/k8s/production/custom/cache-indexer/cron-jobs.yaml +++ b/k8s/production/custom/cache-indexer/cron-jobs.yaml @@ -14,7 +14,7 @@ spec: restartPolicy: Never containers: - name: index-binary-caches - image: ghcr.io/spack/cache-indexer:0.0.6 + image: ghcr.io/spack/cache-indexer:0.0.7 imagePullPolicy: IfNotPresent env: - name: BUCKET_NAME