I've been battling for 9 hours now to be able to seamlessly integrate Github > Travis-ci and Docker hub . So I've already managed to achieve the following goal: I apply a push to Github, at this point Travis-ci "captures the code" and starts the build, running okay deploy in the Docker hub ...
My difficulty is to automatically generate the Short Description and Full Description in the Docker Hub. When I used the automatic compile feature of the Docker hub itself, README.md is pulled from Github to assume Full Description position, however due to my new approach to Travis-ci I am not using Docker's automatic compilation hub
Any idea how to fill these two fields with deploy via Travis-ci?
Below is the skeleton of travis.yml (I know it's pretty basic, but my initial goal is to win the above steps).
.travis.ym
language: bash
services: docker
env:
- VERSION=7.2 VARIANT=stretch/apache
before_script:
- env | sort
- cd "$VERSION/$VARIANT"
- SUBVARIANT="${VARIANT#*/}"
- BASE_NAME_REPOSITORY=fabiojanio/php
- IMAGE_NAME="${BASE_NAME_REPOSITORY}-${SUBVARIANT}"
- IMAGE_FULL_VERSION="${BASE_NAME_REPOSITORY}-${SUBVARIANT}:${VERSION}-${VARIANT%/*}"
- IMAGE_LATEST_VERSION="${BASE_NAME_REPOSITORY}-${SUBVARIANT}:latest"
script:
- docker build -t "${IMAGE_LATEST_VERSION}" .
after_script:
- docker images
before_deploy:
- echo "${DOCKER_HUB_PASSWORD}" | docker login --username "${DOCKER_HUB_USER}" --password-stdin
deploy:
provider: script
script: docker push "${IMAGE_LATEST_VERSION}"
on:
branch: master