Compare commits

...

2 Commits

Author SHA1 Message Date
Dustin 0f7b48e357 p/vm: Upgrade to v1.80.0
dustin/metricspi/pipeline/pr-master There was a failure building this commit Details
Switching from the `golang-package` macro to the `generic-package` macro
in order to make use of upstream's makefiles.  This will ensure that the
correct flags are passed to the Go compiler, especially those related to
embedding the version string in the binary.  Without this, the
`vm_app_version` metrics exposed by each application will be empty.
2022-08-29 14:19:54 -05:00
Dustin 06b04abf47 ci: Switch to K8s build agent
dustin/metricspi/pipeline/pr-master This commit looks good Details
dustin/metricspi/pipeline/head Something is wrong with the build of this commit Details
2022-08-29 11:30:41 -05:00
4 changed files with 38 additions and 50 deletions

View File

@ -1,27 +0,0 @@
FROM registry.fedoraproject.org/fedora:30
ARG UID
ARG GID
RUN groupadd -g ${GID} jenkins \
&& useradd -u ${UID} -g ${GID} -m -d /var/lib/jenkins -l jenkins
RUN dnf install -y \
bc \
bzip2 \
cpio \
diffutils \
g++ \
gcc \
git \
make \
ncurses-devel \
openssh-clients \
patch \
perl-ExtUtils-MakeMaker \
perl-Thread-Queue \
rsync \
systemd \
wget \
which \
&& dnf clean all

23
ci/Jenkinsfile vendored
View File

@ -2,16 +2,12 @@
pipeline { pipeline {
agent { agent {
dockerfile { kubernetes {
dir 'ci' yamlFile 'ci/podTemplate.yaml'
args ''' defaultContainer 'buildroot'
-v /etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts workspaceVolume persistentVolumeClaimWorkspaceVolume(
--pids-limit 16384 claimName: 'jenkins-ws-metricspi'
''' )
additionalBuildArgs '''\
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
'''
} }
} }
@ -20,10 +16,6 @@ pipeline {
disableConcurrentBuilds() disableConcurrentBuilds()
} }
triggers {
pollSCM ''
}
parameters { parameters {
booleanParam \ booleanParam \
name: 'Clean', name: 'Clean',
@ -32,6 +24,9 @@ pipeline {
environment { environment {
BUILDROOT_SRC = "${env.WORKSPACE}/buildroot" BUILDROOT_SRC = "${env.WORKSPACE}/buildroot"
TMPDIR = "${env.WORKSPACE_TMP}"
TEMP = "${env.WORKSPACE_TMP}"
TMP = "${env.WORKSPACE_TMP}"
} }
stages { stages {

20
ci/podTemplate.yaml Normal file
View File

@ -0,0 +1,20 @@
spec:
securityContext:
fsGroup: 1000
containers:
- name: buildroot
image: registry.pyrocufflink.blue/buildroot
command:
- sleep
- infinity
volumeMounts:
- name: tmp
mountPath: /tmp
securityContext:
readOnlyRootFilesystem: true
runAsUser: 1000
volumes:
- name: tmp
emptyDir:
medium: Memory
sizeLimit: 100Mi

View File

@ -1,4 +1,4 @@
VICTORIAMETRICS_VERSION = 1.78.0 VICTORIAMETRICS_VERSION = 1.80.0
VICTORIAMETRICS_SITE = $(call github,VictoriaMetrics,VictoriaMetrics,v$(VICTORIAMETRICS_VERSION)) VICTORIAMETRICS_SITE = $(call github,VictoriaMetrics,VictoriaMetrics,v$(VICTORIAMETRICS_VERSION))
VICTORIAMETRICS_LICENSE = Apache-2.0 VICTORIAMETRICS_LICENSE = Apache-2.0
VICTORIAMETRICS_LICENSE_FILES = LICENSE VICTORIAMETRICS_LICENSE_FILES = LICENSE
@ -8,37 +8,37 @@ VICTORIAMETRICS_TAGS = netgo osusergo nethttpomithttp2 musl
VICTORIAMETRICS_INSTALL_BINS = VICTORIAMETRICS_INSTALL_BINS =
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_SINGLE),y) ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_SINGLE),y)
VICTORIAMETRICS_BUILD_TARGETS = app/victoria-metrics VICTORIAMETRICS_BUILD_CMDS = $(MAKE) victoria-metrics
VICTORIAMETRICS_INSTALL_BINS += victoria-metrics VICTORIAMETRICS_INSTALL_BINS += victoria-metrics
endif endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMAGENT),y) ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMAGENT),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmagent VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmagent
VICTORIAMETRICS_INSTALL_BINS += vmagent VICTORIAMETRICS_INSTALL_BINS += vmagent
endif endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMALERT),y) ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMALERT),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmalert VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmalert
VICTORIAMETRICS_INSTALL_BINS += vmalert VICTORIAMETRICS_INSTALL_BINS += vmalert
endif endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMAUTH),y) ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMAUTH),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmauth VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmauth
VICTORIAMETRICS_INSTALL_BINS += vmauth VICTORIAMETRICS_INSTALL_BINS += vmauth
endif endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMBACKUP),y) ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMBACKUP),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmbackup VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmbackup
VICTORIAMETRICS_INSTALL_BINS += vmbackup VICTORIAMETRICS_INSTALL_BINS += vmbackup
endif endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMRESTORE),y) ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMRESTORE),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmrestore VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmrestore
VICTORIAMETRICS_INSTALL_BINS += vmrestore VICTORIAMETRICS_INSTALL_BINS += vmrestore
endif endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMCTL),y) ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMCTL),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmctl VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmctl
VICTORIAMETRICS_INSTALL_BINS += vmctl VICTORIAMETRICS_INSTALL_BINS += vmctl
endif endif
@ -70,4 +70,4 @@ define VICTORIAMETRICS_USERS
victoriametrics -1 victoriametrics -1 * /var/lib/victoria-metrics /sbin/nologin - victoriametrics -1 victoriametrics -1 * /var/lib/victoria-metrics /sbin/nologin -
endef endef
$(eval $(golang-package)) $(eval $(generic-package))