The release process is handled by .github/workflows.
- GoReleaser automation defined in build/ci/goreleaser.yml.
- The
cross-compile
step of the GitHub Workflow runsgoreleaser build
throughmake build
to compile the binaries - The
release
step of the GitHub Workflow runsgoreleaser release
throughmake release
but the release functionality itself is disabled. The tool just:- signs the macOS binary for Homebrew distribution
- creates mainfest for Scoop
- uses GoReleaser publisher functionality to upload the generated binaries to distribution S3
- Exe files for Windows distributed through Winget and Chocolatey have to be bundled in installers
- MSBuild with WiX Toolset is used
- The MSI file is created in the
release-msi-windows
step of the GitHub Workflow - The MSI file is uploaded to S3 in the same step
- WinGet is a package manager for Windows by Microsoft
- The manifest is created using wingetcreate tool and pushed to the repository using
update-repositories-windows
step of the GitHub Workflow - The manifest is published to the official repository
- Initial PR
- Our release workflow sends a new PR to microsoft/winget-pkgs
- We need to wait for one of the maintainers to merge the PR, this can take a few days
- To install Keboola CLI with winGet.
- macOS binaries are signed with an Apple Developer code signing certificate
- The certificate is issued by Tomas Netrval's Apple Developer account for the time being
- macOS binaries are distributed using Homebrew distribution
- Homebrew is a package manager for macOS and Linux
- The manifest is created in the
release
step of the GitHub Workflow - The manifest is pushed to the repository in the
update-repositories
step of the GitHub Workflow - We use our own manifest repository located on url https://github.com/keboola/homebrew-keboola-cli
- Chocolatey is a package manager for Windows
- The package is created and pushed to the community repository using
update-repositories-windows
step of the GitHub Workflow - The package is published to the community repository: https://community.chocolatey.org/packages/keboola-cli
- Updates to the package are authenticated by API key stored in
CHOCOLATEY_KEY
secret - Our release workflow sends the new version to Chocolatey which then runs 3 steps called "Validation", "Verification" and "Scan"
- Check the current status on top of the page for the new version which is linked from the version history
- Sometimes Chocolatey checks may decide that a manual review is necessary which can take longer
- Scoop is a package manager for Windows
- The manifest is created using build/ci/goreleaser.yml in the
release
step of the GitHub Workflow - The manifest is pushed to the repository in the
update-repositories-windows
step of the GitHub Workflow - We use our own manifest repository (bucket) located on url https://github.com/keboola/scoop-keboola-cli
- The
update-repositories
step of the GitHub Workflow is handling updates to Linux repositories - Supported packages:
- The S3 bucket is publicly available on url https://cli-dist.keboola.com
- The bucket is provisioned in dedicated AWS account using Terraform.
Testing:
export AWS_PROFILE="Test-Keboola-As-Code-Assets"
export AWS_DEFAULT_REGION="eu-central-1"
export TERRAFORM_BACKEND_STACK_PREFIX="keboola-ci-kac-assets"
./provisioning/cli-dist/scripts/create-backend.sh
Production:
export AWS_PROFILE="Prod-Keboola-As-Code-Assets"
export AWS_DEFAULT_REGION="eu-central-1"
export TERRAFORM_BACKEND_STACK_PREFIX="keboola-prod-kac-assets"
./provisioning/cli-dist/scripts/create-backend.sh
See the documentation for the OIDC background between AWS and GitHub Actions.
- got to the IAM console -> Identity providers
- click Add new provider
- select OpenID Connect
- fill provider url:
https://token.actions.githubusercontent.com
(Don't forget to click Get Thumbprint) - fill audience:
sts.amazonaws.com
- click add provider
Fill ARN from the previous step in env GITHUB_OIDC_PROVIDER_ARN
export AWS_PROFILE="Test-Keboola-As-Code-Assets"
export AWS_DEFAULT_REGION="eu-central-1"
export GITHUB_ORGANIZATION="keboola"
export GITHUB_REPOSITORY_NAME="keboola-as-code"
export GITHUB_OIDC_PROVIDER_ARN=arn:aws:iam::813746015128:oidc-provider/token.actions.githubusercontent.com
./provisioning/aws/scripts/create-github-testing-role.sh
The script will return the ARN full admin access role you will use in aws-actions/configure-aws-credential as a parameter role-to-assume
to testing workflow.
- fill ARN from the step one in env
GITHUB_OIDC_PROVIDER_ARN
- fill terraform backend prefix CF stack in env
TERRAFORM_BACKEND_STACK_PREFIX
export AWS_PROFILE="Prod-Keboola-As-Code-Assets"
export AWS_DEFAULT_REGION="eu-central-1"
export GITHUB_ORGANIZATION="keboola"
export GITHUB_REPOSITORY_NAME="keboola-as-code"
export GITHUB_OIDC_PROVIDER_ARN=arn:aws:iam::455460941449:oidc-provider/token.actions.githubusercontent.com
export TERRAFORM_BACKEND_STACK_PREFIX=keboola-prod-kac-assets
./provisioning/aws/scripts/create-github-production-role.sh
The script will return the ARN roles:
- full admin access role that can be called in GitHub Actions only over the
main
branch - read only role for the whole account and attached policy which allows you to run terraform provisioning plan, you can use this role over any branch
ACM Certificate for Cloudfront distribution is prepared and validated manually:
- Login into
Test-Keboola-As-Code-Assets
AWS account as Administrator - Go to AWS Certificate manager in us-east-1 region
- Request Public certificate
- Fully qualified domain name:
*.keboola.dev
- Validation methond - DNS validation
- Fully qualified domain name:
- Copy the
CNAME name
andCNAME value
of requested certificate - Switch to
Prod-KBC-multi-tenant-legacy
and create CNAME DNS record from previous step in Route 53keboola.dev
Hosted Zone - Switch back
- Login into
Prod-Keboola-As-Code-Assets
AWS account as Administrator - Go to AWS Certificate manager in us-east-1 region
- Request Public certificate
- Fully qualified domain name:
*.keboola.com
- Validation methond - DNS validation
- Fully qualified domain name:
- Copy the
CNAME name
andCNAME value
of requested certificate - Switch to
Prod-KBC-multi-tenant-legacy
and create CNAME DNS record from previous step in Route 53keboola.com
Hosted Zone - Switch back to
Prod-Keboola-As-Code-Assets
AWS Account and wait until the certificate is validated