This commit is contained in:
		| @@ -1,21 +1,15 @@ | ||||
| local CacheVolume = "cache"; | ||||
|  | ||||
| local Cache(name, settings) = { | ||||
|   name: name, | ||||
|   image: "meltwater/drone-cache", | ||||
|   pull: true, | ||||
|   settings: { | ||||
|     backend: "filesystem", | ||||
|     cache_key: "{{ .Repo.Name }}", | ||||
|     archive_format: "gzip", | ||||
|     mount: [ | ||||
|       "/nix/store" | ||||
|     ] | ||||
|   } + settings, | ||||
|   volumes: [ | ||||
|     { | ||||
|       name: "cache", | ||||
|       path: "/tmp/cache" | ||||
|     } | ||||
|   ] | ||||
|   image: "drillster/drone-volume-cache", | ||||
|   volumes: [ { | ||||
|     name: CacheVolume, | ||||
|     path: "/cache" | ||||
|   } ], | ||||
|   settings: settings + { | ||||
|     mount: ["/nix/store"] | ||||
|   } | ||||
| }; | ||||
|  | ||||
| local Pipeline(channel) = { | ||||
| @@ -30,12 +24,12 @@ local Pipeline(channel) = { | ||||
|     CACHIX_CACHE: "xeals", | ||||
|     CACHIX_SIGNING_KEY: { from_secret: "cachix_key" }, | ||||
|   }, | ||||
|   volumes: [ | ||||
|     { | ||||
|       name: "cache", | ||||
|       temp: {} | ||||
|   volumes: [ { | ||||
|     name: CacheVolume, | ||||
|     host: { | ||||
|       path: "/tmp/drone/cache" | ||||
|     } | ||||
|   ], | ||||
|   } ], | ||||
|   steps: [ | ||||
|     Cache("restore-nix-store", { | ||||
|       restore: true | ||||
|   | ||||
							
								
								
									
										57
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										57
									
								
								.drone.yml
									
									
									
									
									
								
							| @@ -9,18 +9,14 @@ platform: | ||||
|  | ||||
| steps: | ||||
| - name: restore-nix-store | ||||
|   pull: true | ||||
|   image: meltwater/drone-cache | ||||
|   image: drillster/drone-volume-cache | ||||
|   settings: | ||||
|     archive_format: gzip | ||||
|     backend: filesystem | ||||
|     cache_key: "{{ .Repo.Name }}" | ||||
|     mount: | ||||
|     - /nix/store | ||||
|     restore: true | ||||
|   volumes: | ||||
|   - name: cache | ||||
|     path: /tmp/cache | ||||
|     path: /cache | ||||
|  | ||||
| - name: build | ||||
|   image: nixos/nix | ||||
| @@ -46,18 +42,14 @@ steps: | ||||
|     NUR_REPO: xeals | ||||
|  | ||||
| - name: save-nix-store | ||||
|   pull: true | ||||
|   image: meltwater/drone-cache | ||||
|   image: drillster/drone-volume-cache | ||||
|   settings: | ||||
|     archive_format: gzip | ||||
|     backend: filesystem | ||||
|     cache_key: "{{ .Repo.Name }}" | ||||
|     mount: | ||||
|     - /nix/store | ||||
|     rebuild: true | ||||
|   volumes: | ||||
|   - name: cache | ||||
|     path: /tmp/cache | ||||
|     path: /cache | ||||
|   when: | ||||
|     status: | ||||
|     - success | ||||
| @@ -65,7 +57,8 @@ steps: | ||||
|  | ||||
| volumes: | ||||
| - name: cache | ||||
|   temp: {} | ||||
|   host: | ||||
|     path: /tmp/cache | ||||
|  | ||||
| --- | ||||
| kind: pipeline | ||||
| @@ -78,18 +71,14 @@ platform: | ||||
|  | ||||
| steps: | ||||
| - name: restore-nix-store | ||||
|   pull: true | ||||
|   image: meltwater/drone-cache | ||||
|   image: drillster/drone-volume-cache | ||||
|   settings: | ||||
|     archive_format: gzip | ||||
|     backend: filesystem | ||||
|     cache_key: "{{ .Repo.Name }}" | ||||
|     mount: | ||||
|     - /nix/store | ||||
|     restore: true | ||||
|   volumes: | ||||
|   - name: cache | ||||
|     path: /tmp/cache | ||||
|     path: /cache | ||||
|  | ||||
| - name: build | ||||
|   image: nixos/nix | ||||
| @@ -115,18 +104,14 @@ steps: | ||||
|     NUR_REPO: xeals | ||||
|  | ||||
| - name: save-nix-store | ||||
|   pull: true | ||||
|   image: meltwater/drone-cache | ||||
|   image: drillster/drone-volume-cache | ||||
|   settings: | ||||
|     archive_format: gzip | ||||
|     backend: filesystem | ||||
|     cache_key: "{{ .Repo.Name }}" | ||||
|     mount: | ||||
|     - /nix/store | ||||
|     rebuild: true | ||||
|   volumes: | ||||
|   - name: cache | ||||
|     path: /tmp/cache | ||||
|     path: /cache | ||||
|   when: | ||||
|     status: | ||||
|     - success | ||||
| @@ -134,7 +119,8 @@ steps: | ||||
|  | ||||
| volumes: | ||||
| - name: cache | ||||
|   temp: {} | ||||
|   host: | ||||
|     path: /tmp/cache | ||||
|  | ||||
| --- | ||||
| kind: pipeline | ||||
| @@ -147,18 +133,14 @@ platform: | ||||
|  | ||||
| steps: | ||||
| - name: restore-nix-store | ||||
|   pull: true | ||||
|   image: meltwater/drone-cache | ||||
|   image: drillster/drone-volume-cache | ||||
|   settings: | ||||
|     archive_format: gzip | ||||
|     backend: filesystem | ||||
|     cache_key: "{{ .Repo.Name }}" | ||||
|     mount: | ||||
|     - /nix/store | ||||
|     restore: true | ||||
|   volumes: | ||||
|   - name: cache | ||||
|     path: /tmp/cache | ||||
|     path: /cache | ||||
|  | ||||
| - name: build | ||||
|   image: nixos/nix | ||||
| @@ -184,18 +166,14 @@ steps: | ||||
|     NUR_REPO: xeals | ||||
|  | ||||
| - name: save-nix-store | ||||
|   pull: true | ||||
|   image: meltwater/drone-cache | ||||
|   image: drillster/drone-volume-cache | ||||
|   settings: | ||||
|     archive_format: gzip | ||||
|     backend: filesystem | ||||
|     cache_key: "{{ .Repo.Name }}" | ||||
|     mount: | ||||
|     - /nix/store | ||||
|     rebuild: true | ||||
|   volumes: | ||||
|   - name: cache | ||||
|     path: /tmp/cache | ||||
|     path: /cache | ||||
|   when: | ||||
|     status: | ||||
|     - success | ||||
| @@ -203,6 +181,7 @@ steps: | ||||
|  | ||||
| volumes: | ||||
| - name: cache | ||||
|   temp: {} | ||||
|   host: | ||||
|     path: /tmp/cache | ||||
|  | ||||
| ... | ||||
|   | ||||
		Reference in New Issue
	
	Block a user