We are currently using a remote branch to point at the version to be deployed by our continous-integration system (Jenkins) on the integration test system (using Docker). Whenever we update the remote branch, the CI system checks out and builds the branch and deploys the result on the integration test system.
This works fine, as long as this branch follows another branch (merges and fast-forward commits). When we want to switch the integration-test system between feature branches, it would be easier to reset the branch pointer. However, reseting the remote branch pointer seems to be prohibited in the default configuration (Git reset --hard and a remote repository).
Before we are going to change the default configuration - is there a (best-practice) alternative to using a remote branch for the workflow that we've realized?
Try the following:
This will not automate the process unless you schedule this job to run every "X" interval. Since there is no Repo for jenkins to check, this job will run every time it is scheduled.