Skip to content

Commit

Permalink
Merge pull request #42 from johandahlberg/get_ngi_pipeline_reports
Browse files Browse the repository at this point in the history
Get ngi pipeline reports
  • Loading branch information
Johan Hermansson committed Sep 22, 2016
2 parents 9115c91 + 30014b4 commit 2ca9463
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
16 changes: 16 additions & 0 deletions actions/gather_ngi_pipeline_reports.yaml
@@ -0,0 +1,16 @@
---
name: gather_ngi_pipeline_reports
description: Downloads the ngi pipeline reports to the summary host
enabled: true
runner_type: mistral-v2
entry_point: workflows/gather_ngi_pipeline_reports.yaml
pack: arteria-packs
parameters:
context:
default: {}
immutable: true
type: object
workflow:
default: arteria-packs.gather_ngi_pipeline_reports
immutable: true
type: string
36 changes: 36 additions & 0 deletions actions/workflows/gather_ngi_pipeline_reports.yaml
@@ -0,0 +1,36 @@
version: "2.0" # mistral version
name: arteria-packs.gather_ngi_pipeline_reports
description: Downloads ngi pipeline reports from e.g. irma to our summary host.

workflows:
main:
type: direct

tasks:
note_workflow_version:
action: core.local
input:
cmd: git rev-parse HEAD
cwd: /opt/stackstorm/packs/arteria-packs/
on-success:
- get_config

get_config:
action: arteria-packs.get_pack_config
publish:
summary_host: <% task(get_config).result.result.summary_host %>
summary_user: <% task(get_config).result.result.summary_user %>
summary_ngi_pipeline_reports_destination: <% task(get_config).result.result.summary_ngi_pipeline_reports_destination %>
irma_reports_remote_path: <% task(get_config).result.result.irma_reports_remote_path %>
summary_host_key: <% task(get_config).result.result.summary_host_key %>
on-success:
- rsync_from_irma

rsync_from_irma:
action: core.remote
input:
cmd: rsync -e "ssh -i /home/seqsum/.ssh/mm-xlas002" -r funk_901@irma1.uppmax.uu.se:<% $.irma_reports_remote_path %>/ <% $.summary_ngi_pipeline_reports_destination %>/
hosts: <% $.summary_host %>
username: <% $.summary_user %>
private_key: <% $.summary_host_key %>

2 changes: 2 additions & 0 deletions config.yaml
Expand Up @@ -8,6 +8,7 @@ summary_host: testuppmax
summary_user: arteria
summary_host_key: /path/to/ssh/key
summary_destination: /tmp/summaries/
summary_ngi_pipeline_reports_destination: /tmp/summaries/ngi_reports

remote_host: testuppmax
remote_user: arteria
Expand All @@ -19,6 +20,7 @@ ngi_pipeline_url: https://irma1.uppmax.uu.se:4444/ngi_pipeline_upps

irma_api_key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
irma_remote_path: ./staging/
irma_reports_remote_path: ./staging/reports/
irma_checksum_base_url: https://irma1.uppmax.uu.se:4444/arteria_checksum_staging/api/1.0
irma_siswrap_base_url: https://irma1.uppmax.uu.se:4444/arteria_siswrap_staging/api/1.0

Expand Down
16 changes: 16 additions & 0 deletions rules/gather_ngi_pipeline_reports.yaml
@@ -0,0 +1,16 @@
---
name: "arteria-packs.gather_ngi_pipeline_reports"
pack: "arteria-packs"
description: "Attempts to synchronize project reports from the ngi_pipeline at the set intervals."
enabled: true

trigger:
type: "core.st2.IntervalTimer"
parameters:
unit: hours
delta: 6

action:
ref: "arteria-packs.gather_ngi_pipeline_reports"


0 comments on commit 2ca9463

Please sign in to comment.