From 7705351954a5f236df15e99bee1a90848aa3ab33 Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Sun, 25 Feb 2024 22:16:38 +0100 Subject: add ci --- ci.yml | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 ci.yml (limited to 'ci.yml') diff --git a/ci.yml b/ci.yml new file mode 100644 index 0000000..49c0eb3 --- /dev/null +++ b/ci.yml @@ -0,0 +1,87 @@ +--- +alerts: &alerts + on_failure: + put: alert-email + params: &email-params + subject_text: "${BUILD_PIPELINE_NAME} (${BUILD_JOB_NAME}): build ${BUILD_ID} failed!" + body_text: | + ${BUILD_NAME} failed! + Build ID: ${BUILD_ID} + Build Name: ${BUILD_NAME} + Build Job Name: ${BUILD_JOB_NAME} + Build Pipeline Name: ${BUILD_PIPELINE_NAME} + ATC External URL: ${ATC_EXTERNAL_URL} + Direct link: ${ATC_EXTERNAL_URL}/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} + on_error: + put: alert-email + params: *email-params + +resource_types: + - name: email + type: docker-image + source: + repository: pcfseceng/email-resource + +resources: + - name: hm-extra + type: git + icon: git + source: + uri: https://git.segundo.io/nix/hm-extra + branch: master + + - name: concourse + type: git + icon: toolbox + source: + uri: https://git.segundo.io/concourse + + - name: daily-trigger + type: time + icon: clock-fast + source: + interval: 24h + + - name: alert-email + type: email + source: + smtp: + host: ((alerts-stmp-host)) + port: "((alerts-stmp-port))" # this must be a string + username: ((alerts-stmp-username)) + password: ((alerts-stmp-password)) + from: ((alerts-from)) + to: ["((alerts-to))"] + +jobs: + - name: linters + <<: *alerts + serial: true + plan: + - in_parallel: + fail_fast: true + steps: + - get: hm-extra + trigger: true + - get: concourse + trigger: true + - get: daily-trigger + trigger: true + + - in_parallel: + fail_fast: false + steps: + - task: deadnix + file: concourse/tasks/deadnix/task.yml + input_mapping: + file-paths: hm-extra + + - task: statix + file: concourse/tasks/statix/task.yml + input_mapping: + file-path: hm-extra + + - task: nixpkgs-fmt + file: concourse/tasks/nixpkgs-fmt/task.yml + input_mapping: + file-path: hm-extra -- cgit v1.2.3