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

[Jupyter] Add git support to Jupyter docker image #7

Open
wants to merge 86 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
7c87c61
[Utils] Fix missing logs on failure to add git metadata (#3810)
alonmr Jun 25, 2023
df407d2
[Feature Store] Online Vector with relations between different featur…
davesh0812 Jun 26, 2023
bd18ff8
[Authz] Revert OPA `hub` path to `marketplace` (#3820)
theSaarco Jun 26, 2023
07c451f
[Notifications] Fix notification failed when no condition defined (#3…
yaelgen Jun 26, 2023
7019f2b
[Notifications] Fix git notification params going to message instead …
quaark Jun 26, 2023
7fb3b47
[Images/Models] Override base image (#3822)
alonmr Jun 26, 2023
24cf2e2
[Requirements] Bump pydantic (#3821)
alonmr Jun 26, 2023
8c174da
[API] Tweak create project flow (#3816)
liranbg Jun 26, 2023
d42bb52
[Notifications] Add methods to edit and remove notifications in pipel…
quaark Jun 26, 2023
1ee4330
[Workflows] Fix fields being set to misleading value when setting wor…
yaelgen Jun 26, 2023
b551fde
[DevEnv] Added pycharm MLRun API run configuration (#3824)
liranbg Jun 26, 2023
0e36742
[Project] Add option to enrich project on load from project_setup.py …
yaronha Jun 27, 2023
bcc653f
[Docs] Add CI-CD automation with Git (#3640)
jillnogold Jun 27, 2023
36f1407
[Notifications] Fix secret unmasking fails the whole notification mec…
quaark Jun 27, 2023
38fefc1
[Requirements] Bump nuclio-jupyter to 0.9.11 (#3825)
TomerShor Jun 27, 2023
e5ba2a4
[Feature Store] Fix get offline result when the source of the feature…
davesh0812 Jun 27, 2023
4caea58
[Render] Remove redundant quote replacement (#3829)
alonmr Jun 27, 2023
c2fdaf0
[Feature Set] On feture-set creation from UI, fix missing "engine typ…
tomerm-iguazio Jun 27, 2023
7cbed10
[Workflows] Add validation and error message for invalid workflow set…
yaelgen Jun 27, 2023
99de46a
[CI] Add pytest.ini to adhere new pytest conventions (#3830)
liranbg Jun 27, 2023
3bb1604
[Pipelines] Support passing pipeline param to function spec resources…
Tankilevitch Jun 28, 2023
c23a74d
[Artifact] Fix enriching suffixes (#3832)
liranbg Jun 28, 2023
ceedf20
[CI] Fix deleting devutils namespace (#3834)
eliyahu77 Jun 28, 2023
a0777d5
Revert "[Workflows] Add validation and error message for invalid work…
liranbg Jun 28, 2023
fe68dfb
[CI] Prep work for feature branch release (#3833)
liranbg Jun 28, 2023
686a41f
[Events] Change default events mode to `disabled` and bump `igz-mgmt~…
Tankilevitch Jun 28, 2023
487c80e
[CI] Fix system test system deletion (#3836)
liranbg Jun 29, 2023
2d4e60f
[Package] Add special handling for Python 3.7 (#3838)
guy1992l Jun 29, 2023
116883f
[Notifications] Add default values and validation to notifications (#…
yaelgen Jun 29, 2023
f4a02ff
[Function] Add waitReadinessTimeoutBeforeFailure parameter to nuclio …
Yacouby Jun 29, 2023
81310f1
[CI] Dynamically enrich env-vars for system tests (#3841)
liranbg Jun 29, 2023
8db5f15
[DOCS] Update Grafana configuration for model monitoring dashboards (…
Eyal-Danieli Jun 29, 2023
2f64371
[Feature Store] Fix passing `with _index` to `RemoteVectorResponse` &…
davesh0812 Jun 29, 2023
44ef1d1
[Workflows] Fix workflow message notification inconsistency (#3847)
yaelgen Jun 29, 2023
0264b6c
[CI] Fix prepare.py typos (#3848)
liranbg Jun 29, 2023
6d6c14a
[requirements] Bump v3io package to 0.5.21 (#3849)
assaf758 Jun 30, 2023
7fd637c
[CI] Fix system test env file suffix (#3850)
liranbg Jun 30, 2023
4faf5c8
[Artifacts] Fix resolving target path in artifacts html (#3828)
alonmr Jul 2, 2023
f2c6b4e
[Docs] update MLRun installation (#3845)
jillnogold Jul 2, 2023
6d1929f
[CI] Add options to github workflow manual dispatches (#3856)
Tankilevitch Jul 2, 2023
97de6cb
[Artifacts] Fix list artifacts `name` docstring (#3855)
alonmr Jul 2, 2023
8b5593b
[Frameworks] Support SciKit-Learn 1.3 deprecated normalize (#3858)
guy1992l Jul 2, 2023
3f7fc93
[Project] Refactor load project with sync functions (#3853)
alonmr Jul 2, 2023
75dbe30
[CI] Prepare for feature release (#3852)
liranbg Jul 2, 2023
2b8053e
[CI] Introducing workflow reuse (#3860)
liranbg Jul 3, 2023
25e5969
[CI] Login to registries anyway (#3866)
liranbg Jul 3, 2023
10bf7c3
[Feature Store] Fix `feature_set.to_dataframe` when passthrough is Tr…
davesh0812 Jul 4, 2023
64c05dd
[Feature Store] Fix ingest from UI with `passthrough=True` and no tar…
gtopper Jul 4, 2023
8c4402d
[Artifacts] Fix register artifacts overrides old artifacts (#3862)
alonmr Jul 4, 2023
800df65
[Project] Add pipeline runs deletion to project deletion cascade flow…
Tankilevitch Jul 4, 2023
9025ea6
[Data Source] Fix local retrievel when using time filter on chunked s…
davesh0812 Jul 4, 2023
ee2882b
[Workflows] Add validation and error message for invalid workflow set…
yaelgen Jul 4, 2023
e5c9862
[Model Monitoring] Update sklearn pre-trained model file for system t…
Eyal-Danieli Jul 5, 2023
b47ff70
[Notifications] Fix Getting Git notification issue from GitHub event …
quaark Jul 5, 2023
99a954e
[Tests] Fix `test_get_offline_features_with_spark_engine` (#3882)
gtopper Jul 5, 2023
945e9b6
[Notifications] Fix workflow notifications not sending as expected (…
yaelgen Jul 5, 2023
dd67681
[Docs] Adding mlrun.serving.states.BaseStep (to, error_handler) to ap…
davesh0812 Jul 5, 2023
f6687a5
[CLI] Get artifacts - return the URI of the artifact (#3868)
Yacouby Jul 5, 2023
4f1e41c
[CI] Enrich envvars with dev utils outputs (#3885)
liranbg Jul 5, 2023
9e9e7f7
[Audit] Refine audit event descriptions (#3886)
liranbg Jul 6, 2023
11aae0b
[Feature Store] Fix `get_offline_features` with passthrough `BigQuery…
gtopper Jul 6, 2023
066bc79
[CI] Fix release not using inputs (#3891)
liranbg Jul 6, 2023
e263559
[Version] Bump development to 1.5.0 (#3893)
liranbg Jul 7, 2023
ce3fef7
[Tests] Add fixture to change the working directory for tests (#3884)
yaelgen Jul 7, 2023
6fc3c1b
[API] Move `resolve_nuclio_version` to API (#3879)
alonmr Jul 7, 2023
0f777c3
[Runtimes] Remove redundant imports (#3877)
Tankilevitch Jul 7, 2023
ba7185e
[DB] Move `run_time_fmt` to utils (#3874)
alonmr Jul 7, 2023
692089e
[Function] Reduce amount of storing to the DB on `/build/status` endp…
Tankilevitch Jul 7, 2023
d657e9b
[CI] Introducing feature branch (#3869)
liranbg Jul 7, 2023
3afd926
[Tests] Remove in memory SQLDB fixture (#3875)
alonmr Jul 7, 2023
4790e67
[Docs] Fix slack badge (#3896)
theSaarco Jul 9, 2023
3c07734
[Model Monitoring] Fix predictions and latency calculations in monito…
Eyal-Danieli Jul 9, 2023
613a4a7
[Tests] Fix example URL (#3899)
gtopper Jul 9, 2023
33cba84
[Projects] Fix type hinting getting overriding class (#3895)
liranbg Jul 9, 2023
d01ae51
[Events] Fix emitting deleted secret event on 404 (#3890)
alonmr Jul 9, 2023
0cb4c0c
[Docs] Update info about requests/limits and workers (#3898)
george0st Jul 9, 2023
6060592
[Feature Store] Fix `get_online_feature_service` for "Viewer" user us…
davesh0812 Jul 9, 2023
2c8938b
[Automation] Enable mlrun audit events for system tests (#3902)
alonmr Jul 9, 2023
4f86d91
[Launcher] Fix overriding hints with import substitutions (#3901)
alonmr Jul 9, 2023
d4b6b6f
[Function] Add **kwargs to remote function invoke method (#3872)
GiladShapira94 Jul 9, 2023
eca61d8
[CI] Add import-linter verification (#3905)
alonmr Jul 9, 2023
d926a74
[Release] Enhance resolving next version (#3906)
liranbg Jul 10, 2023
3e97861
[Requirements] Bump storey to 1.4.4 (#3909)
gtopper Jul 10, 2023
c79e15f
[Datastore] Add DBFSStore (#3626)
tomerm-iguazio Jul 10, 2023
9e8e388
[Feature Store] Persist Spark dataframe in `ingest` to improve perfor…
gtopper Jul 10, 2023
a8027eb
add git support to jupyter image
yaronha Jul 11, 2023
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
196 changes: 196 additions & 0 deletions .github/workflows/build-internal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
# Copyright 2023 Iguazio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Build (internal)

run-name: Building ${{ inputs.version }} ${{ github.ref_name }}

permissions:

# Allow the action to upload images to ghcr
packages: write

on:

# FYI
# The event payload in the called workflow is the same event payload from the calling workflow
# The inputs are the inputs defined in the called workflow (by the "with")
workflow_call:
inputs:
docker_registries:
description: 'Comma separated list of docker registries to push images to (default: ghcr.io/, use registry.hub.docker.com/ for docker hub)'
default: 'ghcr.io/'
type: string
docker_repo:
description: 'Docker repo to push images to (default: lowercase github repository owner name)'
default: ''
type: string
version:
description: 'The version to build, without prefix v (e.g. 1.1.0), if not provided version will be <unstable-version-prefix>-<commit-hash>, where <unstable-version-prefix> is taken from automation/version/unstable_version_prefix'
default: ''
type: string
skip_images:
description: 'Comma separated list of images to skip building, example with all possible images: mlrun,api,base,models,models-gpu,jupyter,test'
default: ''
type: string
build_from_cache:
description: 'Whether to build images from cache or not. Default: true, set to false only if required because that will cause a significant increase in build time'
default: 'true'
type: string

jobs:
matrix_prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- id: set-matrix
uses: ./.github/actions/image-matrix-prep
with:
skip_images: ${{ inputs.skip_images }}

build-images:
name: Build and push image - ${{ matrix.image-name }} (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
needs: matrix_prep
strategy:
fail-fast: false
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
steps:
- uses: actions/checkout@v3

# since github-actions gives us 14G only, and fills it up with some garbage
- name: Freeing up disk space
run: |
"${GITHUB_WORKSPACE}/automation/scripts/github_workflow_free_space.sh"

- name: Install curl and jq
run: sudo apt-get install curl jq

- name: Extract git hash, ref and latest version
id: git_info
run: |
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 "$INPUT_BUILD_FROM_CACHE" ]; then echo "true" ; else echo "$INPUT_BUILD_FROM_CACHE";fi);
export no_cache=$(if [ "$build_from_cache" = "false" ]; then echo "true" ; else echo "";fi);
echo "tag=$(echo $unstable_tag)" >> $GITHUB_OUTPUT
echo "no_cache=$(echo $no_cache)" >> $GITHUB_OUTPUT
env:
INPUT_BUILD_FROM_CACHE: ${{ inputs.build_from_cache }}

- name: Set computed versions params
id: computed_params
run: |
echo "mlrun_version=$( \
input_mlrun_version=$INPUT_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`})" >> $GITHUB_OUTPUT
echo "mlrun_docker_repo=$( \
input_docker_repo=$INPUT_DOCKER_VERSION && \
default_docker_repo=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') && \
echo ${input_docker_repo:-`echo $default_docker_repo`})" >> $GITHUB_OUTPUT
echo "mlrun_docker_registries=$( \
input_docker_registries=$INPUT_DOCKER_REGISTRIES && \
echo ${input_docker_registries:-ghcr.io/})" >> $GITHUB_OUTPUT
echo "mlrun_cache_date=$(date +%s)" >> $GITHUB_OUTPUT
env:
INPUT_VERSION: ${{ inputs.version }}
INPUT_DOCKER_VERSION: ${{ inputs.docker_repo }}
INPUT_DOCKER_REGISTRIES: ${{ inputs.docker_registries }}

- name: Docker login (ghcr)
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker login (quay.io)
continue-on-error: true
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_IO_DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.QUAY_IO_DOCKER_REGISTRY_PASSWORD }}

- name: Docker login (docker.com)
continue-on-error: true
uses: docker/login-action@v2
with:
registry: registry.hub.docker.com
username: ${{ secrets.DOCKER_HUB_DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_HUB_DOCKER_REGISTRY_PASSWORD }}

- name: Pull cache, build and push image

# we don't really want per-commit test image we just want to build and push the cache image so CI will be able
# to use it and run much faster
if: ${{ matrix.image-name != 'test' }}
run: |
for registry in $(echo ${{ steps.computed_params.outputs.mlrun_docker_registries }} | sed "s/,/ /g"); \
do \
MLRUN_CACHE_DATE=${{ steps.computed_params.outputs.mlrun_cache_date }} \
MLRUN_DOCKER_REGISTRY=$registry \
MLRUN_DOCKER_CACHE_FROM_REGISTRY=ghcr.io/ \
MLRUN_DOCKER_REPO=${{ steps.computed_params.outputs.mlrun_docker_repo }} \
MLRUN_VERSION=${{ steps.computed_params.outputs.mlrun_version }} \
MLRUN_DOCKER_CACHE_FROM_TAG=${{ steps.docker_cache.outputs.tag }} \
MLRUN_NO_CACHE=${{ steps.docker_cache.outputs.no_cache }} \
MLRUN_PUSH_DOCKER_CACHE_IMAGE="true" \
MLRUN_PYTHON_VERSION=${{ matrix.python-version }} \
INCLUDE_PYTHON_VERSION_SUFFIX=${{ matrix.include-suffix }} \
make push-${{ matrix.image-name }}; \
done;

- name: Build and push unstable tag

# we don't need to have unstable tag for the test image
# And we don't need to run this when triggered manually (workflow dispatch)
if: matrix.image-name != 'test' && github.event_name != 'workflow_dispatch' && github.ref_name == 'development'
run: |
for registry in "ghcr.io/" "quay.io/" "registry.hub.docker.com/"; \
do \
MLRUN_CACHE_DATE=${{ steps.computed_params.outputs.mlrun_cache_date }} \
MLRUN_DOCKER_REGISTRY=$registry \
MLRUN_DOCKER_CACHE_FROM_REGISTRY=ghcr.io/ \
MLRUN_DOCKER_REPO=${{ steps.computed_params.outputs.mlrun_docker_repo }} \
MLRUN_VERSION=unstable \
MLRUN_DOCKER_CACHE_FROM_TAG=${{ steps.docker_cache.outputs.tag }} \
MLRUN_PYTHON_VERSION=${{ matrix.python-version }} \
INCLUDE_PYTHON_VERSION_SUFFIX=${{ matrix.include-suffix }} \
make push-${{ matrix.image-name }}; \
done;
- name: Pull cache, build and push test image
# When version is given we're probably in a release process, we don't need the test image in that case
if: matrix.image-name == 'test' && inputs.version == ''
run: |
MLRUN_CACHE_DATE=${{ steps.computed_params.outputs.mlrun_cache_date }} \
MLRUN_DOCKER_REGISTRY=ghcr.io/ \
MLRUN_DOCKER_CACHE_FROM_REGISTRY=ghcr.io/ \
MLRUN_DOCKER_REPO=${{ steps.computed_params.outputs.mlrun_docker_repo }} \
MLRUN_VERSION=${{ steps.docker_cache.outputs.tag }} \
MLRUN_DOCKER_CACHE_FROM_TAG=${{ steps.docker_cache.outputs.tag }} \
MLRUN_PUSH_DOCKER_CACHE_IMAGE=true \
MLRUN_PYTHON_VERSION=${{ matrix.python-version }} \
INCLUDE_PYTHON_VERSION_SUFFIX=${{ matrix.include-suffix }} \
make push-${{ matrix.image-name }}
152 changes: 21 additions & 131 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

# This name is referenced in the release.yaml workflow, if you're changing here - change there
name: Build

run-name: Building ${{ inputs.version }} ${{ github.ref_name }}

permissions:

# Allow the action to upload images to ghcr
packages: write

on:
push:
branches:
Expand Down Expand Up @@ -44,137 +51,20 @@ on:
description: 'Whether to build images from cache or not. Default: true, set to false only if required because that will cause a significant increase in build time'
required: true
default: 'true'
type: choice
options:
- 'true'
- 'false'

jobs:
matrix_prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- id: set-matrix
uses: ./.github/actions/image-matrix-prep
with:
skip_images: ${{ github.event.inputs.skip_images }}

build-images:
name: Build and push image - ${{ matrix.image-name }} (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
needs: matrix_prep

# let's not run this on every fork, change to your fork when developing
build-mlrun:
if: github.repository == 'mlrun/mlrun' || github.event_name == 'workflow_dispatch'

strategy:
fail-fast: false
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
steps:
- uses: actions/checkout@v3

# since github-actions gives us 14G only, and fills it up with some garbage
- name: Freeing up disk space
run: |
"${GITHUB_WORKSPACE}/automation/scripts/github_workflow_free_space.sh"

- name: Install curl and jq
run: sudo apt-get install curl jq
- name: Extract git hash, ref and latest version
id: git_info
run: |
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 "$INPUT_BUILD_FROM_CACHE" ]; then echo "true" ; else echo "$INPUT_BUILD_FROM_CACHE";fi);
export no_cache=$(if [ "$build_from_cache" = "false" ]; then echo "true" ; else echo "";fi);
echo "tag=$(echo $unstable_tag)" >> $GITHUB_OUTPUT
echo "no_cache=$(echo $no_cache)" >> $GITHUB_OUTPUT
env:
INPUT_BUILD_FROM_CACHE: ${{ github.event.inputs.build_from_cache }}
- name: Set computed versions params
id: computed_params
run: |
echo "mlrun_version=$( \
input_mlrun_version=$INPUT_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`})" >> $GITHUB_OUTPUT
echo "mlrun_docker_repo=$( \
input_docker_repo=$INPUT_DOCKER_VERSION && \
default_docker_repo=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') && \
echo ${input_docker_repo:-`echo $default_docker_repo`})" >> $GITHUB_OUTPUT
echo "mlrun_docker_registries=$( \
input_docker_registries=$INPUT_DOCKER_REGISTRIES && \
echo ${input_docker_registries:-ghcr.io/})" >> $GITHUB_OUTPUT
echo "mlrun_cache_date=$(date +%s)" >> $GITHUB_OUTPUT
env:
INPUT_VERSION: ${{ github.event.inputs.version }}
INPUT_DOCKER_VERSION: ${{ github.event.inputs.docker_repo }}
INPUT_DOCKER_REGISTRIES: ${{ github.event.inputs.docker_registries }}
- name: Docker login
# all suffixed with "| true" to allow failures if secrets are not defined (fork)
run: |
echo ${{ secrets.GHCR_DOCKER_REGISTRY_PASSWORD }} | \
docker login ghcr.io -u ${{ secrets.GHCR_DOCKER_REGISTRY_USERNAME }} --password-stdin | true
echo ${{ secrets.DOCKER_HUB_DOCKER_REGISTRY_PASSWORD }} | \
docker login registry.hub.docker.com -u ${{ secrets.DOCKER_HUB_DOCKER_REGISTRY_USERNAME }} \
--password-stdin | true
echo ${{ secrets.QUAY_IO_DOCKER_REGISTRY_PASSWORD }} | \
docker login quay.io -u ${{ secrets.QUAY_IO_DOCKER_REGISTRY_USERNAME }} \
--password-stdin | true

- name: Pull cache, build and push image

# we don't really want per-commit test image we just want to build and push the cache image so CI will be able
# to use it and run much faster
if: ${{ matrix.image-name != 'test' }}
run: |
for registry in $(echo ${{ steps.computed_params.outputs.mlrun_docker_registries }} | sed "s/,/ /g"); \
do \
MLRUN_CACHE_DATE=${{ steps.computed_params.outputs.mlrun_cache_date }} \
MLRUN_DOCKER_REGISTRY=$registry \
MLRUN_DOCKER_CACHE_FROM_REGISTRY=ghcr.io/ \
MLRUN_DOCKER_REPO=${{ steps.computed_params.outputs.mlrun_docker_repo }} \
MLRUN_VERSION=${{ steps.computed_params.outputs.mlrun_version }} \
MLRUN_DOCKER_CACHE_FROM_TAG=${{ steps.docker_cache.outputs.tag }} \
MLRUN_NO_CACHE=${{ steps.docker_cache.outputs.no_cache }} \
MLRUN_PUSH_DOCKER_CACHE_IMAGE="true" \
MLRUN_PYTHON_VERSION=${{ matrix.python-version }} \
INCLUDE_PYTHON_VERSION_SUFFIX=${{ matrix.include-suffix }} \
make push-${{ matrix.image-name }}; \
done;

- name: Build and push unstable tag

# we don't need to have unstable tag for the test image
# And we don't need to run this when triggered manually (workflow dispatch)
if: matrix.image-name != 'test' && github.event_name != 'workflow_dispatch' && github.ref_name == 'development'
run: |
for registry in "ghcr.io/" "quay.io/" "registry.hub.docker.com/"; \
do \
MLRUN_CACHE_DATE=${{ steps.computed_params.outputs.mlrun_cache_date }} \
MLRUN_DOCKER_REGISTRY=$registry \
MLRUN_DOCKER_CACHE_FROM_REGISTRY=ghcr.io/ \
MLRUN_DOCKER_REPO=${{ steps.computed_params.outputs.mlrun_docker_repo }} \
MLRUN_VERSION=unstable \
MLRUN_DOCKER_CACHE_FROM_TAG=${{ steps.docker_cache.outputs.tag }} \
MLRUN_PYTHON_VERSION=${{ matrix.python-version }} \
INCLUDE_PYTHON_VERSION_SUFFIX=${{ matrix.include-suffix }} \
make push-${{ matrix.image-name }}; \
done;
- name: Pull cache, build and push test image
# When version is given we're probably in a release process, we don't need the test image in that case
if: matrix.image-name == 'test' && github.event.inputs.version == ''
run: |
MLRUN_CACHE_DATE=${{ steps.computed_params.outputs.mlrun_cache_date }} \
MLRUN_DOCKER_REGISTRY=ghcr.io/ \
MLRUN_DOCKER_CACHE_FROM_REGISTRY=ghcr.io/ \
MLRUN_DOCKER_REPO=${{ steps.computed_params.outputs.mlrun_docker_repo }} \
MLRUN_VERSION=${{ steps.docker_cache.outputs.tag }} \
MLRUN_DOCKER_CACHE_FROM_TAG=${{ steps.docker_cache.outputs.tag }} \
MLRUN_PUSH_DOCKER_CACHE_IMAGE=true \
MLRUN_PYTHON_VERSION=${{ matrix.python-version }} \
INCLUDE_PYTHON_VERSION_SUFFIX=${{ matrix.include-suffix }} \
make push-${{ matrix.image-name }}
name: Build MLRun
uses: ./.github/workflows/build-internal.yaml
with:
docker_registries: ${{ github.event.inputs.docker_registries }}
docker_repo: ${{ github.event.inputs.docker_repo }}
version: ${{ needs.prepare-inputs.outputs.version }}
skip_images: ${{ github.event.inputs.skip_images }}
build_from_cache: ${{ github.event.inputs.build_from_cache }}
secrets: inherit
7 changes: 4 additions & 3 deletions .github/workflows/periodic-rebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ on:

jobs:
re-build-images:
# let's not run this on every fork, change to your fork when developing
if: github.repository == 'mlrun/mlrun' || github.event_name == 'workflow_dispatch'
if: github.repository == 'mlrun/mlrun'
strategy:
fail-fast: false
matrix:
repo: ["mlrun","ui"]
branch: ["development","1.3.x"]
branch: ["development","1.4.x", "1.3.x"]
runs-on: ubuntu-latest
steps:

# TODO: move to reuseable workflow once all branches have backported with the new workflow
- name: Re-Build MLRun Image
if: matrix.repo == 'mlrun'
uses: convictional/[email protected]
Expand Down
Loading
Loading