Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.31.0 for CSM 1.7 #393

Merged
merged 6 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.31.0] - 2024-11-01
### Removed
- Moved BOS reporter to https://github.com/Cray-HPE/bos-reporter

## [2.30.5] - 2024-10-15
### Fixed
- Fix per-bootset CFS setting
Expand Down
56 changes: 7 additions & 49 deletions Jenkinsfile.github
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,9 @@ pipeline {

environment {
NAME = "cray-bos"
REPORTER_NAME = "bos-reporter"
DESCRIPTION = "Cray Management System Boot Orchestration Service (BOS)"
RPTR_SPEC_FILE = "bos-reporter.spec"
IS_STABLE = getBuildIsStable()
DOCKER_BUILDKIT = "1"
BUILD_METADATA = getRpmRevision(isStable: env.IS_STABLE)
}

stages {
Expand Down Expand Up @@ -73,17 +70,6 @@ pipeline {
sh "make lint"
}
}
stage('Add RPM Metadata to bos-reporter') {
steps {
echo "RPM build metadata is ${env.BUILD_METADATA}"
runLibraryScript("addRpmMetaData.sh", env.RPTR_SPEC_FILE)
}
}
stage("RPM Build Prepare") {
steps {
sh "make rpm_prepare"
}
}
stage("Build Image and Chart") {
parallel {
stage('Image') {
Expand All @@ -110,43 +96,15 @@ pipeline {
sh "make chart"
}
}
stage("RPM Build") {
agent {
docker {
image "arti.hpc.amslabs.hpecorp.net/dstbuildenv-docker-master-local/cray-sle15sp5_build_environment:latest"
reuseNode true
// Support docker in docker for clamav scan
args "-v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker --group-add 999"
}
}
steps {
sh "make rptr_rpm_prepare"
sh "make rptr_rpm"
}
}
}
}
stage('Publish ') {
parallel {
stage('Image and Chart') {
environment {
DOCKER_VERSION = sh(returnStdout: true, script: "head -1 .docker_version").trim()
}
steps {
publishCsmDockerImage(image: env.NAME, tag: env.DOCKER_VERSION, isStable: env.IS_STABLE)
publishCsmHelmCharts(component: env.NAME, chartsPath: "${WORKSPACE}/kubernetes/.packaged", isStable: env.IS_STABLE)
}
}
stage("RPM Publish") {
steps {
script {
publishCsmRpms(component: env.REPORTER_NAME, pattern: "dist/rpmbuild/RPMS/noarch/*.rpm", os: "noos", arch: "noarch", isStable: env.IS_STABLE)
publishCsmRpms(component: env.REPORTER_NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", os: "noos", arch: "src", isStable: env.IS_STABLE)
}
sh "make rpm_build_clean"
sh "make rpm_build_source_clean"
}
}
stage('Publish Image and Chart') {
environment {
DOCKER_VERSION = sh(returnStdout: true, script: "head -1 .docker_version").trim()
}
steps {
publishCsmDockerImage(image: env.NAME, tag: env.DOCKER_VERSION, isStable: env.IS_STABLE)
publishCsmHelmCharts(component: env.NAME, chartsPath: "${WORKSPACE}/kubernetes/.packaged", isStable: env.IS_STABLE)
}
}
}
Expand Down
50 changes: 1 addition & 49 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
NAME ?= cray-bos
CHART_PATH ?= kubernetes
DOCKER_VERSION ?= $(shell head -1 .docker_version)
RPM_VERSION ?= $(shell head -1 .version)
RPM_RELEASE ?= $(shell head -1 .rpm_release)
API_VERSION ?= $(shell head -1 .api_version)
CHART_VERSION ?= $(shell head -1 .chart_version)

Expand All @@ -38,30 +36,14 @@ ifneq ($(wildcard ${HOME}/.netrc),)
DOCKER_ARGS ?= --secret id=netrc,src=${HOME}/.netrc
endif

# Common RPM variables
BUILD_METADATA ?= "1~development~$(shell git rev-parse --short HEAD)"

# We copy the built RPMs to these directories to simplify publishing them
RPM_IMAGE_DIR ?= dist/rpmbuild/RPMS/noarch
SRC_RPM_IMAGE_DIR ?= dist/rpmbuild/SRPMS

# bos-reporter RPM variables
RPTR_BUILD_DIR ?= $(PWD)/dist/bos-rptr-rpmbuild
RPTR_SPEC_NAME ?= bos-reporter
RPTR_SPEC_FILE ?= ${RPTR_SPEC_NAME}.spec
RPTR_SOURCE_NAME ?= ${RPTR_SPEC_NAME}-${RPM_VERSION}-${RPM_RELEASE}
RPTR_SOURCE_PATH := ${RPTR_BUILD_DIR}/SOURCES/${RPTR_SOURCE_NAME}.tar.bz2

all : runbuildprep lint image chart rptr_rpm
all : runbuildprep lint image chart
local: cms_meta_tools runbuildprep image chart_setup chart_package
chart: chart_setup chart_package chart_test
image: image_setup image_build image_build_pylint_errors image_run_pylint_errors image_build_pylint_full image_run_pylint_full
rptr_rpm: rptr_rpm_package_source rptr_rpm_build_source rptr_rpm_build

clone_input_files:
cp ${CHART_PATH}/${NAME}/Chart.yaml.in ${CHART_PATH}/${NAME}/Chart.yaml
cp ${CHART_PATH}/${NAME}/values.yaml.in ${CHART_PATH}/${NAME}/values.yaml
cp bos-reporter.spec.in bos-reporter.spec
cp constraints.txt.in constraints.txt
cp src/setup.py.in src/setup.py
cp api/openapi.yaml.in api/openapi.yaml
Expand All @@ -81,16 +63,6 @@ chart_setup:
lint:
./cms_meta_tools/scripts/runLint.sh

rpm_prepare:
mkdir -p $(RPM_IMAGE_DIR) \
$(SRC_RPM_IMAGE_DIR)
rptr_rpm_prepare:
rm -rf $(RPTR_BUILD_DIR)
mkdir -p $(RPTR_BUILD_DIR)/SPECS \
$(RPTR_BUILD_DIR)/SOURCES
cp $(RPTR_SPEC_FILE) $(RPTR_BUILD_DIR)/SPECS/
cat $(RPTR_SPEC_FILE) $(RPTR_BUILD_DIR)/SPECS/bos-reporter.spec

image_setup:
# Create list of BOS Python source files, to be checked later by pylint
find src/bos -type f -name \*.py -print | sed 's#^src/#/app/lib/#' | tr '\n' ' ' | tee srclist.txt
Expand All @@ -117,23 +89,3 @@ chart_package:
chart_test:
helm lint "${CHART_PATH}/${NAME}"
docker run --rm -v ${PWD}/${CHART_PATH}:/apps ${HELM_UNITTEST_IMAGE} -3 ${NAME}

rptr_rpm_package_source:
tar --transform 'flags=r;s,^,/$(RPTR_SOURCE_NAME)/,' -cvjf $(RPTR_SOURCE_PATH) \
./${RPTR_SPEC_FILE} \
./src \
./LICENSE

rptr_rpm_build_source:
BUILD_METADATA=$(BUILD_METADATA) rpmbuild -ts $(RPTR_SOURCE_PATH) --define "_topdir $(RPTR_BUILD_DIR)"
cp $(RPTR_BUILD_DIR)/SRPMS/*.rpm $(SRC_RPM_IMAGE_DIR)

rptr_rpm_build:
BUILD_METADATA=$(BUILD_METADATA) rpmbuild -ba $(RPTR_SPEC_FILE) --define "_topdir $(RPTR_BUILD_DIR)"
cp $(RPTR_BUILD_DIR)/RPMS/noarch/*.rpm $(RPM_IMAGE_DIR)

rpm_build_clean:
rm -rf $(RPM_IMAGE_DIR)/*

rpm_build_source_clean:
rm -rf $(SRC_RPM_IMAGE_DIR)/*
117 changes: 0 additions & 117 deletions bos-reporter.spec.in

This file was deleted.

2 changes: 1 addition & 1 deletion git_info.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ chart: kubernetes/cray-bos/Chart.yaml
# - commit-date: ${GIT_COMMIT_DATE}
# - commit-id: "${GIT_COMMIT_ID}

specfile: bos-reporter.spec
#specfile:

# For specified Dockerfile lines, the first field specifies the filename of the
# Dockerfile. All subsequent lines are the name of the containers where you
Expand Down
1 change: 0 additions & 1 deletion src/bos/reporter/.reporter_version

This file was deleted.

1 change: 0 additions & 1 deletion src/bos/reporter/README.md

This file was deleted.

42 changes: 0 additions & 42 deletions src/bos/reporter/__init__.py

This file was deleted.

Loading
Loading