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 {
agent {
dockerfile {
dir 'ci'
args '''
-v /etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts
--pids-limit 16384
'''
additionalBuildArgs '''\
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
'''
kubernetes {
yamlFile 'ci/podTemplate.yaml'
defaultContainer 'buildroot'
workspaceVolume persistentVolumeClaimWorkspaceVolume(
claimName: 'jenkins-ws-metricspi'
)
}
}
@ -20,10 +16,6 @@ pipeline {
disableConcurrentBuilds()
}
triggers {
pollSCM ''
}
parameters {
booleanParam \
name: 'Clean',
@ -32,6 +24,9 @@ pipeline {
environment {
BUILDROOT_SRC = "${env.WORKSPACE}/buildroot"
TMPDIR = "${env.WORKSPACE_TMP}"
TEMP = "${env.WORKSPACE_TMP}"
TMP = "${env.WORKSPACE_TMP}"
}
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_LICENSE = Apache-2.0
VICTORIAMETRICS_LICENSE_FILES = LICENSE
@ -8,37 +8,37 @@ VICTORIAMETRICS_TAGS = netgo osusergo nethttpomithttp2 musl
VICTORIAMETRICS_INSTALL_BINS =
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_SINGLE),y)
VICTORIAMETRICS_BUILD_TARGETS = app/victoria-metrics
VICTORIAMETRICS_BUILD_CMDS = $(MAKE) victoria-metrics
VICTORIAMETRICS_INSTALL_BINS += victoria-metrics
endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMAGENT),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmagent
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmagent
VICTORIAMETRICS_INSTALL_BINS += vmagent
endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMALERT),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmalert
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmalert
VICTORIAMETRICS_INSTALL_BINS += vmalert
endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMAUTH),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmauth
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmauth
VICTORIAMETRICS_INSTALL_BINS += vmauth
endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMBACKUP),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmbackup
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmbackup
VICTORIAMETRICS_INSTALL_BINS += vmbackup
endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMRESTORE),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmrestore
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmrestore
VICTORIAMETRICS_INSTALL_BINS += vmrestore
endif
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMCTL),y)
VICTORIAMETRICS_BUILD_TARGETS += app/vmctl
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmctl
VICTORIAMETRICS_INSTALL_BINS += vmctl
endif
@ -70,4 +70,4 @@ define VICTORIAMETRICS_USERS
victoriametrics -1 victoriametrics -1 * /var/lib/victoria-metrics /sbin/nologin -
endef
$(eval $(golang-package))
$(eval $(generic-package))