Skip to content
Snippets Groups Projects
Unverified Commit 157f3ecf authored by Charles JAVERLIAT's avatar Charles JAVERLIAT
Browse files

ci/Add eams deploy

parent 68790413
No related branches found
No related tags found
1 merge request!6Feat/embeddedproto
......@@ -4,6 +4,7 @@ variables:
PYTHON_GIT_URL: ssh://git@gitlab.clubelek.fr:2222/cdf2020/libraries/communication/messages/messages-schemas-python.git
CPP_GIT_URL: ssh://git@gitlab.clubelek.fr:2222/cdf2020/libraries/communication/messages/messages-schemas-cpp.git
NANOPB_GIT_URL: ssh://git@gitlab.clubelek.fr:2222/cdf2020/libraries/communication/messages/messages-schemas-nanopb.git
EAMS_GIT_URL: ssh://git@gitlab.clubelek.fr:2222/cdf2020/libraries/communication/messages/messages-schemas-eams.git
before_script:
- export COMMIT_MSG="ci/Compilation of messages-schemas/$CI_COMMIT_SHA"
......@@ -29,11 +30,11 @@ build:
- eams/
- usr/include/google/protobuf/
expire_in: 30min
# only:
# changes:
# - messages/*
# refs:
# - master
only:
changes:
- messages/*
refs:
- master
deploy_python:
stage: deploy
......@@ -97,3 +98,25 @@ deploy_nanopb:
- messages/*
refs:
- master
deploy_eams:
stage: deploy
dependencies:
- build
script:
- echo "$SSH_PRIVATE_KEY_EAMS" | tr -d '\r' | ssh-add -
- git clone $EAMS_GIT_URL
- rm -rf messages-schemas-eams/*
- mv eams/* messages-schemas-eams/
- mkdir --parents messages-schemas-eams/google/protobuf/
- cp -r /usr/include/google/protobuf messages-schemas-eams/google/
- rm -rf messages-schemas-eams/google/protobuf/*.proto
- cd messages-schemas-eams
- git add .
- git commit -m "$COMMIT_MSG" || echo "Nothing to commit."
- git push -u $EAMS_GIT_URL master
only:
changes:
- messages/*
refs:
- master
TARGETS=cpp python nanopb embeddedproto
TARGETS=cpp python nanopb eams
all: ${TARGETS}
......@@ -18,7 +18,7 @@ nanopb:
mkdir -p nanopb
protoc --nanopb_out=nanopb --proto_path=messages ${messages}
embeddedproto:
eams:
mkdir -p eams
cd embeddedproto
protoc --plugin=protoc-gen-eams --eams_out=../eams --proto_path=../messages ../${messages}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment