One way to achieve this with AWS CodeDeploy is to use the S3 option in conjunction with Gitlab-CI: http://docs.aws.amazon.com/codepipeline/latest/userguide/getting-started-w.html
Depending on how your project is set up, you may be able to generate a Zip distribution (Gradle offers this through the application plugin). You may need to create your โdistributionโ file manually if your project does not offer such an opportunity.
Gitlab does not offer direct S3 integration, however through gitlab-ci.yml you can load it into the container and execute the necessary download commands to place the created zip file in the S3 container in accordance with AWS instructions to initiate the deployment.
Here is an example of what your brefore-script might look like in the gitlab-ci.yml :
before_script: - apt-get update --quiet --yes - apt-get --quiet install --yes python - pip install -U pip - pip install awscli
The AWS tutorial on how to use CodeDeploy with S3 is very detailed, so I will skip trying to play the content here.
Regarding the actual deployment commands and actions that you are currently executing manually, AWS CodeDeploy provides the ability to run specific actions using scripts defined in the application file, depending on the event bindings for the application:
Hope this helps.
source share