Skip to content

Commit

Permalink
Merge pull request #3 from Cray-HPE/feature/github-csm-1.2
Browse files Browse the repository at this point in the history
Feature/GitHub Add support for building in the CSM Jenkins and Artifactory in CSM 1.2
  • Loading branch information
rsjostrand-hpe authored Jul 20, 2021
2 parents d705373 + af0c30e commit 71c6c98
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.16.2
1.16.3
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).

## [1.16.3] - 2021-07-20

### Changed

- Add support for building within the CSM Jenkins.

## [1.16.2] - 2021-07-12

### Security
Expand Down
57 changes: 57 additions & 0 deletions Jenkinsfile.github
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
@Library('csm-shared-library') _

pipeline {
agent {
label "metal-gcp-builder"
}

options {
buildDiscarder(logRotator(numToKeepStr: "10"))
timestamps()
}

environment {
NAME = "cray-meds"
DESCRIPTION = "Cray mountain endpoint discovery service"
IS_STABLE = getBuildIsStable()
VERSION = getDockerBuildVersion(isStable: env.IS_STABLE)
DOCKER_ARGS = getDockerBuildArgs(name: "hms-meds", description: env.DESCRIPTION, version: env.VERSION)
CHART_NAME = "cray-hms-meds"
CHART_VERSION = getChartVersion(version: env.VERSION)
}

stages {
stage("Image") {
steps {
sh "make image"
}
}

stage("Chart") {
steps {
sh "make chart"
}
}

stage("Run Unit Tests") {
steps {
sh "make unittest"
}
}

stage("Run Coverage Tests") {
steps {
sh "make coverage"
}
}

stage("Publish") {
steps {
script {
publishCsmDockerImage(image: env.NAME, tag: env.VERSION, isStable: env.IS_STABLE)
publishCsmHelmCharts(component: env.CHART_NAME, chartsPath: "${WORKSPACE}/kubernetes/.packaged", isStable: env.IS_STABLE)
}
}
}
}
}
44 changes: 44 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

NAME ?= cray-meds
VERSION ?= $(shell cat .version)

# Helm Chart
CHART_PATH ?= kubernetes
CHART_NAME ?= cray-hms-meds
CHART_VERSION ?= local


all: image chart unittest coverage

image:
docker build --pull ${DOCKER_ARGS} --tag '${NAME}:${VERSION}' .

chart:
helm dep up ${CHART_PATH}/${CHART_NAME}
helm package ${CHART_PATH}/${CHART_NAME} -d ${CHART_PATH}/.packaged --version ${CHART_VERSION}

unittest:
./runUnitTest.sh

coverage:
./runCoverage.sh

2 changes: 1 addition & 1 deletion kubernetes/cray-hms-meds/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
description: "Kubernetes resources for cray-hms-meds"
name: "cray-hms-meds"
home: "HMS/hms-meds"
version: 1.16.2
version: 1.16.3

0 comments on commit 71c6c98

Please sign in to comment.