summaryrefslogtreecommitdiff
path: root/test/asset/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/asset/run')
-rw-r--r--test/asset/run/dependencies.yaml62
-rw-r--r--test/asset/run/explicit.yaml7
-rw-r--r--test/asset/run/external.yaml42
-rw-r--r--test/asset/run/many_repos.yaml109
-rw-r--r--test/asset/run/norepo-basic.yaml20
-rw-r--r--test/asset/run/repo-basic.yaml7
-rw-r--r--test/asset/run/repo-basic2.yaml15
-rw-r--r--test/asset/run/rerun.yaml45
8 files changed, 307 insertions, 0 deletions
diff --git a/test/asset/run/dependencies.yaml b/test/asset/run/dependencies.yaml
new file mode 100644
index 0000000..13d5e63
--- /dev/null
+++ b/test/asset/run/dependencies.yaml
@@ -0,0 +1,62 @@
+repo other:
+
+job first:
+ shell:
+ - touch x
+
+ artifact out:
+ path: x
+
+
+job second:
+ uses:
+ - first.out
+
+ shell:
+ - mv x y
+
+ artifact out:
+ path: y
+
+
+job third:
+ uses:
+ - first.out
+
+ shell:
+ - mv x z
+
+ artifact out:
+ path: z
+
+
+job fourth:
+ checkout:
+ - dest: a
+ - repo: other
+ dest: b
+
+ uses:
+ - second.out
+
+ shell:
+ - mv y w
+
+ artifact out:
+ path: w
+
+
+job fifth:
+ uses:
+ - third.out
+ - fourth.out
+
+ shell:
+ - mv z z2
+ - mv w w2
+
+ artifact out1:
+ path: z2
+
+ artifact out2:
+ path: w2
diff --git a/test/asset/run/explicit.yaml b/test/asset/run/explicit.yaml
new file mode 100644
index 0000000..d543d16
--- /dev/null
+++ b/test/asset/run/explicit.yaml
@@ -0,0 +1,7 @@
+job build:
+ shell:
+ - ls subdir | sed -e ':a;N;s/\n/ /;ta' > list
+ - echo >> list
+
+ artifact out:
+ path: list
diff --git a/test/asset/run/external.yaml b/test/asset/run/external.yaml
new file mode 100644
index 0000000..f1d2b2c
--- /dev/null
+++ b/test/asset/run/external.yaml
@@ -0,0 +1,42 @@
+repo first:
+ path: ../first
+
+repo second:
+ path: ../second
+
+
+job single:
+ checkout:
+ repo: first
+ dest: first
+
+ shell:
+ - tar czf first.tar.gz first
+
+ artifact tarball:
+ path: ./first.tar.gz
+
+job multiple:
+ checkout:
+ - repo: first
+ dest: first-subdir
+ subtree: subdir
+ - repo: second
+ dest: second-subdir
+ subtree: sub
+
+ shell:
+ - tar czf pack.tar.gz first-subdir second-subdir
+
+ artifact tarball:
+ path: ./pack.tar.gz
+
+job combine:
+ checkout: null
+
+ shell:
+ - ls
+
+ uses:
+ - single.tarball
+ - multiple.tarball
diff --git a/test/asset/run/many_repos.yaml b/test/asset/run/many_repos.yaml
new file mode 100644
index 0000000..d861433
--- /dev/null
+++ b/test/asset/run/many_repos.yaml
@@ -0,0 +1,109 @@
+repo r1:
+repo r2:
+repo r3:
+repo r4:
+repo r5:
+
+destination d1:
+
+job first:
+ checkout:
+ - repo: r1
+ dest: d1
+ - repo: r4
+ dest: d4b
+ - repo: r3
+ dest: d3
+ - repo: r2
+ dest: d2
+ - repo: r4
+ dest: d4
+
+ shell:
+ - touch some_file
+
+ artifact out:
+ path: some_file
+
+job first_manual_revision:
+ checkout:
+ - repo: r1
+ dest: d1
+ - repo: r1
+ dest: d1b
+ revision: tag1
+ - repo: r2
+ dest: d2b
+ revision: tag1
+ - repo: r4
+ dest: d4b
+ - repo: r3
+ dest: d3
+ revision: tag1
+ - repo: r2
+ dest: d2
+ - repo: r4
+ dest: d4
+
+ shell:
+ - touch some_file
+
+ artifact out:
+ path: some_file
+
+
+job second:
+ checkout:
+ - dest: main
+ - repo: r2
+ dest: d2
+ - repo: r5
+ dest: d5
+ - repo: r3
+ dest: d3
+
+ shell:
+ - touch second_file
+
+ artifact out:
+ path: second_file
+
+
+job dependent:
+ uses:
+ - first.out
+
+ shell:
+ - mv some_file some_other_file
+
+ artifact out:
+ path: some_other_file
+
+
+job dependent_publish:
+ publish:
+ - to: d1
+ artifact: first.out
+
+
+job transitive:
+ uses:
+ - dependent.out
+
+ artifact out:
+ path: some_other_file
+
+
+job combined:
+ uses:
+ - first.out
+ - second.out
+
+ artifact out:
+ path: second_file
+
+
+job combined_transitive:
+ uses:
+ - combined.out
+ - transitive.out
diff --git a/test/asset/run/norepo-basic.yaml b/test/asset/run/norepo-basic.yaml
new file mode 100644
index 0000000..ecd3a97
--- /dev/null
+++ b/test/asset/run/norepo-basic.yaml
@@ -0,0 +1,20 @@
+job success:
+ checkout: null
+ shell:
+ - "true"
+
+job failure:
+ checkout: null
+ shell:
+ - "false"
+
+job block_recipe:
+ checkout: null
+ shell: |
+ mkdir dir
+ cd dir
+ export VAR='abc'
+ echo $VAR > var
+
+ artifact out:
+ path: dir/var
diff --git a/test/asset/run/repo-basic.yaml b/test/asset/run/repo-basic.yaml
new file mode 100644
index 0000000..82f5650
--- /dev/null
+++ b/test/asset/run/repo-basic.yaml
@@ -0,0 +1,7 @@
+job success:
+ shell:
+ - "true"
+
+job failure:
+ shell:
+ - "false"
diff --git a/test/asset/run/repo-basic2.yaml b/test/asset/run/repo-basic2.yaml
new file mode 100644
index 0000000..bcfac50
--- /dev/null
+++ b/test/asset/run/repo-basic2.yaml
@@ -0,0 +1,15 @@
+job success:
+ shell:
+ - "true"
+
+job third:
+ shell:
+ - "true"
+
+job failure:
+ shell:
+ - "false"
+
+job fourth:
+ shell:
+ - "true"
diff --git a/test/asset/run/rerun.yaml b/test/asset/run/rerun.yaml
new file mode 100644
index 0000000..dc18b41
--- /dev/null
+++ b/test/asset/run/rerun.yaml
@@ -0,0 +1,45 @@
+job first:
+ shell:
+ - touch x
+
+ artifact out:
+ path: x
+
+
+job second:
+ uses:
+ - first.out
+
+ shell:
+ - mv x y
+
+ artifact out:
+ path: y
+
+
+job first_fail:
+ shell:
+ - "false"
+
+ artifact out:
+ path: x
+
+
+job second_skip:
+ uses:
+ - first_fail.out
+
+ shell:
+ - "true"
+
+ artifact out:
+ path: y
+
+
+job third:
+ uses:
+ - second.out
+ - second_skip.out
+
+ shell:
+ - "true"