-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve release process for ASO (#1372)
- Also add some documentation on exactly what the process is.
- Loading branch information
Showing
5 changed files
with
58 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
devops/release/scripts/step2_azurecli.sh → .../release/scripts/step2_pushdockerimage.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Note: This is not currently used as the Helm chart at the time of release doesn't have the correct container image version. | ||
|
||
export HELM_EXPERIMENTAL_OCI=1 | ||
ACR_NAME='asorelease' | ||
|
||
echo "ACR_NAME", $ACR_NAME | ||
echo "azureserviceoperator_image", $(azureserviceoperator_image) | ||
echo "azureserviceoperator_image_base", $(azureserviceoperator_image_base) | ||
echo "azureserviceoperator_image_latest", $(azureserviceoperator_image_latest) | ||
echo "azureserviceoperator_image_public", $(azureserviceoperator_image_public) | ||
echo "azureserviceoperator_image_version", $(azureserviceoperator_image_version) | ||
|
||
echo $(AZURE_CLIENT_SECRET) | helm registry login $ACR_NAME.azurecr.io --username $(AZURE_CLIENT_ID) --password-stdin | ||
|
||
helm chart pull $ACR_NAME.azurecr.io/candidate/k8s/asohelmchart:$(azureserviceoperator_image_version) | ||
helm chart export $ACR_NAME.azurecr.io/candidate/k8s/asohelmchart:$(azureserviceoperator_image_version) --destination . | ||
cd azure-service-operator | ||
helm chart save . $ACR_NAME.azurecr.io/public/k8s/asohelmchart:$(azureserviceoperator_image_version) | ||
helm chart save . $ACR_NAME.azurecr.io/public/k8s/asohelmchart:latest | ||
helm chart push $ACR_NAME.azurecr.io/public/k8s/asohelmchart:$(azureserviceoperator_image_version) | ||
helm chart push $ACR_NAME.azurecr.io/public/k8s/asohelmchart:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Releasing Azure Service Operator | ||
|
||
The release process for Azure Service Operator has two steps: | ||
1. Release an updated container image for the operator manager. | ||
2. Reference the updated container image in a new Helm chart. | ||
|
||
## Releasing an updated container image for the manager | ||
|
||
1. Ensure you have a successful pipeline run off `master` that has all the changes you want to be in the release. If not, [schedule a run on Azure DevOps](http://dev.azure.com/azure/azure-service-operator). Note that you need to be signed in on DevOps to schedule a build. | ||
- The output of this step is a _candidate_ container image. | ||
2. Create a new [DevOps release](https://dev.azure.com/azure/azure-service-operator/_release?_a=releases&view=mine&definitionId=2). **Note**: The release must be created from a build of `master`. The release creation will fail if it is created targetting artifacts from any other branch. | ||
- Click "create release" and choose the build from step 1 for "Artifacts". | ||
- Click "Create". | ||
3. Wait for the DevOps release created in step #2 to finish. The result of a successful run of the DevOps release is: | ||
- The creation of a GitHub release you can access at https://github.com/Azure/azure-service-operator/releases. This release contains: | ||
- A `setup.yaml` file complete with all of the Azure Service Operator CRDs and deployment configuration which can easily be applied directly to a cluster. | ||
- `notes.txt` with a link to the Azure Service Operator manager docker image. | ||
|
||
|
||
## Releasing an updated Helm chart | ||
|
||
Because the Helm chart is hosted out of the GitHub repo itself, we cannot update it until an official container image for the ASO manager has been produced. Once the DevOps release has been run and a new image has been published, perform the following steps to generate a new version of the helm chart: | ||
|
||
1. Create a new branch of ASO. | ||
2. Update the `version` field of `charts/azure-service-operator/Chart.yaml`. Note that this field is the version of the _chart_, so it should follow semver for the chart. If there's a breaking change in the chart then the major version should be incremented, otherwise incrementing the minor version is fine. | ||
2. Run `make helm-chart-manifests`. You should see a new chart `.tgz` get created and the new chart version you defined referenced in `charts/index.yaml`. | ||
3. Submit a PR to ASO with the updated `Chart.yaml`, `index.yaml` and chart `.tgz` file. |