-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ci.yml
98 lines (81 loc) · 5.61 KB
/
.ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: 2
defaults:
platform: "docker"
plugins:
mail:
enabled: true
recipients:
versioning:
enabled: true
get_version: "mvn -f bindings/java/java-xconfig/pom.xml -q com.tuenti.maven.plugins:tuentiversions-maven-plugin:show-current"
set_current_release_version: "mvn -f bindings/java/java-xconfig/pom.xml com.tuenti.maven.plugins:tuentiversions-maven-plugin:set-release"
set_next_development_version: "mvn -f bindings/java/java-xconfig/pom.xml com.tuenti.maven.plugins:tuentiversions-maven-plugin:set-next-devel"
parameters:
java_binding_path: "/source/bindings/java/java-xconfig"
workflows:
verify_java:
stages: [docker_up, install_extra_packages, verify_java, docker_down]
release_java:
stages: [docker_up, install_extra_packages, deploy_java, docker_down]
deploy_java:
stages: [docker_up, install_extra_packages, deploy_java, docker_down]
deploy_java_utils:
stages: [docker_up, deploy_java_utils, docker_down]
# Meant to be executed with cigen
build_buster_debug:
stages: [docker_down, install_deps_buster, clean_buster, build_buster_debug]
build_buster:
stages: [docker_down, install_deps_buster, clean_buster, build_buster, docker_down]
build_bullseye_debug:
stages: [docker_down, install_deps_bullseye, clean_bullseye, build_bullseye_debug]
build_bullseye:
stages: [docker_down, install_deps_bullseye, clean_bullseye, build_bullseye]
release_python_buster:
stages: [docker_down, install_deps_buster, clean_buster, build_buster, release_python]
release_python_bullseye:
stages: [docker_down, install_deps_bullseye, clean_bullseye, build_bullseye, release_python]
clean:
stages: [install_deps_buster, clean_buster]
stages:
docker_up: ["docker-compose pull", "docker-compose up -d"]
docker_down: ["docker-compose down --remove-orphans"]
verify_java: ["docker-compose exec -T java-builder mvn -B verify -f ${java_binding_path}"]
deploy_java: ["docker-compose exec -T java-builder mvn -B deploy -f ${java_binding_path}"]
deploy_java_utils: ["docker-compose exec -T java-builder mvn -B deploy -f bindings/java/java-xconfig-utils/"]
install_deps_buster:
- 'docker-compose up -d buster-builder'
- 'docker-compose exec -T buster-builder bash -c "cd /source && ./get_deps"'
install_deps_bullseye:
- 'docker-compose up -d bullseye-builder'
- 'docker-compose exec -T bullseye-builder bash -c "cd /source && ./get_deps"'
install_extra_packages:
- 'docker-compose exec -T java-builder apt-get update'
- 'docker-compose exec -T java-builder apt-get install -y gcc g++ xconfigd libxconfig-dev'
- 'docker-compose exec -T java-builder /etc/init.d/xconfigd start'
build_buster:
- 'docker-compose up -d buster-builder'
- 'docker-compose exec -T buster-builder /source/add_php74_repo'
- 'docker-compose exec -T buster-builder bash -c "cd /source && ./build_packages && mkdir -p packages && cd .. && mv *.deb *.dsc *.tar.xz *.build *.buildinfo *.changes /source/packages"'
- 'docker-compose exec -T buster-builder bash -c "cd /source/bindings/python; ./build.sh && mv /source/bindings/python/dist/*whl /source/packages"'
build_buster_debug:
- 'docker-compose up -d buster-builder'
- 'docker-compose exec -T buster-builder /source/add_php74_repo'
- 'docker-compose exec -T buster-builder bash -c "cd /source && ./build_packages_debug && mkdir -p packages_debug && cd .. && mv *.deb *.dsc *.tar.xz *.build *.buildinfo *.changes /source/packages_debug"'
- 'docker-compose exec -T buster-builder bash -c "cd /source/bindings/python; ./build.sh && mv /source/bindings/python/dist/*whl /source/packages"'
build_bullseye:
- 'docker-compose up -d bullseye-builder'
- 'docker-compose exec -T bullseye-builder /source/add_php74_repo'
- 'docker-compose exec -T bullseye-builder bash -c "cd /source && ./build_packages && mkdir -p packages && cd .. && mv *.deb *.dsc *.tar.xz *.build *.buildinfo *.changes /source/packages"'
- 'docker-compose exec -T bullseye-builder bash -c "cd /source/bindings/python; ./build.sh && mv /source/bindings/python/dist/*whl /source/packages"'
build_bullseye_debug:
- 'docker-compose up -d bullseye-builder'
- 'docker-compose exec -T bullseye-builder /source/add_php74_repo'
- 'docker-compose exec -T bullseye-builder bash -c "cd /source && ./build_packages_debug && mkdir -p packages_debug && cd .. && mv *.deb *.dsc *.tar.xz *.build *.buildinfo *.changes /source/packages_debug"'
- 'docker-compose exec -T bullseye-builder bash -c "cd /source/bindings/python; ./build.sh && mv /source/bindings/python/dist/*whl /source/packages"'
release_python:
- 'docker-compose exec -T buster-builder bash -c "python3 -m twine upload --repository nexus /source/packages/*.whl"'
clean_buster:
- 'docker-compose exec -T buster-builder bash -c "cd /source; debuild -- clean; find /source/src \\( -name "Makefile" -o -name "*.o" -o -name "moc_*" \\) -delete; rm -rf conf/Makefile packages target Makefile config.h debian/changelog bindings/python/dist/ bindings/python/xconfig.egg-info debian/php7.4-xconfig src/php-xconfig/{build,configure,configure.ac,config.m4,config.h.in,autom4te.cache,run-tests.php,xconfig.cpp}"'
clean_bullseye:
- 'docker-compose exec -T bullseye-builder bash -c "cd /source; debuild -- clean; find /source/src \\( -name "Makefile" -o -name "*.o" -o -name "moc_*" \\) -delete; rm -rf conf/Makefile packages target Makefile config.h debian/changelog bindings/python/dist/ bindings/python/xconfig.egg-info debian/php7.4-xconfig src/php-xconfig/{build,configure,configure.ac,config.m4,config.h.in,autom4te.cache,run-tests.php,xconfig.cpp}"'