diff --git a/.travis.yml b/.travis.yml index d80ecf1..4364c75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,25 +3,22 @@ language: python cache: pip services: - docker +env: + - ANSIBLE=2.2.3 + - ANSIBLE=2.3.2 + - ANSIBLE=2.4.1 install: - - pip install ansible==2.3.2 molecule==1.25.0 docker git-semver testinfra>=1.7.0 + - pip install ansible==${ANSIBLE} ansible-lint>=3.4.15 molecule==1.25.0 docker git-semver testinfra>=1.7.0 script: - molecule test deploy: provider: script skip_cleanup: true - script: - - ./.travis/generatetag.sh + script: ./.travis/generatetag.sh on: branch: master -#do not start when tag is added branches: only: - master -tags: - except: - - /^\d+\.\d+\.\d+$/ notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ -#after_script: -# - ./.travis/notification.sh + webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/.travis/generatetag.sh b/.travis/generatetag.sh index fa4be59..4867780 100755 --- a/.travis/generatetag.sh +++ b/.travis/generatetag.sh @@ -1,11 +1,11 @@ #!/bin/bash -#git config --global user.email "" -#git config --global user.name "" -#GIT_TAG=$([[ "$TRAVIS_COMMIT_MESSAGE" =~ ("Merge pull request".*/feature.*) ]] && git semver --next-minor || git semver --next-patch ) -#echo $GIT_TAG -#git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER" -#GIT_URL=$(git config --get remote.origin.url) -#GIT_URL=${GIT_URL#*//} -# -#git push https://${GH_TOKEN}:@${GIT_URL} --tags +git config --global user.email "paulfantom@gmail.com" +git config --global user.name "paulfantom" +GIT_TAG=$([[ "$TRAVIS_COMMIT_MESSAGE" =~ ("Merge pull request".*/feature.*) ]] && git semver --next-minor || git semver --next-patch ) +echo $GIT_TAG +git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER" +GIT_URL=$(git config --get remote.origin.url) +GIT_URL=${GIT_URL#*//} + +git push https://${GH_TOKEN}:@${GIT_URL} --tags || exit 0 diff --git a/meta/main.yml b/meta/main.yml index 80fea1a..f8f3d63 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -2,9 +2,8 @@ galaxy_info: author: Pawel Krupa description: Grafana - platform for analytics and monitoring - company: Sointeractive license: MIT - min_ansible_version: 1.9 + min_ansible_version: 2.2 platforms: - name: Ubuntu versions: diff --git a/tasks/dashboards.yml b/tasks/dashboards.yml index 98d36d7..fcd65a3 100644 --- a/tasks/dashboards.yml +++ b/tasks/dashboards.yml @@ -18,7 +18,7 @@ - name: Replace datasource variable names become: no replace: - path: "/tmp/dashboards/{{ item.dashboard_id }}.json" + dest: "/tmp/dashboards/{{ item.dashboard_id }}.json" regexp: "[$].DS_.*}" replace: "{{ item.datasource }}" delegate_to: localhost