Docker Hub + Travis-ci: how to generate an automatic Description?

Asked

Viewed 107 times

1

I have been struggling for 9 hours to achieve a continuous integration between Github > Travis-ci and Docker hub. So far I’ve managed to achieve the following goal: I push to Github, at this point Travis-ci "captures the code" and starts the generation of the build, running well does deploy to the Docker hub...

My difficulty is in automatically generating the Short Description and Full Description at the Docker Hub. When I used the Docker hub’s own auto-build feature, README.Md is pulled from Github to take the position of Full Description, however due to my new approach with Travis-ci I am not using the Docker hub auto-build.

Any idea how to fill these two fields with deploy via Travis-ci?

Below is the skeleton of Travis.yml (I know it’s very 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
  • See help: https://stackoverflow.com/questions/34710513. For the sake of argument, for not continuing on Automated build from the hub, is doing some SCM by Travis, something like?

  • @Brunocésar I am using Travis-ci in the process, because my approach had to take from Automated build, initially my approach is very simple, however, within the scope of Travis-ci I will still add some extra steps. See: https://www.github.com/docker-sources

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.