Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
449 commits
Select commit Hold shift + click to select a range
ab3cf1a
matrix.
syslogic Mar 28, 2025
8841ed4
matrix.
syslogic Mar 28, 2025
63a8774
ghcr.io
syslogic Mar 28, 2025
af809ba
ghcr.io
syslogic Mar 28, 2025
45773fb
ghcr.io
syslogic Mar 28, 2025
e547110
ghcr.io
syslogic Mar 28, 2025
780cd9f
ghcr.io
syslogic Mar 28, 2025
09c3a63
ghcr.io
syslogic Mar 28, 2025
90d1bf3
ghcr.io
syslogic Mar 28, 2025
20512d2
ghcr.io
syslogic Mar 28, 2025
f820cd2
ghcr.io
syslogic Mar 28, 2025
9ebbbba
ghcr.io
syslogic Mar 28, 2025
1f59153
ghcr.io
syslogic Mar 28, 2025
69a60d5
ghcr.io
syslogic Mar 28, 2025
b03aaaf
ghcr.io
syslogic Mar 28, 2025
6b756f1
ghcr.io
syslogic Mar 28, 2025
8cd3ad9
One of subject-path, subject-digest, or subject-checksums must be pro…
syslogic Mar 28, 2025
e24f4b6
One of subject-path, subject-digest, or subject-checksums must be pro…
syslogic Mar 28, 2025
8a3045e
container script updated.
syslogic Mar 28, 2025
2056506
container script updated.
syslogic Mar 28, 2025
7653476
it still seems to use thr wrong registry ...
syslogic Mar 28, 2025
d722d69
:latest
syslogic Mar 28, 2025
e52618c
:latest
syslogic Mar 28, 2025
bcb885c
:latest
syslogic Mar 28, 2025
412e551
ghcr.io
syslogic Mar 28, 2025
f252bf7
ghcr.io
syslogic Mar 28, 2025
496931d
ghcr.io
syslogic Mar 28, 2025
eb2324b
ghcr.io
syslogic Mar 28, 2025
c894230
ghcr.io
syslogic Mar 28, 2025
ad9276e
ghcr.io
syslogic Mar 28, 2025
d2410a6
subject-name.
syslogic Mar 28, 2025
3fe535a
subject-name.
syslogic Mar 28, 2025
8f34648
subject-name.
syslogic Mar 28, 2025
369d8cf
subject-name.
syslogic Mar 28, 2025
032385f
subject-name.
syslogic Mar 28, 2025
e9961a3
job removed again.
syslogic Mar 28, 2025
85cdaaf
The digest comes from buildx, not the metadata.
syslogic Mar 28, 2025
f8ff7fb
buildscript.
syslogic Mar 28, 2025
e2bdc1a
typo.
syslogic Mar 28, 2025
48f3dc3
unreachable code.
syslogic Mar 29, 2025
d3a9ff1
the syntax error is just not there?
syslogic Mar 29, 2025
be0b38a
the syntax error is just not there?
syslogic Mar 29, 2025
e7fd611
also checking for bazelisk.
syslogic Mar 29, 2025
078bb49
also checking for bazelisk.
syslogic Mar 29, 2025
ad606dc
passing the build-target again.
syslogic Mar 29, 2025
5aaf56b
passing the build-target again.
syslogic Mar 29, 2025
8b24325
rudimentary ARM64 build support.
syslogic Mar 29, 2025
6798117
the syntax error is just not there?
syslogic Mar 29, 2025
d5b4794
more reusable tasks introduced.
syslogic Mar 29, 2025
50351a2
the syntax error is just not there?
syslogic Mar 29, 2025
6f2550a
rudimentary ARM64 build support.
syslogic Mar 29, 2025
f678b6a
docker run.
syslogic Mar 29, 2025
98533bf
docker run.
syslogic Mar 29, 2025
e2a80a8
docker run.
syslogic Mar 29, 2025
ad21c09
docker run.
syslogic Mar 29, 2025
0bba57c
secrets: inherit does not exist anymore.
syslogic Mar 29, 2025
00c40c5
secrets: inherit does not exist anymore.
syslogic Mar 29, 2025
a780046
typo.
syslogic Mar 29, 2025
7de287d
typo.
syslogic Mar 29, 2025
8852d57
typo.
syslogic Mar 29, 2025
ecc46f7
typo.
syslogic Mar 29, 2025
47b5717
typo.
syslogic Mar 29, 2025
d5a87c3
typo.
syslogic Mar 29, 2025
7a7f82d
typo.
syslogic Mar 29, 2025
92acafc
matrix output added.
syslogic Mar 29, 2025
cda203a
matrix output added.
syslogic Mar 29, 2025
82bad83
matrix output added.
syslogic Mar 29, 2025
427b084
matrix output added.
syslogic Mar 29, 2025
6fd9e81
matrix output added.
syslogic Mar 29, 2025
98bd6df
matrix output added.
syslogic Mar 29, 2025
ab668c5
matrix output added.
syslogic Mar 29, 2025
ceabb21
matrix output added.
syslogic Mar 29, 2025
5996b52
matrix output added.
syslogic Mar 29, 2025
f1947f2
matrix output added.
syslogic Mar 29, 2025
c1a20d4
matrix output added.
syslogic Mar 29, 2025
ead024d
matrix output added.
syslogic Mar 29, 2025
f2e2be6
matrix output added.
syslogic Mar 29, 2025
a2ed235
matrix output added.
syslogic Mar 29, 2025
dda3896
matrix output added.
syslogic Mar 29, 2025
f820629
matrix output added.
syslogic Mar 29, 2025
c1478fb
matrix output added.
syslogic Mar 29, 2025
21d635b
dependency added.
syslogic Mar 29, 2025
7841a55
dependency added.
syslogic Mar 29, 2025
b56943a
dependency added.
syslogic Mar 29, 2025
5313a6e
matrix output added.
syslogic Mar 29, 2025
147c6f9
matrix output added.
syslogic Mar 29, 2025
3664f32
matrix output added.
syslogic Mar 29, 2025
6be5104
matrix output added.
syslogic Mar 29, 2025
e497f9a
matrix output added.
syslogic Mar 29, 2025
56686f0
matrix output added.
syslogic Mar 29, 2025
10368ea
matrix output added.
syslogic Mar 29, 2025
228fe5c
matrix output added.
syslogic Mar 29, 2025
799634f
matrix output added.
syslogic Mar 29, 2025
bc19c27
matrix output added.
syslogic Mar 29, 2025
fe6f051
matrix output added.
syslogic Mar 29, 2025
9c72504
matrix output added.
syslogic Mar 29, 2025
6235edc
matrix output added.
syslogic Mar 29, 2025
1da3299
matrix output added.
syslogic Mar 29, 2025
ea5e20f
matrix output added.
syslogic Mar 29, 2025
2f5fee8
matrix output added.
syslogic Mar 29, 2025
1181ddb
matrix output added.
syslogic Mar 29, 2025
940a013
matrix output added.
syslogic Mar 29, 2025
2f9b68a
matrix output added.
syslogic Mar 29, 2025
9f6ea9b
matrix output added.
syslogic Mar 29, 2025
3ff2e4b
matrix output added.
syslogic Mar 29, 2025
c2776c3
matrix output added.
syslogic Mar 29, 2025
45a29e3
matrix output added.
syslogic Mar 29, 2025
46d337f
matrix output added.
syslogic Mar 29, 2025
9f3f9aa
matrix output added.
syslogic Mar 29, 2025
de457e5
matrix output added.
syslogic Mar 29, 2025
2df992b
matrix output added.
syslogic Mar 29, 2025
fda67a3
matrix output added.
syslogic Mar 29, 2025
7f7621a
matrix output added.
syslogic Mar 29, 2025
bb59dde
matrix output added.
syslogic Mar 29, 2025
c67b39b
matrix output added.
syslogic Mar 29, 2025
d37665c
matrix output added.
syslogic Mar 29, 2025
c3d66f2
matrix output added.
syslogic Mar 29, 2025
b4622c5
matrix output added.
syslogic Mar 29, 2025
c1dd8d8
matrix output added.
syslogic Mar 29, 2025
a21c018
matrix output added.
syslogic Mar 29, 2025
fb808c4
matrix output added.
syslogic Mar 29, 2025
3cc029d
matrix output added.
syslogic Mar 29, 2025
6a6a1c4
matrix output added.
syslogic Mar 29, 2025
c972bf6
matrix output added.
syslogic Mar 29, 2025
8f9890d
matrix output added.
syslogic Mar 29, 2025
03ebde8
matrix output added.
syslogic Mar 29, 2025
78439b4
token fixed.
syslogic Mar 29, 2025
2631872
attestation matrix added.
syslogic Mar 29, 2025
ae234bf
typo.
syslogic Mar 29, 2025
a7134a1
typo.
syslogic Mar 29, 2025
bc1a3e3
typo.
syslogic Mar 29, 2025
0a13621
typo.
syslogic Mar 29, 2025
dbec86b
typo.
syslogic Mar 29, 2025
b6cdba6
typo.
syslogic Mar 29, 2025
326826a
typo.
syslogic Mar 29, 2025
5219aae
typo.
syslogic Mar 29, 2025
6f49e24
typo.
syslogic Mar 29, 2025
58f167c
typo.
syslogic Mar 29, 2025
f73715b
matrix output added.
syslogic Mar 29, 2025
e732bc8
matrix output added.
syslogic Mar 29, 2025
fa535e0
matrix output added.
syslogic Mar 29, 2025
02b9721
matrix output added.
syslogic Mar 29, 2025
66473a3
matrix output added.
syslogic Mar 29, 2025
fa77b5d
matrix output added.
syslogic Mar 29, 2025
3def543
matrix output added.
syslogic Mar 29, 2025
da39ef5
matrix output added.
syslogic Mar 29, 2025
274bdfc
matrix output added.
syslogic Mar 29, 2025
e725f0e
matrix output added.
syslogic Mar 29, 2025
ca19e0c
matrix output added.
syslogic Mar 29, 2025
357251f
matrix output added.
syslogic Mar 29, 2025
dd73bdd
matrix output added.
syslogic Mar 29, 2025
7a7391b
matrix output added.
syslogic Mar 29, 2025
cca80ae
matrix output added.
syslogic Mar 29, 2025
df25e8e
matrix output added.
syslogic Mar 29, 2025
91c455d
matrix output added.
syslogic Mar 29, 2025
56a3290
matrix output added.
syslogic Mar 29, 2025
8e78a0f
matrix output added.
syslogic Mar 29, 2025
2f0a290
matrix output added.
syslogic Mar 29, 2025
c5e0e2f
matrix output added.
syslogic Mar 29, 2025
af36aa7
matrix output added.
syslogic Mar 29, 2025
d249159
matrix output added.
syslogic Mar 29, 2025
b865ac7
matrix output added.
syslogic Mar 29, 2025
c9cbd6a
matrix output added.
syslogic Mar 29, 2025
992721c
matrix output added.
syslogic Mar 29, 2025
ccb5375
matrix output added.
syslogic Mar 29, 2025
c37cce8
matrix output added.
syslogic Mar 29, 2025
4bd145c
matrix output added.
syslogic Mar 29, 2025
8d950ef
matrix output added.
syslogic Mar 29, 2025
cb46928
matrix output added.
syslogic Mar 29, 2025
8ff6fcd
matrix output added.
syslogic Mar 29, 2025
e780a3c
matrix output added.
syslogic Mar 29, 2025
b7b6920
matrix output added.
syslogic Mar 29, 2025
0c69dd2
matrix output added.
syslogic Mar 29, 2025
d3054ff
matrix output added.
syslogic Mar 29, 2025
54324c0
matrix output added.
syslogic Mar 29, 2025
23a25a8
matrix output added.
syslogic Mar 29, 2025
55704f9
platform.
syslogic Mar 29, 2025
651f004
platform.
syslogic Mar 29, 2025
45887ce
platform.
syslogic Mar 30, 2025
1cfd833
DOCKER_OPTIONS
syslogic Mar 30, 2025
053329e
matrix outputs added.
syslogic Mar 30, 2025
fd24e13
DOCKER_OPTIONS
syslogic Mar 30, 2025
c8bb0db
DOCKER_OPTIONS
syslogic Mar 30, 2025
c8270ce
DOCKER_OPTIONS
syslogic Mar 30, 2025
e839b55
DOCKER_OPTIONS
syslogic Mar 30, 2025
b90c7a9
DOCKER_OPTIONS
syslogic Mar 30, 2025
87bb4a7
DOCKER_OPTIONS
syslogic Mar 30, 2025
b8ba0c9
DOCKER_OPTIONS
syslogic Mar 30, 2025
3b947ff
DOCKER_OPTIONS
syslogic Mar 30, 2025
466aba2
DOCKER_OPTIONS
syslogic Mar 30, 2025
98c27a3
DOCKER_OPTIONS
syslogic Mar 30, 2025
2528471
typo.
syslogic Mar 30, 2025
d4b2ff6
typo.
syslogic Mar 30, 2025
86d723c
typo.
syslogic Mar 30, 2025
93a8aeb
typo.
syslogic Mar 30, 2025
3c2c88f
typo.
syslogic Mar 30, 2025
6a13df5
DOCKER_OPTIONS
syslogic Mar 30, 2025
a10ba15
DOCKER_OPTIONS
syslogic Mar 30, 2025
0de9a78
DOCKER_OPTIONS
syslogic Mar 30, 2025
a4553e9
DOCKER_OPTIONS
syslogic Mar 30, 2025
8edce61
typo.
syslogic Mar 30, 2025
8605842
typo.
syslogic Mar 30, 2025
ab5f200
typo.
syslogic Mar 30, 2025
4e987ee
typo.
syslogic Mar 30, 2025
c3ca215
typo.
syslogic Mar 30, 2025
971ef4b
DOCKER_OPTIONS
syslogic Mar 30, 2025
2beb050
DOCKER_OPTIONS
syslogic Mar 30, 2025
e9dec65
DOCKER_OPTIONS
syslogic Mar 30, 2025
1215a09
typo.
syslogic Mar 30, 2025
7ba7f61
DOCKER_OPTIONS
syslogic Mar 30, 2025
2991a83
script updated.
syslogic Mar 30, 2025
5190d46
script updated.
syslogic Mar 30, 2025
53d39e0
typo.
syslogic Mar 30, 2025
b94f872
script updated.
syslogic Mar 30, 2025
e9990b3
script updated.
syslogic Mar 30, 2025
4a97ebf
script updated.
syslogic Mar 30, 2025
179c5a5
script updated.
syslogic Mar 30, 2025
b2e4e82
script updated.
syslogic Mar 30, 2025
5df6015
script updated.
syslogic Mar 30, 2025
efe64a1
script updated.
syslogic Mar 30, 2025
beeb503
script updated.
syslogic Mar 30, 2025
cd4741a
script updated.
syslogic Mar 30, 2025
de8b3cc
dependency removed.
syslogic Mar 30, 2025
e45cce4
dependency removed.
syslogic Mar 30, 2025
4c05fec
dependency removed.
syslogic Mar 30, 2025
65ad6c5
container script updated.
syslogic Mar 30, 2025
94fe25e
container script updated.
syslogic Mar 30, 2025
70455ed
entrypoint.sh
syslogic Mar 30, 2025
12bb94e
container script updated.
syslogic Mar 30, 2025
b97ad09
bash installed.
syslogic Mar 30, 2025
b85987c
bash installed.
syslogic Mar 30, 2025
908f251
bash installed.
syslogic Mar 30, 2025
c1ac915
dos2unix removed.
syslogic Mar 30, 2025
d5098ed
bash installed.
syslogic Mar 30, 2025
7b62b96
dos2unix removed.
syslogic Mar 30, 2025
6ce04e4
workflow.
syslogic Mar 30, 2025
8fa3f23
options fixed.
syslogic Mar 30, 2025
8fff466
useless metadata matrix job disabled.
syslogic Mar 30, 2025
e897d09
useless targets disabled.
syslogic Mar 30, 2025
768a9fe
useless targets disabled.
syslogic Mar 30, 2025
9d4474c
docker system prune --all --force
syslogic Mar 30, 2025
ed0f7cf
login shell changed back.
syslogic Mar 30, 2025
7b96906
buildscript.sh
syslogic Mar 30, 2025
c10626d
Package bash-5.1.8-9.el9.x86_64 is already installed.
syslogic Mar 30, 2025
cfa9041
buildscript.sh
syslogic Mar 30, 2025
21a8a4a
Dockerfile
syslogic Mar 30, 2025
7a8ccd8
buildscript.sh
syslogic Mar 30, 2025
ac1891f
docker run ...
syslogic Mar 30, 2025
ae4c114
Merge branch 'google:main' into rpm-build
syslogic Mar 30, 2025
140d209
useless jobs removed.
syslogic Mar 30, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/reusable-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: ReusableBuild
on: [workflow_call]

jobs:

build-arm64-cuttlefish-deb-job:
runs-on: ubuntu-latest
steps:
Expand Down
138 changes: 138 additions & 0 deletions .github/workflows/reusable-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: Reusable Docker Container Run

on:
workflow_call:
secrets:
token:
required: true
inputs:
registry:
default: 'ghcr.io'
required: false
type: string
username:
required: true
type: string
image:
required: true
type: string
tag:
default: latest
required: false
type: string
platform:
default: linux/amd64
required: false
type: string
outputs:
builder:
value: ${{ jobs.docker-run.outputs.builder }}
description: "Build output"
testing:
value: ${{ jobs.docker-run.outputs.testing }}
description: "Package test output"
integration:
value: ${{ jobs.docker-run.outputs.integration }}
description: "Integration output"
orchestration:
value: ${{ jobs.docker-run.outputs.orchestration }}
description: "Orchestration output"
jobs:

docker-run:
runs-on: ubuntu-latest
outputs:
builder: ${{ steps.build-rpm-packages.outputs.result }}
testing: ${{ steps.test-rpm-packages.outputs.result }}
integration: ${{ steps.test-integration.outputs.result }}
orchestration: ${{ steps.test-orchestration.outputs.result }}
env:
DEFAULT_OPTIONS: '--attach STDOUT --attach STDERR --quiet'
steps:

# https://github.com/docker/login-action
- name: Log in to the Container registry
uses: 'docker/login-action@v3'
id: container-registry
with:
registry: ${{ INPUTS.REGISTRY }}
username: ${{ INPUTS.USERNAME }}
password: ${{ SECRETS.TOKEN }}

# https://docs.docker.com/reference/cli/docker/container/run/
# https://docs.docker.com/reference/cli/docker/container/cp/
# --entrypoint ${{ INPUTS.ENTRY-POINT }} cannot be changed with GitHub docker.
- name: Run docker and somehow extract the archive from the volume.
if: ${{ contains(INPUTS.IMAGE, 'builder') && !contains(INPUTS.PLATFORM, 'linux/arm64') }}
id: build-rpm-packages
shell: bash
env:
RPM_PLATFORM: ${{ INPUTS.PLATFORM }}
DOCKER_IMAGE: ${{ INPUTS.REGISTRY }}/${{ INPUTS.USERNAME }}/${{ INPUTS.IMAGE }}:${{ INPUTS.TAG }}
DOCKER_OPTIONS: '--name rpm-builder'
run: |
# docker run $DOCKER_OPTIONS $DEFAULT_OPTIONS --env platform="$RPM_PLATFORM" $$DOCKER_IMAGE
docker run $DOCKER_OPTIONS $DEFAULT_OPTIONS $DOCKER_IMAGE >> $GITHUB_STEP_SUMMARY
MOUNT_POINT=$(docker volume ls --filter driver="local" --format '{{.Mountpoint}}')
VOLUME_HASH=$(docker volume ls --filter driver="local" --format '{{.Name}}')
DIRECTORY=/var/lib/docker/volumes/$VOLUME_HASH/_data
CID=`docker ps -aqf "name=^rpm-builder$"`

echo Listing container $CID with attached volume: $DIRECTORY
echo Mountpoint value: $MOUNT_POINT

# TODO: Finds nothing, because the entrypoint.sh does not seem to execute.
# docker cp $CID:/root/android-cuttlefish-rpm.tar.gz ${{ RUNNER.TEMP }}
# docker cp rpm-builder:/root/android-cuttlefish-rpm.tar.gz ${{ RUNNER.TEMP }}
sudo ls -la $DIRECTORY
cp $DIRECTORY/android-cuttlefish-rpm.tar.gz ${{ RUNNER.TEMP }}

docker rm rpm-builder
echo "result=ok" >> $GITHUB_OUTPUT

# https://github.com/actions/upload-artifact
- name: Retain Artifacts (*.rpm)
uses: 'actions/upload-artifact@v4'
id: retain-rpm-packages
if: ${{ contains(INPUTS.IMAGE, 'builder') && !contains(INPUTS.PLATFORM, 'linux/arm64') }}
with:
path: ${{ RUNNER.TEMP }}/*.tar.gz
name: android-cuttlefish-rhel-${{ INPUTS.PLATFORM }}
retention-days: 14

# https://docs.docker.com/reference/cli/docker/container/run/
- name: Run package tests
if: ${{ contains(INPUTS.IMAGE, 'testing') }}
id: test-rpm-packages
shell: bash
env:
DOCKER_IMAGE: ${{ INPUTS.REGISTRY }}/${{ INPUTS.USERNAME }}/${{ INPUTS.IMAGE }}:${{ INPUTS.TAG }}
DOCKER_OPTIONS: '--name rpm-testing'
run: |
docker run $DOCKER_OPTIONS $DEFAULT_OPTIONS $DOCKER_IMAGE >> $GITHUB_STEP_SUMMARY
docker rm rpm-testing
echo "result=ok" >> $GITHUB_OUTPUT

# https://docs.docker.com/reference/cli/docker/container/run/
- name: Run integration test
if: ${{ contains(INPUTS.IMAGE, 'integration') }}
id: test-integration
shell: bash
env:
DOCKER_IMAGE: ${{ INPUTS.REGISTRY }}/${{ INPUTS.USERNAME }}/${{ INPUTS.IMAGE }}:${{ INPUTS.TAG }}
DOCKER_OPTIONS: '--name rhel-integration'
run: |
docker run $DOCKER_OPTIONS $DEFAULT_OPTIONS $DOCKER_IMAGE >> $GITHUB_STEP_SUMMARY
echo "result=ok" >> $GITHUB_OUTPUT

# https://docs.docker.com/reference/cli/docker/container/run/
- name: Run orchestration test
if: ${{ contains(INPUTS.DOCKER-IMAGE, 'orchestration') }}
id: test-orchestration
shell: bash
env:
DOCKER_IMAGE: ${{ INPUTS.REGISTRY }}/${{ INPUTS.USERNAME }}/${{ INPUTS.IMAGE }}:${{ INPUTS.TAG }}
DOCKER_OPTIONS: '--name rhel-orchestration'
run: |
docker run $DOCKER_OPTIONS $DEFAULT_OPTIONS $DOCKER_IMAGE >> $GITHUB_STEP_SUMMARY
echo "result=ok" >> $GITHUB_OUTPUT
116 changes: 116 additions & 0 deletions .github/workflows/rpm-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: RPM Builder

on: [ push ]

jobs:

build-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write

strategy:
max-parallel: 1
matrix:
platform: [ linux/amd64 ]
# target: [ rpm-builder, rpm-testing, rhel-integration, rhel-orchestration ]
target: [ rpm-builder, rpm-testing ]
include:
- target: rpm-builder
stage: builder
- target: rpm-testing
stage: testing
# - target: rhel-integration
# stage: integration
# - target: rhel-orchestration
# stage: orchestration
# exclude:
# - platform: linux/arm64
# target: rpm-testing
# - platform: linux/arm64
# target: rhel-integration
# - platform: linux/arm64
# target: rpm-testing

steps:
- uses: 'actions/checkout@v4'
- uses: 'docker/setup-qemu-action@v3'
with:
platforms: arm64

# https://github.com/docker/metadata-action
- name: Extract metadata (tags, labels)
uses: 'docker/metadata-action@v5'
id: metadata
with:
images: ghcr.io/${{ GITHUB.ACTOR }}/${{ MATRIX.TARGET }}
tags: ${{ GITHUB.ACTOR }}/${{ MATRIX.TARGET }}:latest

- uses: 'docker/login-action@v3'
id: container-registry
with:
registry: 'ghcr.io'
username: ${{ GITHUB.ACTOR }}
password: ${{ SECRETS.GITHUB_TOKEN }}

# https://github.com/marketplace/actions/build-and-push-docker-images
- uses: 'docker/setup-buildx-action@v3'
- name: Build and push Docker image
uses: 'docker/build-push-action@v6'
id: build
with:
context: .
file: docker/rpm-builder/Dockerfile
push: ${{ GITHUB.EVENT_NAME != 'pull_request' }}
platforms: ${{ MATRIX.PLATFORM }}
target: ${{ MATRIX.TARGET_STAGE }}
builder: ${{ steps.buildx.outputs.name }}
labels: ${{ steps.metadata.outputs.labels }}
tags: ${{ steps.metadata.outputs.tags }}

# Note: The digest comes from `buildx`, not the metadata.
# https://github.com/actions/attest-build-provenance
- name: Generate artifact attestation
uses: 'actions/attest-build-provenance@v2'
with:
subject-name: ghcr.io/${{ GITHUB.ACTOR }}/${{ MATRIX.TARGET }}
subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true

run-images:
uses: ./.github/workflows/reusable-docker.yml
needs: build-images
with:
registry: 'ghcr.io'
username: ${{ GITHUB.ACTOR }}
image: ${{ MATRIX.TARGET }}
platform: ${{ MATRIX.PLATFORM }}
secrets:
token: ${{ SECRETS.GITHUB_TOKEN }}
strategy:
max-parallel: 1
matrix:
# The `platform` is being passed into the shell as variable $RPM_PLATFORM.
# platform: [ linux/amd64, linux/arm64 ]
platform: [ linux/amd64 ]
# target: [ rpm-builder, rpm-testing, rhel-integration, rhel-orchestration ]
target: [ rpm-builder, rpm-testing ]
include:
- target: rpm-builder
stage: builder
- target: rpm-testing
stage: testing
# - target: rhel-integration
# stage: integration
# - target: rhel-orchestration
# stage: orchestration
# exclude:
# - platform: linux/arm64
# target: rpm-testing
# - platform: linux/arm64
# target: rhel-integration
# - platform: linux/arm64
# target: rpm-testing
2 changes: 1 addition & 1 deletion base/cvd/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ git_override(
)

git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
name = "fruit",
build_file = "@//:BUILD.fruit.bazel",
Expand Down Expand Up @@ -146,7 +147,6 @@ git_repository(
build_file = "@//build_external/wayland:BUILD.wayland.bazel",
commit = "b2649cb3ee6bd70828a17e50beb16591e6066288", # 1.22.0
remote = "https://gitlab.freedesktop.org/wayland/wayland.git",
patch_strip = 1,
patches = [
"@//build_external/wayland:PATCH.wayland.wayland_config.patch",
],
Expand Down
17 changes: 16 additions & 1 deletion base/debian/cuttlefish-base.cuttlefish-host-resources.init
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
# Make sure calls to this script get redirected to systemctl when
# using systemd

### BEGIN INIT INFO
# Provides: cuttlefish-host-resources
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO

# some system may not support bridge type by default
modprobe bridge

Expand Down Expand Up @@ -359,7 +369,12 @@ case "$1" in
# Nothing to do; we reread configuration on each invocation
;;
status)
rh_status
# command `rh_status` may not be available.
if command -v rh_status > /dev/null ; then
rh_status
else
systemctl status cuttlefish.service
fi
;;
shutdown)
stop
Expand Down
15 changes: 15 additions & 0 deletions base/rhel/cuttlefish.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=Cuttlefish Host Resources
After=syslog.target network.target
Requires=libvirtd.service
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
ExecStart=/etc/rc.d/init.d/cuttlefish-host-resources start

[Install]
WantedBy=multi-user.target

Loading