Try setting cache policy

This commit is contained in:
Greg Hellings
2024-04-21 16:32:15 +00:00
parent 3e360a000a
commit 160b065cac
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -11,6 +11,10 @@ stages:
- sources/build.pkr.hcl - sources/build.pkr.hcl
paths: paths:
- ./packer_config/ - ./packer_config/
- key: isofiles
paths:
- ./cache/*.iso
policy: pull
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
variables: variables:
@@ -25,9 +29,6 @@ stages:
- pipeline: $PARENT_PIPELINE_ID - pipeline: $PARENT_PIPELINE_ID
job: generate job: generate
artifacts: true artifacts: true
- pipeline: $PARENT_PIPELINE_ID
job: download
artifacts: true
tags: tags:
- ${tag} - ${tag}
variables: &variables variables: &variables
+4 -3
View File
@@ -63,15 +63,16 @@ shellcheck:
downloads: downloads:
stage: cache stage: cache
retry: 2 retry: 2
artifacts:
paths:
- cache/*.iso
cache: cache:
- key: - key:
files: files:
- sources/build.pkr.hcl - sources/build.pkr.hcl
paths: paths:
- ./packer_config/ - ./packer_config/
- key: isofiles
paths:
- ./cache/*.iso
policy: push-pull
script: script:
- packer init sources - packer init sources
- bash cache.sh - bash cache.sh