-
Notifications
You must be signed in to change notification settings - Fork 310
chore(e2e): Fix worker version e2e-docker-base-with-worker-version to account for 1.0 release #6588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,8 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: '0' | ||
| fetch-depth: '1' | ||
| fet-tags: true | ||
| - name: Determine Go version | ||
| id: get-go-version | ||
| # We use .go-version as our source of truth for current Go | ||
|
|
@@ -100,6 +101,8 @@ jobs: | |
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: '0' | ||
|
dillanb-hashi marked this conversation as resolved.
Outdated
dillanb-hashi marked this conversation as resolved.
Outdated
|
||
| - name: Determine Go version | ||
| id: get-go-version | ||
| # We use .go-version as our source of truth for current Go | ||
|
|
@@ -265,12 +268,37 @@ jobs: | |
| enos scenario check --chdir ./enos ${{ matrix.filter }} && \ | ||
| enos scenario exec --chdir ./enos ${{ matrix.filter }} --cmd "version" | ||
| - name: Determine boundary version to test against previous worker version | ||
| # Get the Boundary version number and decrement the minor version by 1 | ||
| # Resolve the worker version from the previous release line. | ||
| if: contains(matrix.filter, 'e2e_docker_base_with_worker_version') | ||
| run: | | ||
| version_num=$(./enos/support/boundary/boundary version | awk -F'[. ]' '/Version Number/ {print $(NF-1)}') | ||
| export ENOS_VAR_worker_version="$((version_num - 1))" | ||
| echo "ENOS_VAR_worker_version=0.$ENOS_VAR_worker_version" >> "$GITHUB_ENV" | ||
| current_version_raw=$(./enos/support/boundary/boundary version | awk '/Version Number/ {print $3}') | ||
| current_version="${current_version%%[-+]*}" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like this this handles boundary versions coming from boundary-enterprise (i.e.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current_version_raw outputs 0.21.0+ent line 275 takes out the +ent. Line 274 probably isn't needed though.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right. That's the output of
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yes. I'll test this in the ent branch as well to make sure I can get the right version. We handle adding the +ent in the enos scenario I'm pretty sure so it should strip the +ent from the git tags when it's parsing through that.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I might be confusing myself.
dillanb-hashi marked this conversation as resolved.
Outdated
|
||
|
|
||
| if ! [[ "$current_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
| echo "Unable to parse Boundary version: $current_version_raw" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| IFS='.' read -r current_major current_minor current_patch <<< "$current_version" | ||
|
|
||
|
|
||
| all_semver_tags=$(git tag -l | sed 's/^v//' | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' || true) | ||
|
|
||
| previous_version="" | ||
| if [ "$current_minor" -gt 0 ]; then | ||
| target_minor=$((current_minor - 1)) | ||
| previous_version=$(echo "$all_semver_tags" | grep -E "^${current_major}\.${target_minor}\.[0-9]+$" | sort -V | tail -n1 || true) | ||
| fi | ||
| if [ -z "$previous_version" ] && [ "$current_major" -gt 0 ]; then | ||
| target_major=$((current_major - 1)) | ||
| previous_version=$(echo "$all_semver_tags" | grep -E "^${target_major}\.[0-9]+\.[0-9]+$" | sort -V | tail -n1 || true) | ||
| fi | ||
|
|
||
| if [ -z "$previous_version" ]; then | ||
| echo "No previous release line found for current version $current_version" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "ENOS_VAR_worker_version=$previous_version" >> "$GITHUB_ENV" | ||
| - name: Run Enos scenario | ||
| id: run | ||
| # Continue once and retry | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.