Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get ngi pipeline reports #42

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"