Skip to content

Commit

Permalink
[CI] Removed deprecated set-output commands (mlrun#2952)
Browse files Browse the repository at this point in the history
  • Loading branch information
liranbg authored Jan 19, 2023
1 parent 2c62fbb commit e828af1
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 52 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: |
skipImages=,${{ github.event.inputs.skip_images }},
matrix=$(jq --arg skipImages "$skipImages" 'map(. | select(",\(."image-name")," | inside($skipImages)|not))' ./.github/workflows/build-workflow-matrix.json)
echo ::set-output name=matrix::{\"include\":$(echo $matrix)}
echo "matrix={\"include\":$(echo $matrix)}" >> $GITHUB_OUTPUT
build-images:
name: Build and push image - ${{ matrix.image-name }}
runs-on: ubuntu-latest
Expand All @@ -79,32 +79,32 @@ jobs:
- name: Extract git hash, ref and latest version
id: git_info
run: |
echo "::set-output name=mlrun_commit_hash::$(git rev-parse --short=8 $GITHUB_SHA)"
echo "::set-output name=unstable_version_prefix::$(cat automation/version/unstable_version_prefix)"
echo "mlrun_commit_hash=$(git rev-parse --short=8 $GITHUB_SHA)" >> $GITHUB_OUTPUT
echo "unstable_version_prefix=$(cat automation/version/unstable_version_prefix)" >> $GITHUB_OUTPUT
- name: Resolve docker cache tag
id: docker_cache
run: |
export version_suffix=$(echo "$GITHUB_REF_NAME" | grep -E "^[0-9]+\.[0-9]+\.x$" | tr -d '.');
export unstable_tag=$(if [ -z "$version_suffix" ]; then echo "unstable-cache"; else echo "unstable-cache-$version_suffix";fi);
export build_from_cache=$(if [ -z "${{ github.event.inputs.build_from_cache }}" ]; then echo "true" ; else echo "${{ github.event.inputs.build_from_cache }}";fi);
export no_cache=$(if [ "$build_from_cache" = "false" ]; then echo "true" ; else echo "";fi);
echo "::set-output name=tag::$(echo $unstable_tag)"
echo "::set-output name=no_cache::$(echo $no_cache)"
echo "tag=$(echo $unstable_tag)" >> $GITHUB_OUTPUT
echo "no_cache=$(echo $no_cache)" >> $GITHUB_OUTPUT
- name: Set computed versions params
id: computed_params
run: |
echo "::set-output name=mlrun_version::$( \
echo "mlrun_version=$( \
input_mlrun_version=${{ github.event.inputs.version }} && \
default_mlrun_version=$(echo ${{ steps.git_info.outputs.unstable_version_prefix }}+${{ steps.git_info.outputs.mlrun_commit_hash }}) && \
echo ${input_mlrun_version:-`echo $default_mlrun_version`})"
echo "::set-output name=mlrun_docker_repo::$( \
echo ${input_mlrun_version:-`echo $default_mlrun_version`})" >> $GITHUB_OUTPUT
echo "mlrun_docker_repo=$( \
input_docker_repo=${{ github.event.inputs.docker_repo }} && \
default_docker_repo=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') && \
echo ${input_docker_repo:-`echo $default_docker_repo`})"
echo "::set-output name=mlrun_docker_registries::$( \
echo ${input_docker_repo:-`echo $default_docker_repo`})" >> $GITHUB_OUTPUT
echo "mlrun_docker_registries=$( \
input_docker_registries=${{ github.event.inputs.docker_registries }} && \
echo ${input_docker_registries:-ghcr.io/})"
echo "::set-output name=mlrun_cache_date::$(date +%s)"
echo "mlrun_cache_date=$(date +%s)" >> $GITHUB_OUTPUT
- name: Docker login
# all suffixed with "| true" to allow failures if secrets are not defined (fork)
run: |
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ jobs:
- name: Extract git branch
id: git_info
run: |
echo "name=branch::$(echo ${GITHUB_BASE_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "branch=$(echo ${GITHUB_BASE_REF#refs/heads/})" >> $GITHUB_OUTPUT
- name: Resolve docker cache tag
id: docker_cache
run: |
export version_suffix=$(echo "${{ steps.git_info.outputs.branch }}" | grep -E "^[0-9]+\.[0-9]+\.x$" | tr -d '.')
export unstable_tag=$(if [ -z "$version_suffix" ]; then echo "unstable-cache"; else echo "unstable-cache-$version_suffix";fi)
echo "name=tag::$(echo $unstable_tag)" >> $GITHUB_OUTPUT
echo "tag=$(echo $unstable_tag)" >> $GITHUB_OUTPUT
- name: Run Dockerized tests
run: MLRUN_DOCKER_REGISTRY=ghcr.io/ MLRUN_DOCKER_CACHE_FROM_TAG=${{ steps.docker_cache.outputs.tag }} make test-dockerized

Expand All @@ -79,13 +79,13 @@ jobs:
- name: Extract git branch
id: git_info
run: |
echo "name=branch::$(echo ${GITHUB_BASE_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "branch=$(echo ${GITHUB_BASE_REF#refs/heads/})" >> $GITHUB_OUTPUT
- name: Resolve docker cache tag
id: docker_cache
run: |
export version_suffix=$(echo "${{ steps.git_info.outputs.branch }}" | grep -E "^[0-9]+\.[0-9]+\.x$" | tr -d '.')
export unstable_tag=$(if [ -z "$version_suffix" ]; then echo "unstable-cache"; else echo "unstable-cache-$version_suffix";fi)
echo "name=tag::$(echo $unstable_tag)" >> $GITHUB_OUTPUT
echo "tag=$(echo $unstable_tag)" >> $GITHUB_OUTPUT
- name: Run Dockerized tests
run: MLRUN_DOCKER_REGISTRY=ghcr.io/ MLRUN_DOCKER_CACHE_FROM_TAG=${{ steps.docker_cache.outputs.tag }} make test-integration-dockerized

Expand All @@ -98,13 +98,13 @@ jobs:
- name: Extract git branch
id: git_info
run: |
echo "name=branch::$(echo ${GITHUB_BASE_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "branch=$(echo ${GITHUB_BASE_REF#refs/heads/})" >> $GITHUB_OUTPUT
- name: Resolve docker cache tag
id: docker_cache
run: |
export version_suffix=$(echo "${{ steps.git_info.outputs.branch }}" | grep -E "^[0-9]+\.[0-9]+\.x$" | tr -d '.')
export unstable_tag=$(if [ -z "$version_suffix" ]; then echo "unstable-cache"; else echo "unstable-cache-$version_suffix";fi)
echo "name=tag::$(echo $unstable_tag)" >> $GITHUB_OUTPUT
echo "tag=$(echo $unstable_tag)" >> $GITHUB_OUTPUT
- name: Run Dockerized DB Migration tests
run: MLRUN_DOCKER_REGISTRY=ghcr.io/ MLRUN_DOCKER_CACHE_FROM_TAG=${{ steps.docker_cache.outputs.tag }} make test-migrations-dockerized

Expand Down Expand Up @@ -136,13 +136,13 @@ jobs:
- name: Extract git branch
id: git_info
run: |
echo "name=branch::$(echo ${GITHUB_BASE_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "branch=$(echo ${GITHUB_BASE_REF#refs/heads/})" >> $GITHUB_OUTPUT
- name: Resolve docker cache tag
id: docker_cache
run: |
export version_suffix=$(echo "${{ steps.git_info.outputs.branch }}" | grep -E "^[0-9]+\.[0-9]+\.x$" | tr -d '.')
export unstable_tag=$(if [ -z "$version_suffix" ]; then echo "unstable-cache"; else echo "unstable-cache-$version_suffix";fi)
echo "name=tag::$(echo $unstable_tag)" >> $GITHUB_OUTPUT
echo "tag=$(echo $unstable_tag)" >> $GITHUB_OUTPUT
- name: Generate HTML docs
run: MLRUN_DOCKER_REGISTRY=ghcr.io/ MLRUN_DOCKER_CACHE_FROM_TAG=${{ steps.docker_cache.outputs.tag }} make html-docs-dockerized
- name: Upload generated docs
Expand All @@ -163,7 +163,7 @@ jobs:
steps:
- id: resolve_base_branch
run: |
echo "name=branch::$(echo ${GITHUB_BASE_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "branch=$(echo ${GITHUB_BASE_REF#refs/heads/})" >> $GITHUB_OUTPUT
- name: Checkout PR Base (target) Branch
uses: actions/checkout@v3
with:
Expand All @@ -178,7 +178,7 @@ jobs:
run: |
export version_suffix=$(echo "${{ steps.git_info.outputs.branch }}" | grep -E "^[0-9]+\.[0-9]+\.x$" | tr -d '.')
export unstable_tag=$(if [ -z "$version_suffix" ]; then echo "unstable-cache"; else echo "unstable-cache-$version_suffix";fi)
echo "name=tag::$(echo $unstable_tag)" >> $GITHUB_OUTPUT
echo "tag=$(echo $unstable_tag)" >> $GITHUB_OUTPUT
- name: Run Backward Compatibility Tests
run: |
cd head/mlrun
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/system-tests-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@ jobs:
- name: Extract git branch
id: git_info
run: |
echo "::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/})"
echo "branch=$(echo ${GITHUB_REF#refs/heads/})"
- name: Extract git hash from action mlrun version
# by default when running as part of the CI this param doesn't get enriched meaning it will be empty.
# we want the mlrun_hash to be set from the $GITHUB_SHA when running in CI
if: ${{ github.event.inputs.test_code_from_action != 'false' }}
id: git_action_info
run: |
echo "::set-output name=mlrun_hash::$(git rev-parse --short=8 $GITHUB_SHA)"
echo "mlrun_hash=$(git rev-parse --short=8 $GITHUB_SHA)"
- name: Extract git hash from action mlrun version
if: ${{ github.event.inputs.ui_code_from_action == 'true' }}
id: git_action_ui_info
run: |
echo "::set-output name=ui_hash::$( \
echo "ui_hash=$( \
cd /tmp && \
git clone --single-branch --branch ${{ steps.git_info.outputs.branch }} https://github.com/mlrun/ui.git mlrun-ui 2> /dev/null && \
cd mlrun-ui && \
Expand All @@ -140,45 +140,45 @@ jobs:
- name: Extract git hashes from upstream and latest version
id: git_upstream_info
run: |
echo "::set-output name=mlrun_hash::$( \
echo "mlrun_hash=$( \
cd /tmp && \
git clone --single-branch --branch development https://github.com/mlrun/mlrun.git mlrun-upstream 2> /dev/null && \
cd mlrun-upstream && \
git rev-parse --short=8 HEAD && \
cd .. && \
rm -rf mlrun-upstream)"
echo "::set-output name=ui_hash::$( \
echo "ui_hash=$( \
cd /tmp && \
git clone --single-branch --branch development https://github.com/mlrun/ui.git mlrun-ui 2> /dev/null && \
cd mlrun-ui && \
git rev-parse --short=8 HEAD && \
cd .. && \
rm -rf mlrun-ui)"
echo "::set-output name=unstable_version_prefix::$(cat automation/version/unstable_version_prefix)"
echo "unstable_version_prefix=$(cat automation/version/unstable_version_prefix)"
- name: Set computed versions params
id: computed_params
run: |
action_mlrun_hash=${{ steps.git_action_info.outputs.mlrun_hash }} && \
upstream_mlrun_hash=${{ steps.git_upstream_info.outputs.mlrun_hash }} && \
export mlrun_hash=${action_mlrun_hash:-`echo $upstream_mlrun_hash`}
echo "::set-output name=mlrun_hash::$(echo $mlrun_hash)"
echo "mlrun_hash=$(echo $mlrun_hash)"
action_mlrun_ui_hash=${{ steps.git_action_ui_info.outputs.ui_hash }} && \
upstream_mlrun_ui_hash=${{ steps.git_upstream_info.outputs.ui_hash }} && \
export ui_hash=${action_mlrun_ui_hash:-`echo $upstream_mlrun_ui_hash`}
echo "::set-output name=ui_hash::$(echo $ui_hash)"
echo "::set-output name=mlrun_version::$(echo ${{ steps.git_upstream_info.outputs.unstable_version_prefix }}+$mlrun_hash)"
echo "::set-output name=mlrun_docker_tag::$(echo ${{ steps.git_upstream_info.outputs.unstable_version_prefix }}-$mlrun_hash)"
echo "::set-output name=mlrun_ui_version::${{ steps.git_upstream_info.outputs.unstable_version_prefix }}-$ui_hash"
echo "::set-output name=mlrun_docker_repo::$( \
echo "ui_hash=$(echo $ui_hash)"
echo "mlrun_version=$(echo ${{ steps.git_upstream_info.outputs.unstable_version_prefix }}+$mlrun_hash)"
echo "mlrun_docker_tag=$(echo ${{ steps.git_upstream_info.outputs.unstable_version_prefix }}-$mlrun_hash)"
echo "mlrun_ui_version=${{ steps.git_upstream_info.outputs.unstable_version_prefix }}-$ui_hash"
echo "mlrun_docker_repo=$( \
input_docker_repo=${{ github.event.inputs.docker_repo }} && \
echo ${input_docker_repo:-mlrun})"
echo "::set-output name=mlrun_docker_registry::$( \
echo "mlrun_docker_registry=$( \
input_docker_registry=${{ github.event.inputs.docker_registry }} && \
echo ${input_docker_registry:-ghcr.io/})"
echo "::set-output name=mlrun_system_tests_clean_resources::$( \
echo "mlrun_system_tests_clean_resources=$( \
input_system_tests_clean_resources=${{ github.event.inputs.clean_resources_in_teardown }} && \
echo ${input_system_tests_clean_resources:-true})"
echo "::set-output name=iguazio_version::$( \
echo "iguazio_version=$( \
override_iguazio_version=${{ github.event.inputs.override_iguazio_version }} && \
iguazio_system_version=`echo "3.4.2-b149.20220705184806"` && \
resolved_iguazio_version=${override_iguazio_version:-$iguazio_system_version} && echo $resolved_iguazio_version)"
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/system-tests-opensource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ jobs:
- name: Extract git branch
id: git_info
run: |
echo "::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/})"
echo "branch=$(echo ${GITHUB_REF#refs/heads/})"
- name: Extract git hash from action mlrun version
if: ${{ github.event.inputs.test_code_from_action == 'true' }}
id: git_action_info
run: |
echo "::set-output name=mlrun_hash::$(git rev-parse --short=8 $GITHUB_SHA)"
echo "mlrun_hash=$(git rev-parse --short=8 $GITHUB_SHA)"
- name: Extract UI git hash from action mlrun version
if: ${{ github.event.inputs.ui_code_from_action == 'true' }}
id: git_action_ui_info
run: |
echo "::set-output name=ui_hash::$( \
echo "ui_hash=$( \
cd /tmp && \
git clone --single-branch --branch ${{ steps.git_info.outputs.branch }} https://github.com/mlrun/ui.git mlrun-ui 2> /dev/null && \
cd mlrun-ui && \
Expand All @@ -107,52 +107,52 @@ jobs:
- name: Extract git hashes from upstream and latest version
id: git_upstream_info
run: |
echo "::set-output name=mlrun_hash::$( \
echo "mlrun_hash=$( \
cd /tmp && \
git clone --single-branch --branch development https://github.com/mlrun/mlrun.git mlrun-upstream 2> /dev/null && \
cd mlrun-upstream && \
git rev-parse --short=8 HEAD && \
cd .. && \
rm -rf mlrun-upstream)"
echo "::set-output name=ui_hash::$( \
echo "ui_hash=$( \
cd /tmp && \
git clone --single-branch --branch development https://github.com/mlrun/ui.git mlrun-ui 2> /dev/null && \
cd mlrun-ui && \
git rev-parse --short=8 HEAD && \
cd .. && \
rm -rf mlrun-ui)"
echo "::set-output name=unstable_version_prefix::$(cat automation/version/unstable_version_prefix)"
echo "unstable_version_prefix=$(cat automation/version/unstable_version_prefix)"
- name: Set computed versions params
id: computed_params
run: |
action_mlrun_hash=${{ steps.git_action_info.outputs.mlrun_hash }} && \
upstream_mlrun_hash=${{ steps.git_upstream_info.outputs.mlrun_hash }} && \
export mlrun_hash=${action_mlrun_hash:-`echo $upstream_mlrun_hash`}
echo "::set-output name=mlrun_hash::$(echo $mlrun_hash)"
echo "mlrun_hash=$(echo $mlrun_hash)"
action_mlrun_ui_hash=${{ steps.git_action_ui_info.outputs.ui_hash }} && \
upstream_mlrun_ui_hash=${{ steps.git_upstream_info.outputs.ui_hash }} && \
export ui_hash=${action_mlrun_ui_hash:-`echo $upstream_mlrun_ui_hash`}
echo "::set-output name=ui_hash::$(echo $ui_hash)"
echo "::set-output name=mlrun_version::$(echo ${{ steps.git_upstream_info.outputs.unstable_version_prefix }}+$mlrun_hash)"
echo "::set-output name=mlrun_docker_tag::$(echo ${{ steps.git_upstream_info.outputs.unstable_version_prefix }}-$mlrun_hash)"
echo "::set-output name=mlrun_ui_version::${{ steps.git_upstream_info.outputs.unstable_version_prefix }}-$ui_hash"
echo "::set-output name=mlrun_docker_repo::$( \
echo "ui_hash=$(echo $ui_hash)"
echo "mlrun_version=$(echo ${{ steps.git_upstream_info.outputs.unstable_version_prefix }}+$mlrun_hash)"
echo "mlrun_docker_tag=$(echo ${{ steps.git_upstream_info.outputs.unstable_version_prefix }}-$mlrun_hash)"
echo "mlrun_ui_version=${{ steps.git_upstream_info.outputs.unstable_version_prefix }}-$ui_hash"
echo "mlrun_docker_repo=$( \
input_docker_repo=${{ github.event.inputs.docker_repo }} && \
echo ${input_docker_repo:-mlrun})"
echo "::set-output name=mlrun_docker_registry::$( \
echo "mlrun_docker_registry=$( \
input_docker_registry=${{ github.event.inputs.docker_registry }} && \
echo ${input_docker_registry:-ghcr.io/})"
echo "::set-output name=mlrun_system_tests_clean_resources::$( \
echo "mlrun_system_tests_clean_resources=$( \
input_system_tests_clean_resources=${{ github.event.inputs.clean_resources_in_teardown }} && \
echo ${input_system_tests_clean_resources:-true})"
- uses: azure/setup-helm@v3
with:
version: "v3.9.1"

- uses: manusa/[email protected].1
- uses: manusa/[email protected].2
with:
minikube version: "v1.26.0"
minikube version: "v1.28.0"
kubernetes version: "v1.23.9"
driver: docker
github token: ${{ github.token }}
Expand Down

0 comments on commit e828af1

Please sign in to comment.