Skip to content

Commit

Permalink
Add support to override XRAY_VERSION in workflow
Browse files Browse the repository at this point in the history
This allows acceptance tests to pass with Xray version up to 3.100.3
  • Loading branch information
alexhung committed Aug 19, 2024
1 parent 86c21e5 commit 5d8ba4e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ jobs:
uses: azure/[email protected]
- name: Get Artifactory and Xray versions
id: get_versions
env:
XRAY_VERSION: ${{ vars.XRAY_VERSION }}
run: |
helm repo add jfrog https://charts.jfrog.io/
helm repo update
RT_HELM_CHART_VERSION=$(helm search repo | grep "artifactory " | awk '{$1=$1};1' | cut -f2 -d " ")
ARTIFACTORY_VERSION=$(helm search repo | grep "artifactory " | awk '{$1=$1};1' | cut -f3 -d " ")
RT_HELM_CHART_VERSION=$(helm search repo | grep "jfrog/artifactory " | awk '{$1=$1};1' | cut -f2 -d " ")
ARTIFACTORY_VERSION=$(helm search repo | grep "jfrog/artifactory " | awk '{$1=$1};1' | cut -f3 -d " ")
echo "rt_version=$ARTIFACTORY_VERSION" >> "$GITHUB_OUTPUT"
XRAY_HELM_CHART_VERSION=$(helm search repo | grep "/xray" | awk '{$1=$1};1' | cut -f2 -d " ")
XRAY_VERSION=$(helm search repo | grep "/xray" | awk '{$1=$1};1' | cut -f3 -d " ")
XRAY_HELM_CHART_VERSION=$(helm search repo | grep "jfrog/xray" | awk '{$1=$1};1' | cut -f2 -d " ")
XRAY_VERSION=${XRAY_VERSION:=$(helm search repo | grep "jfrog/xray" | awk '{$1=$1};1' | cut -f3 -d " ")}
echo "XRAY_VERSION=$XRAY_VERSION" >> "$GITHUB_ENV"
echo "xray_version=$XRAY_VERSION" >> "$GITHUB_OUTPUT"
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
Expand Down Expand Up @@ -125,6 +128,7 @@ jobs:
id: install_xray
run: |
helm upgrade --install xray jfrog/xray \
--version $XRAY_VERSION
--set postgresql.persistence.size=200Gi \
--set xray.jfrogUrl=http://artifactory-artifactory-nginx \
--set xray.masterKey=$MASTER_KEY \
Expand Down

0 comments on commit 5d8ba4e

Please sign in to comment.