feat: simpler test workflow with configuration

This commit is contained in:
2026-05-18 21:06:30 +02:00
parent ad0d91aee0
commit 0ec084b720
8 changed files with 87 additions and 54 deletions

View File

@@ -1,52 +1,18 @@
params.str = "Hello, world!"
nextflow.enable.dsl = 2
process split {
publishDir "results/lower"
input:
val x
process hello {
container 'ubuntu:22.04'
output:
path 'chunk_*'
path 'hello.txt'
script:
"""
printf '${x}' | split -b 6 - chunk_
"""
}
process to_upper {
tag "$y"
input:
path y
output:
path 'upper_*'
script:
"""
cat $y | tr '[a-z]' '[A-Z]' > upper_${y}
echo "Hello, from kubernetes" > hello.txt
hostname >> hello.txt
"""
}
workflow {
main:
ch_str = channel.of(params.str)
ch_chunks = split(ch_str)
ch_upper = to_upper(ch_chunks.flatten())
publish:
lower = ch_chunks.flatten()
upper = ch_upper
}
output {
lower {
path 'lower'
}
upper {
path 'upper'
}
hello()
}

35
test/nextflow.config Normal file
View File

@@ -0,0 +1,35 @@
plugins {
id 'nf-k8s'
}
workDir = '/workspace'
process {
executor = 'k8s'
container = 'ubuntu:22.04'
pod = [
imagePullPolicy: 'IfNotPresent'
]
}
k8s {
namespace = 'default'
storageClaimName = 'my-claim'
storageMountPath = '/workspace'
launchDir = '/workspace/launch'
projectDir = '/workspace/projects'
cleanup = false
nextflowImage = 'gitea.kleine.eulenhexe.de/kevin/ma/nextflow-dvfs:0.1'
imagePullPolicy = 'IfNotPresent'
nodeInit {
enabled = false
image = 'gitea.kleine.eulenhexe.de/kevin/ma/dvfs-agent:0.1'
command = ['/bin/agent']
wait = 'Running'
cleanup = false
}
}