All Products
Document Center

DevOps practice for containers

Last Updated: Jan 26, 2018

Create a repository

You can create a repository based on the projects on Github, Bitbucket, and Gitlab. We recommend that you select Automatically create an image when the code changes in Build Setting. Then, when you modify the code, the automatic build of the repository is triggered and the new images are pushed to Alibaba Cloud Container Registry.

We recommend that you set the project master branch to the latest image version. Then, if you want to use this repository image, you can directly use**/dockertest, without specifying a tag as the latest version. The stable master branch is used by default to create the stable latest image version.

Build a repository

Click Build Now on the repository details page to build a repository using the preceding two build rules.

After you submit the modified code in the test branch of the source code repository, the repository is automatically built based on the second build rule and generates new versions of images.

Repository Webhook

Repository Webhook can subscribe to events generated by new image versions. We recommend that you generate a request URL using and bind it to the repository Webhook. When new images are generated, you can see the access history of Webhook.


The time, parameters, and results of the request are displayed in details. The request parameters provide the information about the current repository.

Bind Container Service trigger

Log on to the Container Service console and click Applications in the left-side navigation pane. Select the cluster from the Cluster list and click the name of the created application to enter the application details page. Click Create Trigger to create a redeployment trigger and copy the trigger URL.


Return to the image information page. Create a Webhook and enter the trigger URL.


After you modify the code in the source code repository, the container images are automatically built and the redeployment of the corresponding applications in Container Service is automatically triggered.