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

Use dev branches for immucore and kairos-agent #1497

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .github/workflows/bump_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Bump cos 🔧
run: earthly +bump-repositories
- name: Create Pull Request
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/image-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set compression for PR
if: ${{ github.event_name == 'pull_request' }}
run: |
Expand Down Expand Up @@ -200,6 +205,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: docker/setup-qemu-action@master
Expand Down
72 changes: 70 additions & 2 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build PR 🔧
if: ${{ github.event_name == 'pull_request' }}
env:
Expand Down Expand Up @@ -170,6 +175,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build framework image 🔧
env:
FLAVOR: ${{ matrix.flavor }}
Expand Down Expand Up @@ -268,6 +278,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: |
ls -liah
export ISO=$PWD/$(ls *.iso)
Expand All @@ -277,7 +292,7 @@ jobs:
qemu-acceptance-tests:
needs:
- build
runs-on: ubuntu-latest
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
Expand All @@ -302,9 +317,37 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- run: |
# install qemu-system-x86_64 and qemu-img
sudo apt update
sudo apt install -y qemu-system-x86 qemu-utils qemu-kvm acl

# Allow the "runner" user to access /dev/kvm
# Might not be the best solution but adding to the kvm group didn't work
# https://askubuntu.com/a/1081326
sudo setfacl -m u:runner:rwx /dev/kvm

earthly +datasource-iso --CLOUD_CONFIG=tests/assets/autoinstall.yaml
earthly +run-qemu-datasource-tests --PREBUILT_ISO=$(ls *.iso) --FLAVOR=${{ matrix.flavor }} --SSH_PORT=${{ matrix.port }}
earthly +iso --FLAVOR=${{ matrix.flavor }}
export KVM=true
export DATASOURCE=$PWD/build/datasource.iso
export CLOUD_INIT=$PWD/tests/assets/autoinstall.yaml
export ISO="$PWD/build/$(ls *.iso)"
export USE_QEMU=true
export CREATE_VM=true
export FLAVOR=${{ matrix.flavor }}

go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
ginkgo -v --label-filter=autoinstall-test -v tests/
qemu-bundles-tests:
needs:
- build
Expand All @@ -327,6 +370,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- env:
KVM: true
run: |
Expand Down Expand Up @@ -368,6 +416,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- env:
KVM: true
run: |
Expand Down Expand Up @@ -406,6 +459,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: |
earthly -P +run-qemu-netboot-test --TEST_SUITE=netboot-test --FLAVOR=${{ matrix.flavor }}
upgrade-with-cli-test:
Expand Down Expand Up @@ -463,6 +521,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: |
earthly +run-qemu-test --PREBUILT_ISO=$(ls *.iso) \
--FLAVOR=${{ matrix.flavor }} \
Expand Down Expand Up @@ -535,6 +598,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: |
earthly +run-qemu-test --PREBUILT_ISO=$(ls kairos-${{matrix.flavor}}-*.iso) \
--FLAVOR=${{ matrix.flavor }} \
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/release-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ jobs:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Login to DockerHub
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Quay
uses: docker/login-action@v2
with:
registry: quay.io
Expand Down Expand Up @@ -184,6 +189,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Quay Registry
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io
- name: Build 🔧
Expand Down Expand Up @@ -125,6 +130,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build 🔧
if: startsWith(github.ref, 'refs/tags/')
env:
Expand Down Expand Up @@ -187,6 +197,11 @@ jobs:
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build uki image 🔧
run: |
# Do fedora as its the smaller uki possible
Expand Down
8 changes: 4 additions & 4 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -306,17 +306,17 @@ base-image:
END

# TEST KAIROS-AGENT FROM BRANCH
ARG KAIROS_AGENT_DEV
ARG KAIROS_AGENT_DEV_BRANCH=main
ARG KAIROS_AGENT_DEV=true
ARG KAIROS_AGENT_DEV_BRANCH=1448-use-yip
IF [ "$KAIROS_AGENT_DEV" = "true" ]
RUN rm -rf /usr/bin/kairos-agent
COPY github.com/kairos-io/kairos-agent:$KAIROS_AGENT_DEV_BRANCH+build-kairos-agent/kairos-agent /usr/bin/kairos-agent
END
# END

# TEST IMMUCORE FROM BRANCH
ARG IMMUCORE_DEV
ARG IMMUCORE_DEV_BRANCH=master
ARG IMMUCORE_DEV=true
ARG IMMUCORE_DEV_BRANCH=1448-use-yip
IF [ "$IMMUCORE_DEV" = "true" ]
Comment on lines +309 to 320
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is not meant to be merged as is. It's pointing to dev branches of kairos-agent and immucore which consume this yip version: mudler/yip#96

The merging process should be:

  • merge the yip PR
  • bump kairos-agent and immucore to use that yip version
  • tag new releases of kairos-agent and immucore
  • consume those versions in kairos

The rest of the changes in this PR can be then merged or moved to another PR.

RUN rm -Rf /usr/lib/dracut/modules.d/28immucore
RUN rm /etc/dracut.conf.d/10-immucore.conf
Expand Down
2 changes: 1 addition & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/mudler/go-processmanager v0.0.0-20220724164624-c45b5c61312d
github.com/onsi/ginkgo/v2 v2.9.2
github.com/onsi/gomega v1.27.6
github.com/spectrocloud/peg v0.0.0-20230517145826-35016677d163
github.com/spectrocloud/peg v0.0.0-20230621080216-2a1a0084537f
gopkg.in/yaml.v3 v3.0.1
)

Expand Down
4 changes: 2 additions & 2 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/spectrocloud/peg v0.0.0-20230517145826-35016677d163 h1:5RlgJFagRV81CIDBC5peiWuYdhpG0jSdlx32sIyOFJw=
github.com/spectrocloud/peg v0.0.0-20230517145826-35016677d163/go.mod h1:L2fIdtZqbQEagjOOXwkwH3t7MjJUd7fbt52cLSQGDBg=
github.com/spectrocloud/peg v0.0.0-20230621080216-2a1a0084537f h1:uDlzxzjiLAj79w5Z41rpsEku4PudzOBCZ7L6cMEaWsI=
github.com/spectrocloud/peg v0.0.0-20230621080216-2a1a0084537f/go.mod h1:L2fIdtZqbQEagjOOXwkwH3t7MjJUd7fbt52cLSQGDBg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
Expand Down