Skip to content

Commit 9362e51

Browse files
Add ubuntu ISO to CI (#669)
* Add ubuntu ISO to CI * fix file path usage * feat: add ubuntu test * bump ubuntu to 0.3
1 parent 3be6e78 commit 9362e51

File tree

3 files changed

+46
-35
lines changed

3 files changed

+46
-35
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -103,23 +103,23 @@ jobs:
103103
unattended_filename="${core_filename/%.iso/-unattended.iso}" # Replace .iso with -unattended.iso
104104
sudo cp "$file" "images/$unattended_filename"
105105
106-
# - name: Build Ubuntu unattended
107-
# run: |
108-
# export BASE_OS=ubuntu
109-
# export UNATTENDED=true
110-
# docker compose up --build
111-
112-
# - name: Check Ubuntu ISO unattended
113-
# run: |
114-
# ls -lrt images/Dappnode-ubuntu-*.iso
115-
116-
# - name: Set Ubuntu Dappnode unattended ISO name
117-
# run: |
118-
# file=$(ls images/Dappnode-ubuntu-*.iso)
119-
# filename=$(basename "$file") # Extract only the file name (without path)
120-
# core_filename="Dappnode-${CORE_VERSION}-ubuntu-${filename#Dappnode-ubuntu-}" # Modify the filename using CORE_VERSION
121-
# unattended_filename="${core_filename/%.iso/-unattended.iso}" # Replace .iso with -unattended.iso
122-
# sudo cp "$file" "images/$unattended_filename"
106+
- name: Build Ubuntu unattended
107+
run: |
108+
export BASE_OS=ubuntu
109+
export UNATTENDED=true
110+
docker compose up --build
111+
112+
- name: Check Ubuntu ISO unattended
113+
run: |
114+
ls -lrt images/Dappnode-ubuntu-*.iso
115+
116+
- name: Set Ubuntu Dappnode unattended ISO name
117+
run: |
118+
file=$(ls images/Dappnode-ubuntu-*.iso)
119+
filename=$(basename "$file") # Extract only the file name (without path)
120+
core_filename="Dappnode-${CORE_VERSION}-ubuntu-${filename#Dappnode-ubuntu-}" # Modify the filename using CORE_VERSION
121+
unattended_filename="${core_filename/%.iso/-unattended.iso}" # Replace .iso with -unattended.iso
122+
sudo cp "$file" "images/$unattended_filename"
123123
124124
- name: Create dappnode_profile.sh
125125
run: |
@@ -140,12 +140,13 @@ jobs:
140140
SHASUM_DEBIAN_UNATTENDED=$(shasum -a 256 $file)
141141
echo "::set-output name=SHASUM_DEBIAN_UNATTENDED::$SHASUM_DEBIAN_UNATTENDED"
142142
143-
# - name: Get SHA-256 Ubuntu unattended
144-
# id: shasum-ubuntu-unattended
145-
# run: |
146-
# file=$(find . -type f -name 'Dappnode-ubuntu-*unattended.iso')
147-
# SHASUM_UBUNTU_UNATTENDED=$(shasum -a 256 $file)
148-
# echo "::set-output name=SHASUM_UBUNTU_UNATTENDED::$SHASUM_UBUNTU_UNATTENDED"
143+
- name: Get SHA-256 Ubuntu unattended
144+
id: shasum-ubuntu-unattended
145+
run: |
146+
file=$(find . -type f -name 'Dappnode-ubuntu-*unattended.iso')
147+
SHASUM_UBUNTU_UNATTENDED=$(shasum -a 256 $file)
148+
echo "$SHASUM_UBUNTU_UNATTENDED" > SHASUM_UBUNTU_UNATTENDED.txt
149+
echo "::set-output name=SHASUM_UBUNTU_UNATTENDED::$SHASUM_UBUNTU_UNATTENDED"
149150
150151
- name: Write release content
151152
run: |
@@ -154,7 +155,6 @@ jobs:
154155
env:
155156
SHASUM_DEBIAN_ATTENDED: ${{ steps.shasum-debian-attended.outputs.SHASUM_DEBIAN_ATTENDED }}
156157
SHASUM_DEBIAN_UNATTENDED: ${{ steps.shasum-debian-unattended.outputs.SHASUM_DEBIAN_UNATTENDED }}
157-
# SHASUM_UBUNTU_UNATTENDED: ${{ steps.shasum-ubuntu-unattended.outputs.SHASUM_UBUNTU_UNATTENDED }}
158158

159159
# print images directory
160160
- name: Print images directory
@@ -176,3 +176,14 @@ jobs:
176176
body_path: CHANGELOG.md
177177
env:
178178
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
179+
180+
- name: Upload Ubuntu unattended to SSH server (and shasum)
181+
uses: appleboy/scp-action@v0.1.7
182+
with:
183+
host: ${{ secrets.ISO_SSH_HOST }}
184+
username: ${{ secrets.ISO_SSH_USER }}
185+
key: ${{ secrets.ISO_SSH_PRIVATE_KEY }}
186+
port: ${{ secrets.SSH_PORT }}
187+
source: SHASUM_UBUNTU_UNATTENDED.txt,./images/Dappnode-*-ubuntu-*-unattended.iso
188+
target: ${{ secrets.ISO_SSH_PATH }}
189+
overwrite: true

.github/workflows/test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ jobs:
5353
ls -lrt images/Dappnode-debian-*.iso
5454
5555
# Create Ubuntu ISO
56-
# - name: create Ubuntu ISO
57-
# run: |
58-
# export BASE_OS=ubuntu
59-
# export UNATTENDED=true
60-
# docker compose up --build
61-
# ls images/
56+
- name: create Ubuntu ISO
57+
run: |
58+
export BASE_OS=ubuntu
59+
export UNATTENDED=true
60+
docker compose up --build
61+
ls images/
6262
6363
# Verify Ubuntu ISO creation
64-
# - name: verify Ubuntu ISO
65-
# run: |
66-
# ls -lrt images/Dappnode-ubuntu-*.iso
64+
- name: verify Ubuntu ISO
65+
run: |
66+
ls -lrt images/Dappnode-ubuntu-*.iso

iso/scripts/generate_dappnode_iso_ubuntu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ SCRIPTS_DIR=$(dirname "${BASH_SOURCE[0]}")
55

66
source ${SCRIPTS_DIR}/common_iso_generation.sh
77

8-
BASE_ISO_NAME=ubuntu-24.04.2-live-server-amd64.iso
8+
BASE_ISO_NAME=ubuntu-24.04.3-live-server-amd64.iso
99
BASE_ISO_PATH="/images/${BASE_ISO_NAME}"
1010
BASE_ISO_URL="https://releases.ubuntu.com/24.04/${BASE_ISO_NAME}"
11-
BASE_ISO_SHASUM="d6dab0c3a657988501b4bd76f1297c053df710e06e0c3aece60dead24f270b4d ${BASE_ISO_PATH}"
11+
BASE_ISO_SHASUM="c3514bf0056180d09376462a7a1b4f213c1d6e8ea67fae5c25099c6fd3d8274b ${BASE_ISO_PATH}"
1212

1313
DAPPNODE_ISO_NAME="${DAPPNODE_ISO_PREFIX}${BASE_ISO_NAME}"
1414
DAPPNODE_ISO_PATH="/images/${DAPPNODE_ISO_NAME}"

0 commit comments

Comments
 (0)