From e2cd62b56052a797c9e966226a90923f6b41f3af Mon Sep 17 00:00:00 2001 From: jellytw Date: Mon, 27 Aug 2018 11:55:31 +0530 Subject: [PATCH 1/7] added concourse for build --- ci/demo_pipeline.yml | 13 +++++++++++++ ci/scripts/run_setup.sh | 7 +++++++ ci/tasks/run_setup.yml | 12 ++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 ci/demo_pipeline.yml create mode 100755 ci/scripts/run_setup.sh create mode 100644 ci/tasks/run_setup.yml diff --git a/ci/demo_pipeline.yml b/ci/demo_pipeline.yml new file mode 100644 index 0000000..1c565d2 --- /dev/null +++ b/ci/demo_pipeline.yml @@ -0,0 +1,13 @@ +resources: + - name: python-helloworld + type: git + source: &repo-source + uri: https://github.com/jellytw/python-helloworld.git + branch: master +jobs: + - name: Run Setup + plan: + - get: python-helloworld + trigger: true + - task: setup the program + file: python-helloworld/ci/tasks/run_setup.yml diff --git a/ci/scripts/run_setup.sh b/ci/scripts/run_setup.sh new file mode 100755 index 0000000..29658d9 --- /dev/null +++ b/ci/scripts/run_setup.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -e -u -x + +cd beginner +python --version +python setup.py install diff --git a/ci/tasks/run_setup.yml b/ci/tasks/run_setup.yml new file mode 100644 index 0000000..c97480e --- /dev/null +++ b/ci/tasks/run_setup.yml @@ -0,0 +1,12 @@ +--- +platform: linux + +image_resource: + type: docker-image + source: + repository: jfloff/alpine-python + tag: 2.7-slim +inputs: + - name: beginner +run: + path: python-helloworld/ci/scripts/run_setup.sh From 5cf32ca3f1125e662730210b814b0cfecb40298c Mon Sep 17 00:00:00 2001 From: jellytw Date: Mon, 27 Aug 2018 12:10:48 +0530 Subject: [PATCH 2/7] bugfix --- ci/tasks/run_setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/tasks/run_setup.yml b/ci/tasks/run_setup.yml index c97480e..5fc8780 100644 --- a/ci/tasks/run_setup.yml +++ b/ci/tasks/run_setup.yml @@ -7,6 +7,6 @@ image_resource: repository: jfloff/alpine-python tag: 2.7-slim inputs: - - name: beginner + - name: python-helloworld run: path: python-helloworld/ci/scripts/run_setup.sh From 315eef8fceb1d4cd850936b9bd3b798a5bebbf57 Mon Sep 17 00:00:00 2001 From: jellytw Date: Mon, 27 Aug 2018 12:13:22 +0530 Subject: [PATCH 3/7] bugfix --- ci/scripts/run_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/run_setup.sh b/ci/scripts/run_setup.sh index 29658d9..10c5078 100755 --- a/ci/scripts/run_setup.sh +++ b/ci/scripts/run_setup.sh @@ -2,6 +2,6 @@ set -e -u -x -cd beginner +cd python-helloworld python --version python setup.py install From 359fb555dba064a2255eb2f693a6082ed0b9d6e9 Mon Sep 17 00:00:00 2001 From: jellytw Date: Mon, 27 Aug 2018 14:31:14 +0530 Subject: [PATCH 4/7] enhancement: more code to be run --- ci/scripts/run_setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/scripts/run_setup.sh b/ci/scripts/run_setup.sh index 10c5078..97feb46 100755 --- a/ci/scripts/run_setup.sh +++ b/ci/scripts/run_setup.sh @@ -5,3 +5,5 @@ set -e -u -x cd python-helloworld python --version python setup.py install +helloworld_in_python +which helloworld_in_python From 752f1ca7b1f106eb2ad3e660eb7313cd437e515d Mon Sep 17 00:00:00 2001 From: jellytw Date: Mon, 27 Aug 2018 16:13:49 +0530 Subject: [PATCH 5/7] Make changes to see output work --- ci/demo_pipeline.yml | 2 ++ ci/scripts/run_setup.sh | 2 +- ci/tasks/run_setup.yml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/demo_pipeline.yml b/ci/demo_pipeline.yml index 1c565d2..833688b 100644 --- a/ci/demo_pipeline.yml +++ b/ci/demo_pipeline.yml @@ -11,3 +11,5 @@ jobs: trigger: true - task: setup the program file: python-helloworld/ci/tasks/run_setup.yml + - task: run the program + file: /tmp/my_file_exec diff --git a/ci/scripts/run_setup.sh b/ci/scripts/run_setup.sh index 97feb46..0c2312d 100755 --- a/ci/scripts/run_setup.sh +++ b/ci/scripts/run_setup.sh @@ -6,4 +6,4 @@ cd python-helloworld python --version python setup.py install helloworld_in_python -which helloworld_in_python +cp `which helloworld_in_python` /tmp/my_file_exec diff --git a/ci/tasks/run_setup.yml b/ci/tasks/run_setup.yml index 5fc8780..f174bd4 100644 --- a/ci/tasks/run_setup.yml +++ b/ci/tasks/run_setup.yml @@ -8,5 +8,7 @@ image_resource: tag: 2.7-slim inputs: - name: python-helloworld +outputs: + - name: /tmp/my_file_execs run: path: python-helloworld/ci/scripts/run_setup.sh From b93610e9c1669ac69b52a6aec40724d7abd43f9e Mon Sep 17 00:00:00 2001 From: jellytw Date: Mon, 27 Aug 2018 17:14:41 +0530 Subject: [PATCH 6/7] trying the output intput --- ci/demo_pipeline.yml | 2 +- ci/scripts/run_setup.sh | 2 +- ci/tasks/run_exec.yml | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 ci/tasks/run_exec.yml diff --git a/ci/demo_pipeline.yml b/ci/demo_pipeline.yml index 833688b..5e9ee36 100644 --- a/ci/demo_pipeline.yml +++ b/ci/demo_pipeline.yml @@ -12,4 +12,4 @@ jobs: - task: setup the program file: python-helloworld/ci/tasks/run_setup.yml - task: run the program - file: /tmp/my_file_exec + file: python-helloworld/ci/tasks/run_exec.yml diff --git a/ci/scripts/run_setup.sh b/ci/scripts/run_setup.sh index 0c2312d..6c706e8 100755 --- a/ci/scripts/run_setup.sh +++ b/ci/scripts/run_setup.sh @@ -6,4 +6,4 @@ cd python-helloworld python --version python setup.py install helloworld_in_python -cp `which helloworld_in_python` /tmp/my_file_exec +cp `which helloworld_in_python` /tmp/my_file_execs diff --git a/ci/tasks/run_exec.yml b/ci/tasks/run_exec.yml new file mode 100644 index 0000000..8d40f78 --- /dev/null +++ b/ci/tasks/run_exec.yml @@ -0,0 +1,6 @@ +--- +platform: linux +inputs: + - name: /tmp/my_file_execs +run: + path: /tmp/my_file_execs From 08aca7668755ca587cc2caebc5e10a865f696f67 Mon Sep 17 00:00:00 2001 From: jellytw Date: Mon, 27 Aug 2018 20:04:50 +0530 Subject: [PATCH 7/7] changed the output logic --- ci/tasks/run_exec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/tasks/run_exec.yml b/ci/tasks/run_exec.yml index 8d40f78..194fc5a 100644 --- a/ci/tasks/run_exec.yml +++ b/ci/tasks/run_exec.yml @@ -3,4 +3,4 @@ platform: linux inputs: - name: /tmp/my_file_execs run: - path: /tmp/my_file_execs + path: my_file_execs