diff options
Diffstat (limited to 'doc/ci/cloud_deployment/index.md')
-rw-r--r-- | doc/ci/cloud_deployment/index.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/ci/cloud_deployment/index.md b/doc/ci/cloud_deployment/index.md index 1be40a0add0..e0cd1f73ffc 100644 --- a/doc/ci/cloud_deployment/index.md +++ b/doc/ci/cloud_deployment/index.md @@ -282,6 +282,32 @@ When running your project pipeline at this point: on the related JSON object's content. The deployment job finishes whenever the deployment to EC2 is done or has failed. +#### Custom build job for Auto DevOps + +To leverage [Auto DevOps](../../topics/autodevops/index.md) for your project when deploying to +AWS EC2, you must specify a job for the `build` stage. + +To do so, you must reference the `Auto-DevOps.gitlab-ci.yml` template and include a job named +`build_artifact` in your `.gitlab-ci.yml` file. For example: + +```yaml +# .gitlab-ci.yml + +include: + - template: Auto-DevOps.gitlab-ci.yml + +variables: + - AUTO_DEVOPS_PLATFORM_TARGET: EC2 + +build_artifact: + stage: build + script: + - <your build script goes here> + artifacts: + paths: + - <built artifact> +``` + ### Deploy to Amazon EKS - [How to deploy your application to a GitLab-managed Amazon EKS cluster with Auto DevOps](https://about.gitlab.com/blog/2020/05/05/deploying-application-eks/) |