Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/post_release_version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
required: true

env:
VERSION: ${{ github.event.inputs.version }}

AWS_DEFAULT_REGION: us-east-1

permissions:
Expand Down Expand Up @@ -96,9 +98,9 @@ jobs:

- name: Update version to next development version in main
run: |
DEV_VERSION="${{ github.event.inputs.version }}.dev0"
DEV_VERSION="${{ env.VERSION }}.dev0"
sed -i 's/__version__ = ".*"/__version__ = "'$DEV_VERSION'"/' aws-opentelemetry-distro/src/amazon/opentelemetry/distro/version.py
VERSION="${{ github.event.inputs.version }}"
VERSION="${{ env.VERSION }}"
sed -i 's/python:v.*"/python:v'$VERSION'"/' .github/workflows/daily_scan.yml
git add aws-opentelemetry-distro/src/amazon/opentelemetry/distro/version.py
git add .github/workflows/daily_scan.yml
Expand All @@ -109,7 +111,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
run: |
DEV_VERSION="${{ github.event.inputs.version }}.dev0"
DEV_VERSION="${{ env.VERSION }}.dev0"
gh pr create --title "Post release $VERSION: Update version to $DEV_VERSION" \
--body "This PR prepares the main branch for the next development cycle by updating the version to $DEV_VERSION and updating the image version to be scanned to the latest released.

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pre_release_prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
default: 'false'

env:
VERSION: ${{ github.event.inputs.version }}
IS_PATCH: ${{ github.event.inputs.is_patch }}

AWS_DEFAULT_REGION: us-east-1

permissions:
Expand Down Expand Up @@ -56,7 +59,7 @@ jobs:

- name: Create branches
run: |
IS_PATCH=${{ github.event.inputs.is_patch }}
IS_PATCH=${{ env.IS_PATCH }}
if [[ "$IS_PATCH" != "true" && "$IS_PATCH" != "false" ]]; then
echo "Invalid input for IS_PATCH. Must be 'true' or 'false'."
exit 1
Expand Down Expand Up @@ -102,5 +105,5 @@ jobs:
--body "This PR updates the version to ${VERSION}.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice." \
--head v${{ github.event.inputs.version }}_release \
--head v${{ env.VERSION }}_release \
--base release/v${MAJOR_MINOR}.x
13 changes: 7 additions & 6 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ on:
required: true

env:
VERSION: ${{ github.event.inputs.version }}

AWS_DEFAULT_REGION: us-east-1
AWS_PUBLIC_ECR_REGION: us-east-1
AWS_PRIVATE_ECR_REGION: us-west-2
RELEASE_PUBLIC_REPOSITORY: public.ecr.aws/aws-observability/adot-autoinstrumentation-python
RELEASE_PRIVATE_REPOSITORY: 020628701572.dkr.ecr.us-west-2.amazonaws.com/adot-autoinstrumentation-python
RELEASE_PRIVATE_REGISTRY: 020628701572.dkr.ecr.us-west-2.amazonaws.com
PACKAGE_NAME: aws-opentelemetry-distro
ARTIFACT_NAME: aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl

ARTIFACT_NAME: aws_opentelemetry_distro-${{ env.VERSION }}-py3-none-any.whl
permissions:
id-token: write
contents: write
Expand Down Expand Up @@ -108,7 +109,7 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}
${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION }}

# Publish to private ECR
- name: Build and push private ECR image
Expand All @@ -119,7 +120,7 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION }}

- name: Get SHA256 checksum of wheel file
id: get_sha256
Expand All @@ -133,8 +134,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
run: |
gh release create --target "$GITHUB_REF_NAME" \
--title "Release v${{ github.event.inputs.version }}" \
--title "Release v${{ env.VERSION }}" \
--draft \
"v${{ github.event.inputs.version }}" \
"v${{ env.VERSION }}" \
dist/${{ env.ARTIFACT_NAME }} \
${{ env.ARTIFACT_NAME }}.sha256
10 changes: 7 additions & 3 deletions .github/workflows/release_lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
default: 'us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1, af-south-1, ap-east-1, ap-south-2, ap-southeast-3, ap-southeast-4, eu-central-2, eu-south-1, eu-south-2, il-central-1, me-central-1, me-south-1'

env:
VERSION: ${{ github.event.inputs.version }}
AWS_REGIONS: ${{ github.event.inputs.aws_region }}


COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1
LAYER_NAME: AWSOpenTelemetryDistroPython

Expand All @@ -28,7 +32,7 @@ jobs:
- name: Set up regions matrix
id: set-matrix
run: |
IFS=',' read -ra REGIONS <<< "${{ github.event.inputs.aws_region }}"
IFS=',' read -ra REGIONS <<< "${{ env.AWS_REGIONS }}"
MATRIX="["
for region in "${REGIONS[@]}"; do
trimmed_region=$(echo "$region" | xargs)
Expand Down Expand Up @@ -193,7 +197,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
run: |
gh release create --target "$GITHUB_REF_NAME" \
--title "Release lambda-v${{ github.event.inputs.version }}" \
--title "Release lambda-v${{ env.VERSION }}" \
--draft \
"lambda-v${{ github.event.inputs.version }}" \
"lambda-v${{ env.VERSION }}" \
layer.tf
Loading