Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmbootstrap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
postmarketOS
pmbootstrap
Commits
ca53c117
Verified
Commit
ca53c117
authored
5 months ago
by
Clayton Craft
Browse files
Options
Downloads
Patches
Plain Diff
ci: add basic integration testing for pmb
parent
47dc4937
No related branches found
No related tags found
No related merge requests found
Pipeline
#208617
failed
5 months ago
Stage: lint
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.ci/integration.sh
+32
-0
32 additions, 0 deletions
.ci/integration.sh
.gitlab-ci.yml
+16
-0
16 additions, 0 deletions
.gitlab-ci.yml
build.sh
+7
-0
7 additions, 0 deletions
build.sh
with
55 additions
and
0 deletions
.ci/integration.sh
0 → 100755
+
32
−
0
View file @
ca53c117
#!/bin/sh -e
set
-x
if
[
"
$(
id
-u
)
"
=
0
]
;
then
exec
su
"
${
TESTUSER
:-
build
}
"
-c
"sh -e
$0
"
fi
pmaports
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
/..
;
pwd
-P
)
"
# Make sure that the work folder format is up to date, and that there are no
# mounts from aborted test cases (pmbootstrap#1595)
echo
"Initializing pmbootstrap"
yes
''
| ./pmbootstrap.py
--details-to-stdout
init
./pmbootstrap.py work_migrate
# ./pmbootstrap.py config aports "$pmaports"
./pmbootstrap.py
-q
shutdown
# TODO: make device configurable?
device
=
"qemu-amd64"
# TODO: make UI configurable?
ui
=
"phosh"
./pmbootstrap.py config device
"
$device
"
./pmbootstrap.py config ui
"
$ui
"
# NOTE: --no-image is used because building images makes pmb try to
# "modprobe loop". This fails in CI.
echo
"Building
$ui
image for
$device
"
./pmbootstrap.py
-y
install
--zap
--password
147147
--no-image
echo
"Building
$ui
image for
$device
, with FDE"
./pmbootstrap.py
-y
install
--zap
--password
147147
--fde
--no-image
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
16
−
0
View file @
ca53c117
...
...
@@ -95,3 +95,19 @@ deploy:
-
rsync -hrvz --delete -e "ssh -p ${SSH_PORT}" public/ "${SSH_HOST}":/var/www/docs.postmarketos.org/pmbootstrap/
environment
:
name
:
deploy
integration
:
stage
:
test
before_script
:
-
*global_before_scripts
-
apk upgrade -U
-
apk add doas git losetup python3 openssl
-
echo "permit nopass build" > /etc/doas.d/ci-user.conf
script
:
-
"
.ci/integration.sh"
after_script
:
-
"
cp
/home/build/.local/var/pmbootstrap/log.txt
."
artifacts
:
when
:
on_failure
paths
:
-
"
log.txt"
This diff is collapsed.
Click to expand it.
build.sh
0 → 100755
+
7
−
0
View file @
ca53c117
#!/bin/sh
set
-euo
pipefail
doas
rm
-r
~/.local/var/pmbootstrap/packages/systemd-edge/aarch64/
||
true
pmbootstrap
-y
zap
pmbootstrap build
--force
apk-tools
--src
\~
/src/apk-tools/
||
true
pmbootstrap
-y
zap
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment