Skip to content

Commit

Permalink
Feature/GitHub Add support for building in CSM Jenkins and Artifactory (
Browse files Browse the repository at this point in the history
#1)

* Initial changes to add Jenkinsfile.github and Makefile for github jenkins pipeline
* Increased version to 1.6.1
  • Loading branch information
shunr-hpe authored Jul 22, 2021
1 parent e12bfe9 commit b5789ca
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.6.1
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.6.1] - 2021-07-22

### Changed

- Add support for building within the CSM Jenkins.

## [1.6.0] - 2021-06-28

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

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

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

environment {
NAME = "hms-trs-app-api"
DESCRIPTION = "Cray HMS TRS API library package."
IS_STABLE = getBuildIsStable()
VERSION = getDockerBuildVersion(isStable: env.IS_STABLE)
DOCKER_ARGS = getDockerBuildArgs(name: env.NAME, description: env.DESCRIPTION, version: env.VERSION)
}

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

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

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

stage("Integration") {
steps {
sh "make integration"
}
}
}
}
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# (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 ?= hms-trs-app-api
VERSION ?= $(shell cat .version)

all: image unittest coverage integration

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

unittest:
./runUnitTest.sh

coverage:
./runCoverage.sh

integration:
./runIntegration.sh

0 comments on commit b5789ca

Please sign in to comment.