Skip to content

Commit

Permalink
upd(workflows): Upload to DockerHub and stop building arc/clang
Browse files Browse the repository at this point in the history
1)Upload images also to DockerHub as mirror.
2)Do not build arc with clang, clang dont have this arch.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
  • Loading branch information
nuclearcat committed Jan 20, 2025
1 parent 29ecb1b commit f2a5208
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ jobs:
'clang-17 kselftest kernelci',
'gcc-12 kselftest kernelci'
]
exclude:
- kciarch: 'arc'
kcicmd: 'clang-15 kselftest kernelci'
- kciarch: 'arc'
kcicmd: 'clang-17 kselftest kernelci'
- kciarch: 'arc'
# only selected people can trigger this job
if: contains('["nuclearcat","JenySadadia","a-wai","broonie","laura-nao"]', github.actor)
runs-on: ubuntu-22.04
Expand All @@ -50,8 +56,13 @@ jobs:
cd kernelci-core
python3 -m pip install '.[dev]'
sudo cp -R config /etc/kernelci/
- name: Login to the DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -64,6 +75,8 @@ jobs:
export core_url=$(git remote get-url origin)
kci_arg="build --push --build-arg core_rev=$core_rev --prefix=ghcr.io/kernelci/ --build-arg core_url=$core_url"
./kci docker $kci_arg ${{ matrix.kcicmd }} --arch ${{ matrix.kciarch }}
kci_arg="build --push --build-arg core_rev=$core_rev --prefix=kernelci/ --build-arg core_url=$core_url"
./kci docker $kci_arg ${{ matrix.kcicmd }} --arch ${{ matrix.kciarch }}
- name: build base kernelci docker image for other branches
if: ${{ env.USER_GIT_BRANCH != 'main' }}
run: |
Expand All @@ -73,6 +86,8 @@ jobs:
echo "core_rev=$core_rev core_url=$core_url"
kci_arg="build --push --verbose --build-arg core_rev=$core_rev --prefix=ghcr.io/kernelci/staging- --build-arg core_url=$core_url"
./kci docker $kci_arg ${{ matrix.kcicmd }} --arch ${{ matrix.kciarch }}
kci_arg="build --push --verbose --build-arg core_rev=$core_rev --prefix=kernelci/staging- --build-arg core_url=$core_url"
./kci docker $kci_arg ${{ matrix.kcicmd }} --arch ${{ matrix.kciarch }}
docker-misc-build:
strategy:
Expand All @@ -87,7 +102,6 @@ jobs:
'kernelci lava-callback',
'k8s kernelci',
'qemu',

]
# only selected people can trigger this job
if: contains('["nuclearcat","JenySadadia","a-wai","broonie","laura-nao"]', github.actor)
Expand Down Expand Up @@ -124,8 +138,13 @@ jobs:
cd kernelci-core
python3 -m pip install '.[dev]'
sudo cp -R config /etc/kernelci/
- name: Login to the DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: kernelci
Expand All @@ -143,6 +162,8 @@ jobs:
rev_arg="--build-arg core_rev=$core_rev --build-arg api_rev=$api_rev --build-arg pipeline_rev=$pipeline_rev"
kci_arg="build --push $rev_arg --prefix=ghcr.io/kernelci/"
./kci docker $kci_arg ${{ matrix.kcicmd }}
kci_arg="build --push $rev_arg --prefix=kernelci/"
./kci docker $kci_arg ${{ matrix.kcicmd }}
- name: build base kernelci docker image for other branches
if: ${{ env.USER_GIT_BRANCH != 'main' }}
run: |
Expand All @@ -155,4 +176,6 @@ jobs:
cd ../kernelci-core
rev_arg="--build-arg core_rev=$core_rev --build-arg api_rev=$api_rev --build-arg pipeline_rev=$pipeline_rev"
kci_arg="build --push $rev_arg --prefix=ghcr.io/kernelci/staging-"
./kci docker $kci_arg ${{ matrix.kcicmd }}
./kci docker $kci_arg ${{ matrix.kcicmd }}
kci_arg="build --push $rev_arg --prefix=kernelci/staging-"
./kci docker $kci_arg ${{ matrix.kcicmd }}
2 changes: 1 addition & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:

jobs:
call-docker-build:
# needs: prepare-staging-branches
uses: ./.github/workflows/docker_images.yml
with:
GIT_OWNER: 'kernelci'
GIT_BRANCH: 'main'
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ jobs:
with:
GIT_OWNER: 'kernelci'
GIT_BRANCH: 'staging-snapshot'
secrets: inherit

0 comments on commit f2a5208

Please sign in to comment.