Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Sebastian Krzyszkowiak
librem5-ci
Commits
a0b3dc5c
Commit
a0b3dc5c
authored
Dec 09, 2019
by
Guido Gunther
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
0 deletions
+111
-0
.gitlab-ci.yml
.gitlab-ci.yml
+11
-0
README.md
README.md
+34
-0
librem5-pipeline-definitions.yml
librem5-pipeline-definitions.yml
+66
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
a0b3dc5c
job
:
tags
:
-
librem5
before_script
:
-
echo "man-db man-db/auto-update boolean
false
" | debconf-set-selections
-
export DEBIAN_FRONTEND=noninteractive
-
apt-get -y update
-
apt-get -y install python3-yaml
script
:
-
python3 -c 'import yaml; import pprint; c = yaml.load(open("librem5-pipeline-definitions.yml")); pprint.pprint(c)'
README.md
0 → 100644
View file @
a0b3dc5c
# Pipeline steps for gitlab CI
Some gitlab snippets for easier gitlab-ci setup
## Usage:
This builds a Debian package and runs it's autopkttests. It can be built joined
with other stages like build and test:
```
yaml
include
:
-
'
https://source.puri.sm/Librem5/librem5-ci/raw/master/librem5-pipeline-definitions.yml'
stages
:
-
package
-
test-package
variables
:
L5_DOCKER_IMAGE
:
debian:buster
package-debian-buster
:
extends
:
.l5-build-debian-package
autopkgtest-debian-buster-package
:
dependencies
:
-
package-debian-buster
extends
:
.l5-autopkgtest-debian-package
lintian-debian-buster-package
:
dependencies
:
-
package-debian-buster
extends
:
.l5-lintian-debian-package
```
librem5-pipeline-definitions.yml
0 → 100644
View file @
a0b3dc5c
variables
:
# Default docker image to use
L5_DOCKER_IMAGE
:
debian:buster
# Wheter to add our on-commit CI repos
L5_ADD_SCRATCH_CI
:
'
true'
L5_WORKING_DIR
:
$CI_PROJECT_DIR/debian/output
L5_LINTIAN_OPTS
:
--suppress-tags bad-distribution-in-changes-file
.l5-build-debian-package
:
image
:
${L5_DOCKER_IMAGE}
tags
:
-
librem5
stage
:
package
before_script
:
-
echo "man-db man-db/auto-update boolean
false
" | debconf-set-selections
-
export DEBIAN_FRONTEND=noninteractive
-
apt-get -y update
-
'
[
"$L5_ADD_SCRATCH_CI"
!=
"true"
]
||
apt-get
-y
install
build-essential
wget
ca-certificates
gnupg'
-
'
[
"$L5_ADD_SCRATCH_CI"
!=
"true"
]
||
echo
"deb
http://ci.puri.sm/
scratch
librem5"
>
/etc/apt/sources.list.d/ci.list'
-
'
[
"$L5_ADD_SCRATCH_CI"
!=
"true"
]
||
wget
-O-
https://ci.puri.sm/ci-repo.key
|
apt-key
add
-'
-
apt-get -y update
-
apt-get -y build-dep .
script
:
-
dpkg-buildpackage -b -uc -us
-
rm -rf "${L5_WORKING_DIR}"; mkdir -p "${L5_WORKING_DIR}"
-
cp -l ../*.deb ../*.changes ../*.buildinfo "${L5_WORKING_DIR}/"
artifacts
:
paths
:
-
"
${L5_WORKING_DIR}"
.l5-autopkgtest-debian-package
:
image
:
${L5_DOCKER_IMAGE}
tags
:
-
librem5
stage
:
test-package
dependencies
:
-
pkg:build-debian-package
before_script
:
-
echo "man-db man-db/auto-update boolean
false
" | debconf-set-selections
-
export DEBIAN_FRONTEND=noninteractive
-
apt-get -y update
-
'
[
"$L5_ADD_SCRATCH_CI"
!=
"true"
]
||
apt-get
-y
install
wget
ca-certificates
gnupg
autopkgtest'
-
'
[
"$L5_ADD_SCRATCH_CI"
!=
"true"
]
||
echo
"deb
http://ci.puri.sm/
scratch
librem5"
>
/etc/apt/sources.list.d/ci.list'
-
'
[
"$L5_ADD_SCRATCH_CI"
!=
"true"
]
||
wget
-O-
https://ci.puri.sm/ci-repo.key
|
apt-key
add
-'
script
:
-
ls "${L5_WORKING_DIR}"
-
RET=0;
autopkgtest -U ${L5_WORKING_DIR}/*.changes -- autopkgtest-virt-null || RET=$?;
echo "Autopkgtest exited with ${RET}";
[ "${RET}" -eq 8 ] && exit 0 || exit "${RET}"
.l5-lintian-debian-package
:
image
:
${L5_DOCKER_IMAGE}
tags
:
-
librem5
stage
:
test-package
dependencies
:
-
pkg:build-debian-package
before_script
:
-
echo "man-db man-db/auto-update boolean
false
" | debconf-set-selections
-
export DEBIAN_FRONTEND=noninteractive
-
apt-get -y update
-
apt-get -y install wget ca-certificates gnupg lintian
script
:
-
ls "${L5_WORKING_DIR}"
-
lintian ${L5_LINTIAN_OPTS} ${L5_WORKING_DIR}/*.changes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment