Skip to content

Commit

Permalink
Merge branch 'release/csm-1.1' into release/csm-1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mharding-hpe committed Aug 18, 2021
2 parents a8761da + f29b0e1 commit 2613e1f
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 10 deletions.
1 change: 0 additions & 1 deletion .version

This file was deleted.

16 changes: 11 additions & 5 deletions Jenkinsfile.github
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@Library('csm-shared-library') _
@Library('cms-meta-tools') _
@Library('csm-shared-library') __

pipeline {
agent {
Expand All @@ -13,16 +14,21 @@ pipeline {
environment {
NAME = "cf-ca-cert-config-framework"
IS_STABLE = getBuildIsStable()
RPM_VERSION = sh(returnStdout: true, script: "head -1 .version").trim()
BUILD_METADATA = getRpmRevision(isStable: env.IS_STABLE)
}

stages {
stage("Clone cms_meta_tools repo") {
steps {
withCredentials([gitUsernamePassword(credentialsId: 'jenkins-algol60-cray-hpe-github-integration')]) {
sh 'git clone --depth 1 --no-single-branch https://github.com/Cray-HPE/cms-meta-tools.git ./cms_meta_tools'
}
// This function is defined in cms-meta-tools:vars/cloneCMSMetaTools.groovy
cloneCMSMetaTools()
}
}

stage("Set Versions") {
steps {
// This function is defined in cms-meta-tools:vars/setVersionFiles.groovy
setVersionFiles()
}
}

Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,30 @@
An Ansible role for installing a CA certificate onto the system.

## Build Helpers
This repo uses some build helper scripts from the
This repo uses some build helpers from the
[cms-meta-tools](https://github.com/Cray-HPE/cms-meta-tools) repo. See that repo for more details.

## Local Builds
If you wish to perform a local build, you will first need to clone or copy the contents of the
cms-meta-tools repo to `./cms_meta_tools` in the same directory as the `Makefile`.
cms-meta-tools repo to `./cms_meta_tools` in the same directory as the `Makefile`. When building
on github, the cloneCMSMetaTools() function clones the cms-meta-tools repo into that directory.

### Versioning
Use [SemVer](http://semver.org/). The version is located in the [.version](.version) file.
For a local build, you will also need to manually write the .version, .docker_version (if this repo
builds a docker image), and .chart_version (if this repo builds a helm chart) files. When building
on github, this is done by the setVersionFiles() function.

## Versioning
The version of this repo is generated dynamically at build time by running the version.py script in
cms-meta-tools. The version is included near the very beginning of the github build output.

In order to make it easier to go from an artifact back to the source code that produced that artifact,
a text file named gitInfo.txt is added to Docker images built from this repo. For Docker images,
it can be found in the / folder. This file contains the branch from which it was built and the most
recent commits to that branch.

For helm charts, a few annotation metadata fields are appended which contain similar information.

For RPMs, a changelog entry is added with similar information.

### Copyright and License
This project is copyrighted by Hewlett Packard Enterprise Development LP and is under the MIT
Expand Down
36 changes: 36 additions & 0 deletions git_info.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# If this file exists, the git_info.sh tool will create gitInfo.txt, containing
# the git branch and information on the latest commit

# A file can contain any number of chart, specfile, and/or dockerfile lines

# For chart: lines, the specified file will have git information
# appended to it as annotation metadata:
# annotations:
# git/branch: "${GIT_BRANCH}"
# git/commit-date: "${GIT_COMMIT_DATE}"
# git/commit-id: "${GIT_COMMIT_ID}"

#chart: kubernetes/cray-crus/Chart.yaml

# For specfile lines, the specified specfile will have the following lines inserted
# after the %changelog line:
# * <date> Cray HPE
# - build metadata
# - branch: ${GIT_BRANCH}
# - commit-date: ${GIT_COMMIT_DATE}
# - commit-id: "${GIT_COMMIT_ID}
#
# If no %changelog line is found, one will be appended to the end of the file, followed
# by the above lines

specfile: cf-ca-cert.spec

# For specified Dockerfile lines, the first field specifies the filename of the
# Dockerfile. All subsequent lines are the name of the containers where you
# want to copy the gitInfo.txt file. The script looks for lines of the form
# FROM <whatever> as <containername>
# After each line that matches a container name you specified, the tool will
# insert this line:
# COPY gitInfo.txt gitInfo.txt

#dockerfile: Dockerfile base

0 comments on commit 2613e1f

Please sign in to comment.