diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a8c89fb7..e0caa01b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,11 +57,19 @@ build_sshpiper: exit 1 fi - echo "yaml plugin built successfully." + # Build api plugin (for multi-pool routing via API lookup) + - $GOROOT/bin/go build -tags full -o api ./plugin/api + - | + if [ $? -ne 0 ]; then + echo "Failed to build api plugin. Aborting." + exit 1 + fi + - echo "api plugin built successfully." - ./sshpiperd --help 2>&1 | head -20 || true # Push both binaries to salt master via minionfs for distribution to minions - echo "Pushing sshpiper binaries to salt master via minionfs..." - mkdir -p $HOME/sshpiper-dist - - tar -czvf $HOME/sshpiper-dist/sshpiper.tar.gz -C $CI_PROJECT_DIR sshpiperd yaml + - tar -czvf $HOME/sshpiper-dist/sshpiper.tar.gz -C $CI_PROJECT_DIR sshpiperd yaml api - echo "$(git rev-parse --short HEAD)" > $HOME/sshpiper-dist/commit-hash.txt - ls -la $HOME/sshpiper-dist/ - sudo /opt/salt-call-put-artifacts-onto-salt-master.sh $HOME/sshpiper-dist @@ -70,4 +78,5 @@ build_sshpiper: paths: - sshpiperd - yaml + - api expire_in: 1 week