Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Find Supported OpenSearch Versions workflow
Note; this workflow doesn't work properly when run on ubuntu, but it works on an AL2 machine. Tailing the output of grep does not appear to limit the results as expected ``` C:\Users\petern\Documents\GitHub\opensearch-build [test-wf +0 ~2 -0 !]> act -j find-latest-versions [Find Supported OpenSearch Versions/find-latest-versions] 🚀 Start image=catthehacker/ubuntu:act-latest [Find Supported OpenSearch Versions/find-latest-versions] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Find Supported OpenSearch Versions/find-latest-versions] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Find Supported OpenSearch Versions/find-latest-versions] ⭐ Run Main actions/checkout@v2 [Find Supported OpenSearch Versions/find-latest-versions] 🐳 docker cp src=C:\Users\petern\Documents\GitHub\opensearch-build\. dst=/mnt/c/Users/petern/Documents/GitHub/opensearch-build [Find Supported OpenSearch Versions/find-latest-versions] ✅ Success - Main actions/checkout@v2 [Find Supported OpenSearch Versions/find-latest-versions] ⭐ Run Main export all=$(ls manifests/**/opensearch*.yml | cut -d'/' -f2 | sort | uniq | grep -vE ^1\.4\.0) export majors=$(ls manifests/**/opensearch*.yml | cut -d'/' -f2 | sort | uniq | cut -c 1 | uniq) export latest_versions=$(echo $major | while IFS=$"\n" read -r c; do echo $(echo $all | grep ^$c | tail -n 1); done) echo Majors are $majors echo Latest Versions are $latest_versions echo "::set-output name=latest_versions::$(echo $latest_versions)" [Find Supported OpenSearch Versions/find-latest-versions] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/echo-value] user= workdir= | All is 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 2.0.0 2.0.0-rc1 2.0.1 2.0.2 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.4.0 3.0.0 | Majors are 1 2 3 | Latest Versions are 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 2.0.0 2.0.0-rc1 2.0.1 2.0.2 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.4.0 3.0.0 [Find Supported OpenSearch Versions/find-latest-versions] ⚙ ::set-output:: latest_versions=1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 2.0.0 2.0.0-rc1 2.0.1 2.0.2 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.4.0 3.0.0 [Find Supported OpenSearch Versions/find-latest-versions] ✅ Success - Main export all=$(ls manifests/**/opensearch*.yml | cut -d'/' -f2 | sort | uniq | grep -vE ^1\.4\.0) export majors=$(ls manifests/**/opensearch*.yml | cut -d'/' -f2 | sort | uniq | cut -c 1 | uniq) export latest_versions=$(echo $major | while IFS=$"\n" read -r c; do echo $(echo $all | grep ^$c | tail -n 1); done) echo All is $all echo Majors are $majors echo Latest Versions are $latest_versions echo "::set-output name=latest_versions::$(echo $latest_versions)" [Find Supported OpenSearch Versions/find-latest-versions] ⭐ Run Main echo ${{ steps.echo-value.outputs.latest_versions}} [Find Supported OpenSearch Versions/find-latest-versions] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/echo-done] user= workdir= | 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 2.0.0 2.0.0-rc1 2.0.1 2.0.2 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.4.0 3.0.0 [Find Supported OpenSearch Versions/find-latest-versions] ✅ Success - Main echo ${{ steps.echo-value.outputs.latest_versions}} [Find Supported OpenSearch Versions/find-latest-versions] 🏁 Job succeeded ``` Signed-off-by: Peter Nied <petern@amazon.com>
- Loading branch information
See this work unexpectedly in GitHub Actions [1] or run it locally with Act [2] which is way faster for testing/iterating.
[1] https://github.com/peternied/opensearch-build/actions/runs/3291889559/jobs/5426604254
[2] https://github.com/nektos/act