Message ID | 20231122132847.118673-4-amusil@redhat.com |
---|---|
State | Superseded |
Headers | show |
Series | Allow to use different container images per branch | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | success | github build: passed |
On 11/22/23 14:28, Ales Musil wrote: > Add more conditions to the image prepare process. > This allows us to test the prebuilt images for both > Fedora and Ubuntu. > > Run the weekly image on main branch with the > use of Fedora for the weekly runs. > > Reported-at: https://issues.redhat.com/browse/FDP-149 > Signed-off-by: Ales Musil <amusil@redhat.com> > --- > .github/workflows/test.yml | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml > index fdbc8f5f5..60afcba77 100644 > --- a/.github/workflows/test.yml > +++ b/.github/workflows/test.yml > @@ -95,10 +95,25 @@ jobs: > - name: Install dependencies > run: sudo apt install -y ${{ env.DEPENDENCIES }} > Can we add a comment at the top of the workflow file explaining what runs where and triggered by what event? It could also be a separate patch but now that we're changing things it might make sense to properly document it. Otherwise, looks good to me, thanks! > + - name: Choose image distro > + if: github.event_name == 'push' || github.event_name == 'pull_request' > + run: | > + echo "IMAGE_DISTRO=ubuntu" >> $GITHUB_ENV > + > + - name: Choose image distro > + if: github.event_name == 'schedule' > + run: | > + echo "IMAGE_DISTRO=fedora" >> $GITHUB_ENV > + > - name: Build container > - run: make ubuntu > + if: github.ref_name != 'main' > + run: make ${{ env.IMAGE_DISTRO }} > working-directory: utilities/containers > > + - name: Download container > + if: github.ref_name == 'main' > + run: podman pull ghcr.io/ovn-org/ovn-tests:${{ env.IMAGE_DISTRO }} > + > - name: Export image > run: podman save -o /tmp/image.tar ovn-org/ovn-tests >
On Thu, Nov 23, 2023 at 11:15 AM Dumitru Ceara <dceara@redhat.com> wrote: > On 11/22/23 14:28, Ales Musil wrote: > > Add more conditions to the image prepare process. > > This allows us to test the prebuilt images for both > > Fedora and Ubuntu. > > > > Run the weekly image on main branch with the > > use of Fedora for the weekly runs. > > > > Reported-at: https://issues.redhat.com/browse/FDP-149 > > Signed-off-by: Ales Musil <amusil@redhat.com> > > --- > > .github/workflows/test.yml | 17 ++++++++++++++++- > > 1 file changed, 16 insertions(+), 1 deletion(-) > > > > diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml > > index fdbc8f5f5..60afcba77 100644 > > --- a/.github/workflows/test.yml > > +++ b/.github/workflows/test.yml > > @@ -95,10 +95,25 @@ jobs: > > - name: Install dependencies > > run: sudo apt install -y ${{ env.DEPENDENCIES }} > > > > Can we add a comment at the top of the workflow file explaining what > runs where and triggered by what event? It could also be a separate > patch but now that we're changing things it might make sense to properly > document it. > > Otherwise, looks good to me, thanks! > Thank you for the review, I've added a comment in v3. > > > + - name: Choose image distro > > + if: github.event_name == 'push' || github.event_name == > 'pull_request' > > + run: | > > + echo "IMAGE_DISTRO=ubuntu" >> $GITHUB_ENV > > + > > + - name: Choose image distro > > + if: github.event_name == 'schedule' > > + run: | > > + echo "IMAGE_DISTRO=fedora" >> $GITHUB_ENV > > + > > - name: Build container > > - run: make ubuntu > > + if: github.ref_name != 'main' > > + run: make ${{ env.IMAGE_DISTRO }} > > working-directory: utilities/containers > > > > + - name: Download container > > + if: github.ref_name == 'main' > > + run: podman pull ghcr.io/ovn-org/ovn-tests:${{ > <http://ghcr.io/ovn-org/ovn-tests:$%7B%7B> env.IMAGE_DISTRO }} > > + > > - name: Export image > > run: podman save -o /tmp/image.tar ovn-org/ovn-tests > > > > Thanks, Ales
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fdbc8f5f5..60afcba77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,10 +95,25 @@ jobs: - name: Install dependencies run: sudo apt install -y ${{ env.DEPENDENCIES }} + - name: Choose image distro + if: github.event_name == 'push' || github.event_name == 'pull_request' + run: | + echo "IMAGE_DISTRO=ubuntu" >> $GITHUB_ENV + + - name: Choose image distro + if: github.event_name == 'schedule' + run: | + echo "IMAGE_DISTRO=fedora" >> $GITHUB_ENV + - name: Build container - run: make ubuntu + if: github.ref_name != 'main' + run: make ${{ env.IMAGE_DISTRO }} working-directory: utilities/containers + - name: Download container + if: github.ref_name == 'main' + run: podman pull ghcr.io/ovn-org/ovn-tests:${{ env.IMAGE_DISTRO }} + - name: Export image run: podman save -o /tmp/image.tar ovn-org/ovn-tests
Add more conditions to the image prepare process. This allows us to test the prebuilt images for both Fedora and Ubuntu. Run the weekly image on main branch with the use of Fedora for the weekly runs. Reported-at: https://issues.redhat.com/browse/FDP-149 Signed-off-by: Ales Musil <amusil@redhat.com> --- .github/workflows/test.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)