diff --git a/ci/demo_pipeline.yml b/ci/demo_pipeline.yml new file mode 100644 index 0000000..5e9ee36 --- /dev/null +++ b/ci/demo_pipeline.yml @@ -0,0 +1,15 @@ +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 + - task: run the program + file: python-helloworld/ci/tasks/run_exec.yml diff --git a/ci/scripts/run_setup.sh b/ci/scripts/run_setup.sh new file mode 100755 index 0000000..6c706e8 --- /dev/null +++ b/ci/scripts/run_setup.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -e -u -x + +cd python-helloworld +python --version +python setup.py install +helloworld_in_python +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..194fc5a --- /dev/null +++ b/ci/tasks/run_exec.yml @@ -0,0 +1,6 @@ +--- +platform: linux +inputs: + - name: /tmp/my_file_execs +run: + path: my_file_execs diff --git a/ci/tasks/run_setup.yml b/ci/tasks/run_setup.yml new file mode 100644 index 0000000..f174bd4 --- /dev/null +++ b/ci/tasks/run_setup.yml @@ -0,0 +1,14 @@ +--- +platform: linux + +image_resource: + type: docker-image + source: + repository: jfloff/alpine-python + tag: 2.7-slim +inputs: + - name: python-helloworld +outputs: + - name: /tmp/my_file_execs +run: + path: python-helloworld/ci/scripts/run_setup.sh