Skip to content

Commit

Permalink
Rework image/iso/artifacts building (#178)
Browse files Browse the repository at this point in the history
* Drop all the ci stuff

Also generate docs added to makefile

Signed-off-by: Itxaka <igarcia@suse.com>

* Create elemental image from current code and use it for the iso

Signed-off-by: Itxaka <igarcia@suse.com>

* Pin teal repo to v0.8.14-22

Signed-off-by: Itxaka <igarcia@suse.com>

* Run elemental-operator on livecd boot

Signed-off-by: Itxaka <igarcia@suse.com>

* Add back end2end workflow, not fully done

Signed-off-by: Itxaka <igarcia@suse.com>

* Drop elemental-operator service and use cloud-config instead

Signed-off-by: Itxaka <igarcia@suse.com>

* Rename the livecd config and use the REPO name on iso building

Signed-off-by: Itxaka <igarcia@suse.com>

* Fix yaml

Signed-off-by: Itxaka <igarcia@suse.com>

* bump operator image

Signed-off-by: Itxaka <igarcia@suse.com>

* Add defaults to makefile for docker builds

Signed-off-by: Itxaka <igarcia@suse.com>

* Allow setting the elemental version on the grub line

Easier to identify the current used version

Signed-off-by: Itxaka <igarcia@suse.com>

* update jobs

Signed-off-by: Itxaka <igarcia@suse.com>

* Fix docker version image

Signed-off-by: Itxaka <igarcia@suse.com>

* Add ipxe target

Signed-off-by: Itxaka <igarcia@suse.com>

* Add ipxe and build ipxe by default

Signed-off-by: Itxaka <igarcia@suse.com>

* Make makefile targets more simple

Signed-off-by: Itxaka <igarcia@suse.com>

* upload files separatedly

Signed-off-by: Itxaka <igarcia@suse.com>

* fix e2e yaml

Signed-off-by: Itxaka <igarcia@suse.com>
  • Loading branch information
Itxaka authored Jul 20, 2022
1 parent c3e62ce commit e85854d
Show file tree
Hide file tree
Showing 29 changed files with 346 additions and 969 deletions.
158 changes: 0 additions & 158 deletions .github/workflows/e2e-tests.yaml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: e2e

on:
push:
branches:
- master
pull_request:

jobs:
build-all-artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Export tag
id: export_tag
run: |
git describe --abbrev=0 --tags
TAG=`git describe --abbrev=0 --tags 2>/dev/null || echo "v0.0.0"`
echo "::set-output name=elemental_tag::$TAG"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y genisoimage
- name: Build image
run: |
make build
make dump_image
- name: Build iso
run: |
make iso
- name: Build ipxe artifacts
run: |
make extract_kernel_init_squash
make ipxe
- uses: actions/upload-artifact@v3
with:
name: docker-image
path: build/*.tar
- uses: actions/upload-artifact@v3
with:
name: iso-image
path: build/*.iso
- uses: actions/upload-artifact@v3
with:
name: ipxe-artifacts
path: |
build/*-kernel
build/*-initrd
build/*.squashfs
build/*.ipxe
50 changes: 50 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build elemental docker image

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
env:
REPO: ttl.sh/elemental-ci
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Export tag
id: export_tag
run: |
git describe --abbrev=0 --tags
TAG=`git describe --abbrev=0 --tags 2>/dev/null || echo "v0.0.0"`
echo "::set-output name=elemental_tag::$TAG"
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
${{ env.REPO }}
tags: |
type=semver,pattern=v{{version}}
type=sha,format=short,prefix=${{ steps.export_tag.outputs.elemental_tag }}-
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build image
uses: docker/build-push-action@v2
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
# cache into GitHub actions cache, nice
cache-from: type=gha
cache-to: type=gha,mode=max
target: default
file: Dockerfile.image
build-args: |
IMAGE_TAG=${{ steps.meta.outputs.version }}
IMAGE_COMMIT=${{ github.sha }}
IMAGE_REPO=${{ env.REPO }}
30 changes: 0 additions & 30 deletions .github/workflows/images-dev.yaml

This file was deleted.

Loading

0 comments on commit e85854d

Please sign in to comment.