Files
singh3/ci/pipeline.yml
Amneesh Singh cdf5c2bce6 test cachix
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-05-07 03:53:38 +05:30

83 lines
1.7 KiB
YAML

resource_types:
- name: nomad
type: registry-image
source:
repository: natto17/concourse-nomad-resource
tag: latest
resources:
- name: image
type: registry-image
icon: docker
source:
repository: ((docker.user))/singh3
tag: latest
username: ((docker.user))
password: ((docker.pass))
- name: nomad-job
type: nomad
source:
url: https://nomad.weirdnatto.in
name: singh3
token: ((nomad.token))
consul_token: ((nomad.consul))
vault_token: ((nomad.vault))
- name: repo
type: git
icon: discord
source:
uri: https://git.weirdnatto.in/natto1784/singh3.git
branch: master
- name: nix
type: registry-image
icon: docker
source:
repository: nixos/nix
tag: latest-arm64
jobs:
- name: configure-self
public: true
plan:
- get: repo
trigger: true
- set_pipeline: self
file: repo/ci/pipeline.yml
- name: singh3
plan:
- get: repo
trigger: true
passed: [configure-self]
- get: nix
trigger: false
- task: build
image: nix
config:
params:
CACHIX_NAME: ((cachix.name))
CACHIX_AUTH_TOKEN: ((cachix.token))
inputs:
- name: repo
platform: linux
run:
path: sh
args:
- -c
- |
nix-env -iA nixpkgs.cachix
cachix use $CACHIX_NAME
cachix watch-exec pain nix -- --extra-experimental-features "nix-command flakes" build ./repo
nix --extra-experimental-features "nix-command flakes" build ./repo#image -o result
nix-shell -p gzip --run "gzip -c $(readlink result) > final"
- put: image
params:
image: final
- put: nomad-job
params:
job_path: repo/singh3.nomad
templating: false
restart: true