Skip to content

Commit

Permalink
Feature/GitHub csm1.1 (#5)
Browse files Browse the repository at this point in the history
* Added github Jenkins and Make files

* Version to 1.8.2

* Fixed Documentation typo

Co-authored-by: Mike Buchmann <[email protected]>
  • Loading branch information
mbuchmann-hpe and Mike Buchmann authored Jul 21, 2021
1 parent 7a1adc0 commit e6c58c8
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.1
1.8.2
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ 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.8.2] - 2021-07-20

### Added

- Conversion for github
- Added Makefile
- Added Jenkinsfile.github

## [1.8.1] - 2021-07-02

### Changed
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-firmware-action"
DESCRIPTION = "Cray firmware action service"
IS_STABLE = getBuildIsStable()
VERSION = getDockerBuildVersion(isStable: env.IS_STABLE)
DOCKER_ARGS = getDockerBuildArgs(name: "hms-firmware-action", description: env.DESCRIPTION, version: env.VERSION)
CHART_NAME = "cray-hms-firmware-action"
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 Integration Tests") {
steps {
sh "make integration"
}
}

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)
}
}
}
}
}
42 changes: 42 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# (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-firmware-action
VERSION ?= $(shell cat .version)

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

all: image chart unittest integration

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

integration:
./runIntegration.sh
2 changes: 1 addition & 1 deletion docs/user/LoadingFirmwareImages.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ FAS will return a loaderRunID.
Use the loaderRunID to check the results of the loader run.
To load the firmware from Nexus into FAS, use the following command:
```bash
cray fas loader nexus update
cray fas loader nexus create

loaderRunID = "c2b7e9bb-f428-4e4c-aa83-d8fd8bcfd820"
```
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/cray-hms-firmware-action/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-firmware-action"
name: "cray-hms-firmware-action"
home: "HMS/hms-firmware-action"
version: 1.8.1
version: 1.8.2

0 comments on commit e6c58c8

Please sign in to comment.