Commit b3bcfc93 authored by Johannes Meyer's avatar Johannes Meyer
Browse files

Initial commit

parents
## Build
/build/
## Snapshot Artifacts
/*.git/
/*.tar*
/*.version
## Editors
*~
.*.sw[op]
stages:
- build
- test
- upload
variables:
DOCKER_IMAGE_BASE: registry.icinga.com/build-docker
ICINGA_BUILD_TYPE: snapshot
#ICINGA_BUILD_UPSTREAM_BRANCH:
.build: &build
stage: build
tags:
- docker
image: ${DOCKER_IMAGE_BASE}/${DOCKER_IMAGE}
script:
- icinga-build-package
cache:
key: "${CI_JOB_NAME}"
paths:
- ccache/
- 'l10n.git'
artifacts:
paths:
- build/*
expire_in: 1 week
.test: &test
stage: test
tags:
- docker
image: ${DOCKER_IMAGE_BASE}/${DOCKER_IMAGE}
script:
- find build/
- icinga-build-test
.upload: &upload
stage: upload
tags:
- docker
image: ${DOCKER_IMAGE_BASE}/upload
script:
- find build/
- icinga-build-upload-aptly
only:
- master
- tags
###################################
# Debian
###################################
build/debian/buster:
<<: *build
variables:
DOCKER_IMAGE: debian/buster
test/debian/buster:
<<: *test
variables:
DOCKER_IMAGE: debian/buster
dependencies:
- build/debian/buster
upload/debian/buster:
<<: *upload
dependencies:
- build/debian/buster
build/debian/stretch:
<<: *build
variables:
DOCKER_IMAGE: debian/stretch
test/debian/stretch:
<<: *test
variables:
DOCKER_IMAGE: debian/stretch
dependencies:
- build/debian/stretch
upload/debian/stretch:
<<: *upload
dependencies:
- build/debian/stretch
###################################
# Ubuntu
###################################
build/ubuntu/focal:
<<: *build
variables:
DOCKER_IMAGE: ubuntu/focal
test/ubuntu/focal:
<<: *test
variables:
DOCKER_IMAGE: ubuntu/focal
dependencies:
- build/ubuntu/focal
upload/ubuntu/focal:
<<: *upload
dependencies:
- build/ubuntu/focal
build/ubuntu/eoan:
<<: *build
variables:
DOCKER_IMAGE: ubuntu/eoan
test/ubuntu/eoan:
<<: *test
variables:
DOCKER_IMAGE: ubuntu/eoan
dependencies:
- build/ubuntu/eoan
upload/ubuntu/eoan:
<<: *upload
dependencies:
- build/ubuntu/eoan
build/ubuntu/bionic:
<<: *build
variables:
DOCKER_IMAGE: ubuntu/bionic
test/ubuntu/bionic:
<<: *test
variables:
DOCKER_IMAGE: ubuntu/bionic
dependencies:
- build/ubuntu/bionic
upload/ubuntu/bionic:
<<: *upload
dependencies:
- build/ubuntu/bionic
files
*.debhelper.log
*substvars
l10n*/
.*.sw[op]
icinga-l10n (1.0.0-1) icinga; urgency=medium
* Initial package
-- Johannes Meyer <johannes.meyer@icinga.com> Mon, 11 May 2020 10:00:00 +0200
Source: icinga-l10n
Section: admin
Priority: optional
Maintainer: Icinga GmbH <info@icinga.com>
Build-Depends: debhelper (>= 9)
Homepage: https://icinga.com
Package: icinga-l10n
Architecture: all
Description: l10n (short for Localization) provides all translations available for Icinga.
usr/share/icinga-L10n
#!/usr/bin/make -f
#export DH_VERBOSE=1
INSTALL_PATH := /usr/share/icinga-L10n
%:
dh $@
override_dh_auto_install:
mkdir -p debian/tmp$(INSTALL_PATH)
cp -prv locale debian/tmp$(INSTALL_PATH)
find debian/tmp$(INSTALL_PATH)/locale -name *.po -delete
# vi: ts=4 sw=4 noexpandtab :
version=3
# versionmangle -> convert version addition to ~ version
opts=versionmangle=s/^([\d.]+)-(.+)?/$1~$2/ \
https://github.com/Icinga/L10n/releases .*/(?:L10n-|v)([\d.]+(?:-.+)?).tar.gz
#!/bin/bash
# Copyright (c) 2020 Icinga GmbH <info@icinga.com>
set -e
while getopts ":p:U:b:" opt
do
case "$opt" in
p)
PROJECT="$OPTARG"
;;
U)
UPSTREAM_GIT_URL="$OPTARG"
;;
b)
UPSTREAM_GIT_BRANCH="$OPTARG"
;;
\?)
echo "Unknown argument: $OPTARG" >&2
exit 1
;;
esac
done
: ${PROJECT:=l10n}
: ${PACKAGE:=icinga-l10n}
: ${UPSTREAM_GIT_URL:=https://github.com/Icinga/$PROJECT.git}
: ${UPSTREAM_GIT_BRANCH:=master}
set -x
if [ -z "$UPSTREAM_GIT_NOREPO" ]; then
if [ -d "${PROJECT}.git/" ]; then
cd "${PROJECT}.git"
if [ ! -d .git ]; then
echo "This is not a GIT repository: $(pwd)" >&2
exit 1
fi
if [ -z "$UPSTREAM_GIT_NOUPDATE" ]; then
if [ "$(git config remote.origin.url)" != "${UPSTREAM_GIT_URL}" ]; then
git remote set-url origin "${UPSTREAM_GIT_URL}"
fi
git fetch origin -p
git checkout -f "${UPSTREAM_GIT_BRANCH}"
git reset --hard "origin/${UPSTREAM_GIT_BRANCH}"
fi
git clean -fdx
elif [ -z "$UPSTREAM_GIT_NOUPDATE" ]; then
git clone -b "${UPSTREAM_GIT_BRANCH}" "${UPSTREAM_GIT_URL}" "${PROJECT}.git/"
cd "${PROJECT}.git"
else
echo "Missing '${PROJECT}.git' directory!" >&2
exit 1
fi
fi
git_version=$(git describe --tags "${UPSTREAM_GIT_BRANCH}")
package_version=$(echo "$git_version" | sed -e 's/^v//' -e 's/-/+/' -e 's/-/./g')
prefix="${PACKAGE}_${package_version}"
tarball="${prefix}.orig.tar"
git archive --format=tar --prefix="${prefix}/" -o "../${tarball}" "${UPSTREAM_GIT_BRANCH}"
cd ../
# pack tarball
gzip -vf9 "${tarball}"
sha256sum "${tarball}.gz"
# store package version for build scripts
printf '%s\t%s\t%s\t%s' \
"${package_version}" \
"$(git rev-parse "${UPSTREAM_GIT_BRANCH}")" \
"$(basename "${tarball}.gz")" \
"${UPSTREAM_GIT_BRANCH}" \
> "${PACKAGE}.version"
#!/bin/bash
sudo apt-get install -y icinga-l10n
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment