Skip to content
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

add changes to support lts branches #5848

Closed
Closed
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
36 changes: 30 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,24 @@ jobs:
gh release download v1.2 --repo github.com/TykTechnologies/tyk-ci -O env.tgz
tar xzvf env.tgz

- name: get versions
id: versions
uses: TykTechnologies/github-actions/.github/actions/latest-versions@main
with:
repo: ${{ github.repository }}
github_event: ${{ github.event_name }}
github_ref: ${{ github.ref }}
github_base_ref: ${{ github.base_ref }}
build_sha: ${{ github.sha }}

- name: debug outputs
run: |
echo "tyk=${{ steps.versions.outputs.tyk }}"
echo "tyk-analytics=${{ steps.versions.outputs.tyk-analytics }}"
echo "tyk-pump=${{ steps.versions.outputs.tyk-pump }}"
echo "tyk-sink=${{ steps.versions.outputs.tyk-sink }}"
echo "tyk-automated-tests=${{ steps.versions.outputs.tyk-automated-tests }}"

- name: env up
shell: bash
working-directory: auto
Expand All @@ -227,7 +245,10 @@ jobs:
t: ${{ needs.goreleaser.outputs.tags }}
pull_policy: 'if_not_present'
# default tag to use
default_image_tag: ${{ startsWith(github.ref_name, 'release-') && github.ref_name || 'master' }}
tyk_image_tag: ${{ steps.versions.outputs.tyk }}
tyk_analytics_image_tag: ${{ steps.versions.outputs.tyk-analytics }}
tyk_pump_image_tag: ${{ steps.versions.outputs.tyk-pump }}
tyk_sink_image_tag: ${{ steps.versions.outputs.tyk-sink }}
GH_TOKEN: ${{ secrets.ORG_GH_TOKEN }}
TYK_DB_LICENSEKEY: ${{ secrets.DASH_LICENSE }}
TYK_MDCB_LICENSE: ${{ secrets.MDCB_LICENSE }}
Expand All @@ -237,10 +258,10 @@ jobs:
echo First tag: ${tags[0]}
# Start customising the env
echo "registry=${{ steps.ecr.outputs.registry }}
tyk_image=\${registry}/tyk:${default_image_tag}
tyk_analytics_image=\${registry}/tyk-analytics:${default_image_tag}
tyk_sink_image=\${registry}/tyk-sink:${default_image_tag}
tyk_pump_image=\${registry}/tyk-pump:${default_image_tag}
tyk_image=\${registry}/tyk:${tyk_image_tag}
tyk_analytics_image=\${registry}/tyk-analytics:${tyk_analytics_image_tag}
tyk_sink_image=\${registry}/tyk-sink:${tyk_sink_image_tag}
tyk_pump_image=\${registry}/tyk-pump:${tyk_pump_image_tag}
# override default above with just built tag
tyk_image=${tags[0]}
# alfa and beta have to come after the override
Expand All @@ -251,6 +272,9 @@ jobs:
# pick database to use
env_file=local-${{ matrix.db }}.env
" > versions.env
#debug
echo "DEBUG VERSIONS.env"
cat versions.env
# Add Tyk component config variations to $env_file
cat confs/${{ matrix.conf }}.env >> local-${{ matrix.db }}.env
# bring up env, the project name is important
Expand All @@ -264,7 +288,7 @@ jobs:
run: |
echo "## API tests ${{ matrix.db }} ${{ matrix.conf }}" >> $GITHUB_STEP_SUMMARY
if docker run --rm --network auto_default --env-file pytest.env -v ${{ github.workspace }}/reports:/app/reports \
${{ steps.ecr.outputs.registry }}/tyk-automated-tests:${{ startsWith(github.ref_name, 'release-') && github.ref_name || 'master' }} \
${{ steps.ecr.outputs.registry }}/tyk-automated-tests:${{ steps.versions.outputs.tyk-automated-tests }} \
pytest -c pytest_ci.ini --ci -m "not local and not dind ${{ matrix.markers }}" > tests.out; then
echo "All tests passed!" >> $GITHUB_STEP_SUMMARY
else
Expand Down
Loading