AL-Go/Workshop/PublishToProduction.md

2.7 KiB

Publish To Production

In this section you learned how to setup a QA environment for continuous deployment.

If you follow the same process and setup an environment called PROD and add the same AUTHCONTEXT secret to that environment.

image
!NOTE

You can add protection rules to environments in GitHub, like which branches can deploy to this environment and which users should review every deployment to this environment as well.

By default, all environments will be picked up for continuous deployment, but production environments will be skipped unless you add the ContinuousDeployment setting from the previous chapter. The Deployment job will succeed, but looking into the step, you will see that the PROD environment is ignored:

image

By adding a setting like this to your repository settings file (.github/AL-Go-Settings.json)

  "DeployToPROD": {
    "continuousDeployment": false
  }
image

Then the PROD environment is not even included in the CI/CD workflow, and again, setting the ContinuousDeployment to true will enable continuous deployment to the production environment.

Publish to Environment

Menually publishing to environments is done by running the Publish To Environment workflow and specifying which version to publish.

image
!NOTE

The default version is current. This will deploy the current release, which is the release tagged with Latest in your repository.

image

If you want to deploy the latest build, you would specify "latest" and if you want to deploy a specific version, you should specify the project version number to deploy.

image

Investigating the Publish To Environment workflow run, you will see a Deploy step like the one in CI/CD, which also includes a link to the environment.

image

But... - would you do that without running automated tests?

So... - let's look at adding some tests.


Index  next