diff --git a/.gitmodules b/.gitmodules index 4932b60..981c98e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "bosh-cpi-haskell"] path = src/bosh-kubernetes-cpi/dependencies/bosh-cpi-haskell - url = git@github.com:SAP/bosh-cpi-haskell.git + url = https://github.com/SAP/bosh-cpi-haskell.git [submodule "haskell-kubernetes"] path = src/bosh-kubernetes-cpi/dependencies/haskell-kubernetes - url = git@github.com:loewenstein/haskell-kubernetes.git + url = https://github.com/loewenstein/haskell-kubernetes.git diff --git a/ci/pipeline.yml b/ci/pipeline.yml new file mode 100644 index 0000000..2aaab60 --- /dev/null +++ b/ci/pipeline.yml @@ -0,0 +1,31 @@ +--- +groups: +- name: bosh-kubernetes-cpi-release + jobs: + - build + # - release + +jobs: +- name: build + serial: true + plan: + - aggregate: + - {trigger: true, get: cpi-src} + + - task: compile + file: cpi-src/ci/tasks/compile.yml + + - task: test-unit + file: cpi-src/ci/tasks/test-unit.yml + +resources: + - name: cpi-src + type: git + source: + uri: https://github.com/sap/bosh-kubernetes-cpi-release.git + branch: master + ignore_paths: + - releases/bosh-kubernetes-cpi/** + - .final_builds/** + - docs/** + - README.md diff --git a/ci/tasks/compile.sh b/ci/tasks/compile.sh new file mode 100755 index 0000000..75a1a22 --- /dev/null +++ b/ci/tasks/compile.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +STACK_WORK_OUTPUT=$PWD/stack-work +export STACK_ROOT=/root/.stack + +pushd cpi-src/src/bosh-kubernetes-cpi + stack build + cp -R .stack-work $STACK_WORK_OUTPUT/ +popd diff --git a/ci/tasks/compile.yml b/ci/tasks/compile.yml new file mode 100644 index 0000000..1dfdac4 --- /dev/null +++ b/ci/tasks/compile.yml @@ -0,0 +1,16 @@ +--- +platform: linux + +image_resource: + type: docker-image + source: + repository: loewenstein/main-stack + +inputs: + - name: cpi-src + +outputs: + - name: stack-work + +run: + path: cpi-src/ci/tasks/compile.sh diff --git a/ci/tasks/test-unit.sh b/ci/tasks/test-unit.sh new file mode 100755 index 0000000..b82ea50 --- /dev/null +++ b/ci/tasks/test-unit.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +STACK_WORK_INPUT=$PWD/stack-work +export STACK_ROOT=/root/.stack + +pushd cpi-src/src/bosh-kubernetes-cpi + cp -R $STACK_WORK_INPUT/.stack-work . + stack test +popd diff --git a/ci/tasks/test-unit.yml b/ci/tasks/test-unit.yml new file mode 100644 index 0000000..41cdbd9 --- /dev/null +++ b/ci/tasks/test-unit.yml @@ -0,0 +1,14 @@ +--- +platform: linux + +image_resource: + type: docker-image + source: + repository: loewenstein/main-stack + +inputs: + - name: cpi-src + - name: stack-work + +run: + path: cpi-src/ci/tasks/test-unit.sh