From 7a50ee08a492264775a8ec5bb5de4b5bc95e71b0 Mon Sep 17 00:00:00 2001 From: Rick Salevsky Date: Thu, 27 Jun 2019 10:13:02 +0200 Subject: [PATCH] Improve Travis Configuration (SOC-9565) - switch to Xenial (Trusty is EOL soon) - sudo is now allowed by default - add Gitlint check --- .travis.yml | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6282ef46b..99b29db28 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ -sudo: required language: bash +dist: xenial services: - docker @@ -9,22 +9,30 @@ env: # If you want to see a list of installed packages in the doc-ci docker container, set to TRUE - LIST_PACKAGES=0 -before_install: - - echo "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST" >> env.list - - echo "TRAVIS_BRANCH=$TRAVIS_BRANCH" >> env.list - - echo "SOURCE_BRANCH=$SOURCE_BRANCH" >> env.list - - echo "TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG" >> env.list - - echo "LIST_PACKAGES=$LIST_PACKAGES" >> env.list - - echo "PUBLISH_PRODUCTS=\"$PUBLISH_PRODUCTS\"" >> env.list - - echo "ENCRYPTED_PRIVKEY_SECRET=$ENCRYPTED_PRIVKEY_SECRET" >> env.list - - echo "TRAVIS_COMMIT=$TRAVIS_COMMIT" >> env.list - - wget https://raw.githubusercontent.com/openSUSE/doc-ci/develop/travis/travis.sh - - ls - - echo "Building docker image" - - docker build -t sle-doc-image . - -script: - - docker run --rm -it sle-doc-image /bin/bash -c '/bin/bash travis.sh' +matrix: + include: + - name: "Validate Commit Message" + language: python + script: + - pip install gitlint + - wget https://raw.githubusercontent.com/SUSE-Cloud/automation/master/scripts/jenkins/gitlint.ini + - gitlint --commits master..HEAD -C gitlint.ini + - name: "Validate Documentation" + before_install: + - echo "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST" >> env.list + - echo "TRAVIS_BRANCH=$TRAVIS_BRANCH" >> env.list + - echo "SOURCE_BRANCH=$SOURCE_BRANCH" >> env.list + - echo "TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG" >> env.list + - echo "LIST_PACKAGES=$LIST_PACKAGES" >> env.list + - echo "PUBLISH_PRODUCTS=\"$PUBLISH_PRODUCTS\"" >> env.list + - echo "ENCRYPTED_PRIVKEY_SECRET=$ENCRYPTED_PRIVKEY_SECRET" >> env.list + - echo "TRAVIS_COMMIT=$TRAVIS_COMMIT" >> env.list + - wget https://raw.githubusercontent.com/openSUSE/doc-ci/develop/travis/travis.sh + - ls + - echo "Building docker image" + - docker build -t sle-doc-image . + script: + - docker run --rm -it sle-doc-image /bin/bash -c '/bin/bash travis.sh' notifications: email: