Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/daily_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ jobs:
id: high_scan
uses: ./.github/actions/image_scan
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-python:v0.7.0"
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-python:v0.8.0"
severity: 'CRITICAL,HIGH'

- name: Perform low image scan
if: always()
id: low_scan
uses: ./.github/actions/image_scan
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-python:v0.7.0"
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-python:v0.8.0"
severity: 'MEDIUM,LOW,UNKNOWN'

- name: Configure AWS Credentials for emitting metrics
Expand Down
42 changes: 32 additions & 10 deletions .github/workflows/post_release_version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ on:
inputs:
version:
description: 'Version number (e.g., 1.0.1)'
required: true
required: false
default: "0.7.0"
push:

env:
AWS_DEFAULT_REGION: us-east-1
Expand Down Expand Up @@ -53,7 +55,6 @@ jobs:
exit 1
fi


prepare-main:
runs-on: ubuntu-latest
needs: check-version
Expand All @@ -77,6 +78,7 @@ jobs:
with:
fetch-depth: 0
token: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
ref: add-checksum

- name: Configure Git
run: |
Expand All @@ -85,8 +87,8 @@ jobs:

- name: Extract Major.Minor Version and setup Env variable
run: |
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV
echo "VERSION=0.7.0" >> $GITHUB_ENV
echo "MAJOR_MINOR=$(echo 0.7.0 | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV

- name: Determine release branch and checkout
run: |
Expand All @@ -96,25 +98,45 @@ jobs:

- name: Update version to next development version in main
run: |
DEV_VERSION="${{ github.event.inputs.version }}.dev0"
DEV_VERSION="0.7.0.dev0"
sed -i 's/__version__ = ".*"/__version__ = "'$DEV_VERSION'"/' aws-opentelemetry-distro/src/amazon/opentelemetry/distro/version.py
VERSION="${{ github.event.inputs.version }}"
VERSION="0.7.0"
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

- name: Append latest release checksum to release-build-metadata.json
run: |
ARTIFACT_NAME="aws_opentelemetry_distro-${{ env.VERSION }}-py3-none-any.whl"
curl -L -o $ARTIFACT_NAME https://github.com/aws-observability/aws-otel-python-instrumentation/releases/download/v${{ env.VERSION }}/$ARTIFACT_NAME

CHECKSUM=$(shasum -a 256 $ARTIFACT_NAME | awk '{ print $1 }')

FILE="release-build-metadata.json"
UPDATED_JSON=$(jq --arg version "${{ env.VERSION }}" \
--arg name "$ARTIFACT_NAME" \
--arg checksum "$CHECKSUM" \
'.release += [{"version": $version, "checksum": [{"name": $name, "checksum": $checksum}]}]' "$FILE")

echo "$UPDATED_JSON" > "$FILE"
git add release-build-metadata.json

- name: Push changes to Github
run: |
git commit -m "Prepare main for next development cycle: Update version to $DEV_VERSION"
git push --set-upstream origin "prepare-main-for-next-dev-cycle-${VERSION}"

- name: Create Pull Request to main
env:
GITHUB_TOKEN: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
run: |
DEV_VERSION="${{ github.event.inputs.version }}.dev0"
DEV_VERSION="0.7.0.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.
--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.

This PR should only be merge when release for version v$VERSION is success.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice." \
--head prepare-main-for-next-dev-cycle-${VERSION} \
--base main
--head prepare-main-for-next-dev-cycle-${VERSION} \
--base main

3 changes: 3 additions & 0 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,6 @@ jobs:
--draft \
"v${{ github.event.inputs.version }}" \
dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl



Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

__version__ = "0.7.0.dev0"
__version__ = "0.8.0.dev0"
22 changes: 22 additions & 0 deletions release-build-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"release": [
{
"version": "0.7.0",
"checksum": [
{
"name": "aws_opentelemetry_distro-0.7.0-py3-none-any.whl",
"checksum": "8cf682fa56bc00326a741acf480024550017beda41acb1b51af9d3b5ef1a9470"
}
]
},
{
"version": "0.8.0",
"checksum": [
{
"name": "aws_opentelemetry_distro-0.7.0-py3-none-any.whl",
"checksum": "8cf682fa56bc00326a741acf480024550017beda41acb1b51af9d3b5ef1a9470"
}
]
}
]
}
Loading