[gnome-autoar/wip/oholy/ci] ci: Add initial GitLab CI integration
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-autoar/wip/oholy/ci] ci: Add initial GitLab CI integration
- Date: Fri, 30 Apr 2021 08:05:23 +0000 (UTC)
commit 119983a1ddc515dbf02cdfdce6214d3c7b162c1f
Author: Ondrej Holy <oholy redhat com>
Date: Thu Apr 29 17:18:15 2021 +0200
ci: Add initial GitLab CI integration
Let's use GitLab CI to automatically build source codes and run unit
tests for each commit to be sure that new changes don't break anything.
For some reason `buildah push --creds` is needed to make it work, though
it is not clear to me why.
.gitlab-ci.yml | 32 ++++++++++++++++++++++++++++++++
.gitlab/Dockerfile | 5 +++++
2 files changed, 37 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..e78d145
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,32 @@
+fedora:
+ image:
+ name: registry.gitlab.gnome.org/gnome/gnome-autoar:latest
+ entrypoint: ["/bin/sh", "-c"]
+ tags:
+ - x86_64
+ script:
+ - sudo dnf install -y --nogpg gtk-doc
+ - ./autogen.sh
+ - make
+ - cd tests
+ - ./test-extract-unit
+ allow_failure: true
+
+update image:
+ variables:
+ STORAGE_DRIVER: vfs
+ BUILDAH_FORMAT: docker
+ BUILDAH_ISOLATION: chroot
+ image: registry.fedoraproject.org/fedora:latest
+ script:
+ - dnf install -y buildah runc
+ - sed -i '/^mountopt =.*/d' /etc/containers/storage.conf
+ - buildah bud --tag $CI_REGISTRY_IMAGE -f .gitlab/Dockerfile
+ - buildah tag $CI_REGISTRY_IMAGE "$CI_REGISTRY_IMAGE:v$CI_JOB_ID"
+ - buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+ - buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD $CI_REGISTRY_IMAGE
+ - buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD "$CI_REGISTRY_IMAGE:v$CI_JOB_ID"
+ when: manual
+ only:
+ variables:
+ - $CI_PROJECT_NAMESPACE == "GNOME"
diff --git a/.gitlab/Dockerfile b/.gitlab/Dockerfile
new file mode 100644
index 0000000..8753214
--- /dev/null
+++ b/.gitlab/Dockerfile
@@ -0,0 +1,5 @@
+FROM fedora:rawhide
+
+RUN dnf install --nogpg -y dnf-plugins-core gnome-common git \
+ && dnf builddep --nogpg -y gnome-autoar \
+ && dnf clean all
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]