Update gitlab ci to include protoc gen, swift build.

It also should now only run each module when the correct directory changes.
This commit is contained in:
Piv
2020-09-13 21:41:30 +09:30
parent 2944e1b5eb
commit 2ae5c425ad

View File

@@ -1,16 +1,65 @@
stages: stages:
- protoc
- build - build
- deploy - deploy
protoc_base:
image: vato.ddns.net:8083/gradle
stage: protoc
rules:
- changes:
- protobuf/*
script:
- ./gradlew :protobuf:generateProto
protoc_python:
extends: protoc_base
rules:
- changes:
- pycar/*
- protobuf/*
script:
- ./gradlew :pycar:copyPythonCode
protoc_swift_Car:
extends: protoc_base
rules:
- changes:
- SwiftyCar/*
- protobuf/*
script:
- ./gradlew :SwiftyCar:copySwiftCode
protoc_swift_CarController:
extends: protoc_base
rules:
- changes:
- CarControlleriOS/*
- protobuf/*
script:
- ./gradlew :CarControlleriOS:copySwiftCode
build_pycar: build_pycar:
image: vato.ddns.net:8083/python-infra:buster image: vato.ddns.net:8083/python-infra:buster
stage: build stage: build
rules:
- changes:
- pycar/*
- protobuf/*
needs:
- protoc_python
script: script:
- cd pycar && python setup.py bdist_wheel && cd .. - cd pycar && python setup.py bdist_wheel && cd ..
build_pycar_docker: build_pycar_docker:
image: vato.ddns.net:8083/docker image: vato.ddns.net:8083/docker
stage: build stage: build
rules:
- changes:
- pycar/*
- protobuf/*
needs:
- protoc_python
script: script:
- echo ${DOCKER_PASSWORD} | docker login vato.ddns.net:8083 --username ${DOCKER_USERNAME} --password-stdin - echo ${DOCKER_PASSWORD} | docker login vato.ddns.net:8083 --username ${DOCKER_USERNAME} --password-stdin
- docker build -f pycar/Dockerfile --build-arg PYPI_USERNAME=${PYPI_USERNAME} --build-arg PYPI_PASSWORD=${PYPI_PASSWORD} -t vato.ddns.net:8082/pycar:latest pycar - docker build -f pycar/Dockerfile --build-arg PYPI_USERNAME=${PYPI_USERNAME} --build-arg PYPI_PASSWORD=${PYPI_PASSWORD} -t vato.ddns.net:8082/pycar:latest pycar
@@ -18,6 +67,9 @@ build_pycar_docker:
build_esp32: build_esp32:
image: vato.ddns.net:8083/shaguarger/platformio image: vato.ddns.net:8083/shaguarger/platformio
stage: build stage: build
rules:
- changes:
- esp32/*
script: script:
- platformio ci --project-conf esp32/platformio.ini esp32 - platformio ci --project-conf esp32/platformio.ini esp32