To do so, start by pushing your git repository to a temporary branch. This will not trigger a deploy, but we'll use it in just a moment:
BRANCH="deploy-$(date "+%s")" git push aptible "master:$BRANCH"
Then, deploy this branch (using the
--git-commitish argument), and disable Direct Docker Image Deploy (using an empty string for the
--docker-image argument will achieve that):
aptible deploy --app "$APP_HANDLE" \ --git-commitish "$BRANCH" \ --docker-image ""
Going forward, you can simply use
git push aptible master to deploy.
If the App has Private Registry Credentials, Aptible will attempt to log in using these credentials. This should not be necessary unless the App uses a private base image in its Dockerfile. To prevent registry authentication, unset the credentials when deploying:
aptible deploy --app "$APP_HANDLE" \ --git-commitish "$BRANCH" \ --docker-image "" \ --private-registry-username "" \ --private-registry-password ""
Updated 11 months ago