Skip to content

Commit

Permalink
Add simpler measure other workflows to retrieve docker images values (#…
Browse files Browse the repository at this point in the history
…4125)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
  • Loading branch information
peterzhuamazon committed Oct 12, 2023
1 parent 00b08ec commit a5395ec
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/get-ci-image-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ name: Get CI Image Tag
on:
workflow_call:
inputs:
platform:
required: true
product:
required: false
type: string
usage:
required: true
default: 'opensearch'
platform:
required: false
type: string
build_ref:
required: false
Expand Down Expand Up @@ -37,7 +38,17 @@ jobs:
- name: Get ci image version from opensearch-build repository scripts
id: step-ci-image-version-linux
run: |
PRODUCT=${{ inputs.product }}
PLATFORM=${{ inputs.platform }}
if [[ -z "$PLATFORM" ]]; then
if [[ "$PRODUCT" = "opensearch" ]]; then
PLATFORM="centos7" # Temp measure before centos7 deprecation on opensearch for k-NN
else
PLATFORM="rockylinux8"
fi
fi
crane version
CI_IMAGE_VERSION=`opensearch-build/docker/ci/get-ci-images.sh -p ${{ inputs.platform }} -u ${{ inputs.usage }} -t build | head -1`
echo $PRODUCT $PLATFORM
CI_IMAGE_VERSION=`opensearch-build/docker/ci/get-ci-images.sh -p $PLATFORM -u $PRODUCT -t build | head -1`
echo $CI_IMAGE_VERSION
echo "ci-image-version-linux=$CI_IMAGE_VERSION" >> $GITHUB_OUTPUT
3 changes: 0 additions & 3 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on: [push, pull_request]
jobs:
Get-CI-Image-Tag:
uses: ./.github/workflows/get-ci-image-tag.yml
with:
platform: centos7
usage: opensearch

python-tests:
strategy:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- # yamllint disable-line rule:new-lines
--- # yamllint disable-line rule:new-lines
schema-version: '1.2'
build:
name: OpenSearch
Expand Down

0 comments on commit a5395ec

Please sign in to comment.