acli app:task-wait "$(acli api:environments:update $TARGET_ENV_ID --lang_version=8.1)"
Attempts to use Pipelines to copy databases to a specific environment will succeed even if that branch is deployed to a non-Cloud Platform CD environment, which may have unintended consequences.
Workaround: To prevent this behavior, wrap the pipelines-sync-dbs command in conditional logic, like the following example:
if [ ${PIPELINE_DEPLOY_VCS_PATH} != "pipelines-build-<branch>" ]; then echo "Syncing DB to destination." && pipelines-sync-dbs <databases>; else echo "On the master branch. Skipping DB Sync."; fiWhen Cloud Platform creates a new Cloud Platform CD environment and deploys code to it, the post-code-deploy cloud hook is not run.
Workaround: To import configuration on a new Cloud Platform CD environment, perform a second deployment to the new environment.
Pipelines runs jobs whenever you create new branches or open pull requests on the connected repository. Most subscribers with GitHub or Bitbucket as the connected repository use a workflow where pull requests are opened from feature branches on forked repositories. It implies that Pipelines jobs do not run against feature branches. However, if you instead create branches on the connected repository and then open pull requests from those feature branches, you will get a Pipelines job for both the feature branch and the pull request. Since each Pipelines job calls pipelines-deploy, you will get a CDE for each job (two CDEs total).
Workaround:
In acquia-pipelines.yaml, replace pipelines-deploy with code similar to the following to selectively run pipelines-deploy only on specific types of builds:
if [[ ${PIPELINE_DEPLOY_VCS_PATH} == pipelines-build-pr* ]]; then echo "Creating CD environment for PR." && pipelines-deploy; else echo "Not a PR. Skipping CD environment creation."; fiIf this content did not answer your questions, try searching or contacting our support team for further assistance.
acli app:task-wait "$(acli api:environments:update $TARGET_ENV_ID --lang_version=8.1)"
Attempts to use Pipelines to copy databases to a specific environment will succeed even if that branch is deployed to a non-Cloud Platform CD environment, which may have unintended consequences.
Workaround: To prevent this behavior, wrap the pipelines-sync-dbs command in conditional logic, like the following example:
if [ ${PIPELINE_DEPLOY_VCS_PATH} != "pipelines-build-<branch>" ]; then echo "Syncing DB to destination." && pipelines-sync-dbs <databases>; else echo "On the master branch. Skipping DB Sync."; fiWhen Cloud Platform creates a new Cloud Platform CD environment and deploys code to it, the post-code-deploy cloud hook is not run.
Workaround: To import configuration on a new Cloud Platform CD environment, perform a second deployment to the new environment.
Pipelines runs jobs whenever you create new branches or open pull requests on the connected repository. Most subscribers with GitHub or Bitbucket as the connected repository use a workflow where pull requests are opened from feature branches on forked repositories. It implies that Pipelines jobs do not run against feature branches. However, if you instead create branches on the connected repository and then open pull requests from those feature branches, you will get a Pipelines job for both the feature branch and the pull request. Since each Pipelines job calls pipelines-deploy, you will get a CDE for each job (two CDEs total).
Workaround:
In acquia-pipelines.yaml, replace pipelines-deploy with code similar to the following to selectively run pipelines-deploy only on specific types of builds:
if [[ ${PIPELINE_DEPLOY_VCS_PATH} == pipelines-build-pr* ]]; then echo "Creating CD environment for PR." && pipelines-deploy; else echo "Not a PR. Skipping CD environment creation."; fiIf this content did not answer your questions, try searching or contacting our support team for further assistance.