YOTTAb cli
$ make clean
$ make -B buildCommon platform binaries are published on the releases page. this includes linux, osx, windows and even arm binary for arm linux platforms such as raspbian.
The easiest way to install the latest release on Mac or Linux is with the following script:
curl -L http://install.yottab.io | bash
$ wget https://github.com/yottab/cli/releases/download/v${LATEST_VERSION}/yb-${LATEST_VERSION}-darwin-amd64 -O /usr/local/bin/yb$ sudo wget https://github.com/yottab/cli/releases/download/v${LATEST_VERSION}/yb-v${LATEST_VERSION}-linux-amd64 -O /usr/local/bin/yb
$ sudo chmod +x /usr/local/bin/ybJust grap the latest executive file in release page and run it from cmd.
See Releases.
YOTTAb cli can be updated in place using the following command:
$ yb cli update
See Documentations for more details.
Test, build & deploy can be automated using gitlab ci.
An example of .gitlab-ci.yaml configuration file is as follow:
# This file is a template, and might need editing before it works on your project.# Official docker image.image: docker:latestservices:
- docker:dindstages:
- test
- build
- deployvariables:
LINK: controller.yottab.io:443#Configure this variable in Secure Variables:YOTTAb_USER: <username># YOTTAb_PASSWORD: ----> It's more secure to be setted from settings -> ci/cd -> variables. APP: recIMAGE: "hub.yottab.io/$YOTTAb_USER/$APP:$CI_COMMIT_REF_NAME"# Test stagestest1:
stage: testbefore_script: []script:
- echo run teststest2:
stage: testbefore_script: []script:
- echo run tests# Build stagesbefore_script:
- docker login -u "$YOTTAB_USER" -p "$YOTTAB_PASSWORD" hub.yottab.iobuild-master:
stage: buildscript:
- docker build --pull -t "$IMAGE" .
- docker push "$IMAGE"only:
- master # use `tags` for build when ever a new tag pushed to the repositorydeploy: image: hub.yottab.io/yottab-library/cli:${LATEST_VERSION} # use an existing git tag for the LATEST_VERSION variable.stage: deploybefore_script:
- yb login -u $YOTTAB_USER --P $YOTTAB_PASSWORD
- yb application $APPscript:
- "yb update application $APP -i $IMAGE"
- "yb application $APP"