Hi,
I’m trying to build 2 docker images, on :latest
and one :git_tag
and have configured 2 deployment “paths” for that … the master
build and deploy (push to docker hub) seems to be working ok, however, when it’s meant to do the tag build, it keeps saying …
Skipping a deployment with the script provider because this branch is not permitted: <git tag>
and then the build goes green … …
I’ve tried various different ways, with and without setting branch config, etc. … all resulting in the same message …
here’s the current .travis.yml
…
language: go
go:
- 1.11.x
branches:
only:
- /.*/
# addons:
# apt:
# packages:
# - docker-ce
# sudo: required
services:
- docker
env:
global:
- GO111MODULE=on
jobs:
include:
# --------------------------------------------
- stage: test
skip_cleanup: true
script:
- make test
# --------------------------------------------
- stage: build+push:latest
if:
tag IS NOT present
before_deploy:
- make build TAG=latest
- make run TAG=latest CMD=version
deploy:
provider: script
script: make push TAG=latest
on:
branch: master
# --------------------------------------------
- stage: build+push:tag
if:
tag IS present
before_deploy:
- make build TAG=$TRAVIS_TAG
- make run TAG=$TRAVIS_TAG CMD=version
deploy:
provider: script
script: make push TAG=$TRAVIS_TAG
on:
tags: true
all_branches: true
# --------------------------------------------
I’m new to travis-ci so it might just be a lack of experience … any help would be very welcome, thanks!
Example job (tag): https://travis-ci.com/alex-leonhardt/gocd-seeder/jobs/156234820
Example job (master): https://travis-ci.com/alex-leonhardt/gocd-seeder/jobs/156234815
Alex