We want to migrate our CI/CD server which is currently in Jenkins to TravisCI. But are facing few challenges.
Our current deployment process is that we are using master branch to deploy into different environments i.e dev, uat and prod. Once a PR is merged into master, then a build and deploy-dev jobs run automatically. When the team is happy with dev env, they go to Jenkins and trigger uat-deploy or prod-deploy manually which deploys it into further envs from the same master branch. There is Jenkinsfile.dev, Jenkinsfile.uat and Jenkinsfile.prod for its own environment where we set env specific variables and deploy accordingly.
Is the above flow not possible in TravisCI.
I have read the documentation of TravisCI and many other examples, where people have to put conditional statements in a single travis.yml file to deploy to different env. In every example, people are creating different branches for each environment and deploying with the conditional statements, for eg
deploy: - provider: script script: deploy_production.sh on: branch: production - provider: script script: deploy_staging.sh on: branch: staging
We dont want to create seperate branch for each env. Can’t we deploy to different env from the same master branch? If not why this approach is taken by Travis CI.