61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
steps:
|
|
{{ $prepare_commands := .input.prepare_commands }}
|
|
{{ $before_commands := .input.before_commands }}
|
|
{{ $build_commands:= .input.build_commands }}
|
|
{{ $after_commands := .input.after_commands }}
|
|
{{ $default_build_types := .input.default_build_types }}
|
|
|
|
{{ range .input.builds }}
|
|
{{ $cmake_configure_args := .cmake_configure_args }}
|
|
{{ $image_name := .image_name }}
|
|
{{ if .cmake_configure_args }}
|
|
{{ $cmake_configure_args := .cmake_configure_args }}
|
|
{{ end }}
|
|
|
|
{{ $image_name := .image_name }}
|
|
- name: build {{ .image_name }}
|
|
image: dockcross/{{ .image_name }}
|
|
commands:
|
|
{{ range $prepare_commands }}
|
|
- {{ . }}
|
|
{{ end }}
|
|
|
|
{{ $build_types := $default_build_types }}
|
|
{{ if .build_types }}
|
|
{{ $build_types := .build_types }}
|
|
{{ end }}
|
|
|
|
{{ range $build_types }}
|
|
- export BUILD_TYPE={{.}}
|
|
- export BUILD_DIR=build-{{$image_name}}-{{.}}
|
|
- echo $BUILD_TYPE
|
|
- echo $CURRENT_BUILD_DIR
|
|
|
|
{{ range $before_commands }}
|
|
- {{ . }}
|
|
{{ end }}
|
|
|
|
{{ range $build_commands }}
|
|
- {{ . }}
|
|
{{ end }}
|
|
|
|
{{ range $after_commands }}
|
|
- {{ . }}
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
{{ end }}
|
|
|
|
- name: list all build dir
|
|
image: alpine
|
|
commands:
|
|
- ls -l build-*
|
|
depends_on:
|
|
{{ range .input.builds }}
|
|
- build {{ .image_name }}
|
|
{{ end }} |