Skip to content

Commit b95072f

Browse files
authored
Allow independent component versioning (aws-observability#631)
Rather than tying layer version to component version we decided we want them independent. I still included the component version in the ARN output logging so we can be confident in associating the version correctly.
1 parent de8cca6 commit b95072f

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

.github/workflows/layer-publish.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ on:
1111
description: 'Layer name not including other parts like arch or version.'
1212
required: true
1313
type: string
14-
layer-version:
15-
description: 'In the form x.x.x -- will be changed to x_x_x in layer name.'
14+
component-version:
15+
description: 'Version of the component included in this release. Not the same as the layer/tagged version.'
1616
required: true
1717
type: string
1818
architecture:
@@ -53,19 +53,14 @@ jobs:
5353
LAYER_NAME=$LAYER_NAME-${{ inputs.release-group }}
5454
fi
5555
56-
LAYER_VERSION=${{ inputs.layer-version }}
56+
LAYER_VERSION=$(echo "$GITHUB_REF_NAME" | sed -r 's/.*\/[^\d\.]*//g')
5757
LAYER_VERSION_CLEANED=$(echo "$LAYER_VERSION" | sed -r 's/\./_/g')
5858
5959
LAYER_NAME=$LAYER_NAME-$LAYER_VERSION_CLEANED
6060
echo "LAYER_NAME=$LAYER_NAME" >> $GITHUB_ENV
6161
6262
echo GITHUB_ENV:
6363
cat $GITHUB_ENV
64-
65-
if [[ $GITHUB_REF_NAME != */$LAYER_VERSION ]]; then
66-
echo "Tag $GITHUB_REF_NAME doesn't end with $LAYER_VERSION"
67-
exit 1
68-
fi
6964
7065
- name: Download built layer
7166
uses: actions/download-artifact@v3
@@ -89,7 +84,7 @@ jobs:
8984
--query 'LayerVersionArn' \
9085
--output text
9186
)
92-
echo "::notice ::$LAYER_ARN"
87+
echo "::notice ::$LAYER_ARN component-version=${{ inputs.component-version }}"
9388
# echo "* $LAYER_ARN" >> $GITHUB_STEP_SUMMARY
9489

9590
- name: Make Layer Public

.github/workflows/release-layer-collector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
with:
6969
artifact-name: opentelemetry-collector-layer-${{ matrix.architecture }}.zip
7070
layer-name: opentelemetry-collector
71-
layer-version: ${{needs.build-layer.outputs.COLLECTOR_VERSION}}
71+
component-version: ${{needs.build-layer.outputs.COLLECTOR_VERSION}}
7272
architecture: ${{ matrix.architecture }}
7373
release-group: dev
7474
aws_region: ${{ matrix.aws_region }}

.github/workflows/release-layer-java.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
with:
7070
artifact-name: opentelemetry-javaagent-layer.zip
7171
layer-name: opentelemetry-javaagent
72-
layer-version: ${{needs.build-layer.outputs.JAVAAGENT_VERSION}}
72+
component-version: ${{needs.build-layer.outputs.JAVAAGENT_VERSION}}
7373
# architecture:
7474
release-group: dev
7575
aws_region: ${{ matrix.aws_region }}

0 commit comments

Comments
 (0)