- new: to customize the RELEASE in integration mode (STATUS=integration), STATUS_INTEGRATION_RELEASE was introduced.
- new: new variables OPSI_REPOS_UPLOAD_* to defined the artifacts uploading to the repository - new: new files <product>.(zsync|md5) created for better integration to opsi-product-updater -
This commit is contained in:
parent
95fe669573
commit
14537d40ca
@ -21,12 +21,20 @@ DEBUG_LEVEL=
|
|||||||
# release : passed the testing and go's to productive
|
# release : passed the testing and go's to productive
|
||||||
STATUS="integration"
|
STATUS="integration"
|
||||||
|
|
||||||
|
# STATUS_INTEGRATION_RELEASE - automatically created release number,
|
||||||
|
# if STATUS is set to "integration". Valid values: anything, default value: "`date +%Y%m%d%H%M`"
|
||||||
|
# Samples:
|
||||||
|
# "`date +%Y%m%d%H%M`"
|
||||||
|
# "$BUILD_NUMBER" - jenkins https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables
|
||||||
|
STATUS_INTEGRATION_RELEASE="`date +%Y%m%d%H%M`"
|
||||||
|
|
||||||
# CHECKSUM_AUTOCREATE - Every downloaded file is checked using SHA1 algorithm
|
# CHECKSUM_AUTOCREATE - Every downloaded file is checked using SHA1 algorithm
|
||||||
# against a checksum file, if this file ist not available, it will be created
|
# against a checksum file, if this file ist not available, it will be created
|
||||||
# on-the-fly, dependent on this setting.
|
# on-the-fly, dependent on this setting.
|
||||||
# Valid values: true|false, Default: false
|
# Valid values: true|false, Default: false
|
||||||
CHECKSUM_AUTOCREATE=false
|
CHECKSUM_AUTOCREATE=false
|
||||||
|
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
# CREATOR
|
# CREATOR
|
||||||
###############################
|
###############################
|
||||||
@ -54,6 +62,17 @@ OPSI_REPOS_FILE_PATTERN=${PN}_${VERSION}-${CREATOR_TAG}${RELEASE}
|
|||||||
# Force alway upload to opsi repos
|
# Force alway upload to opsi repos
|
||||||
# OPSI_REPOS_FORCE_UPLOAD=true
|
# OPSI_REPOS_FORCE_UPLOAD=true
|
||||||
|
|
||||||
|
# define the artifacts uploading to the repository
|
||||||
|
# Default:
|
||||||
|
# OPSI_REPOS_UPLOAD_SOURCE : product directory
|
||||||
|
# OPSI_REPOS_UPLOAD_OPSI : opsi package
|
||||||
|
# OPSI_REPOS_UPLOAD_BIN : file used by opsi package creation
|
||||||
|
# OPSI_REPOS_UPLOAD_OPSI_ZSYNC : additional files (*.md5, *.zsync) to sync opsi package using opsi-product-updater
|
||||||
|
OPSI_REPOS_UPLOAD_OPSI=true
|
||||||
|
OPSI_REPOS_UPLOAD_OPSI_ZSYNC=false
|
||||||
|
OPSI_REPOS_UPLOAD_SOURCE=true
|
||||||
|
OPSI_REPOS_UPLOAD_BIN=false
|
||||||
|
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
# Distribution / Vendor settings
|
# Distribution / Vendor settings
|
||||||
|
@ -31,13 +31,13 @@ builder_config() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Read ONLY the STATUS variable from the build configuration file
|
# Read ONLY the STATUS variable from the build configuration file
|
||||||
eval "`grep -E "^STATUS=" $config`"
|
eval "`grep -E "^(STATUS|STATUS_INTEGRATION_RELEASE)=" $config`"
|
||||||
|
|
||||||
# change some variable from the builder-product.cfg dynamically:
|
# change some variable from the builder-product.cfg dynamically:
|
||||||
# autogenerate release number, if we are in status "integration"
|
# autogenerate release number, if we are in status "integration"
|
||||||
if [ "$STATUS" = "integration" ] ; then
|
if [ "$STATUS" = "integration" ] ; then
|
||||||
# OPSI/control:RELEASE is limited to max 16 chars - take care in regards to the CREATOR_TAG
|
# OPSI/control:RELEASE is limited to max 16 chars - take care in regards to the CREATOR_TAG
|
||||||
RELEASE="`date +%Y%m%d%H%M`"
|
RELEASE="${STATUS_INTEGRATION_RELEASE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Read configurationfile
|
# Read configurationfile
|
||||||
@ -231,8 +231,9 @@ builder_package() {
|
|||||||
builder_check_error "can't move file ${OUTPUT_DIR}/${opsi_file} ${OUTPUT_DIR}/${OPSI_REPOS_FILE_PATTERN}.opsi"
|
builder_check_error "can't move file ${OUTPUT_DIR}/${opsi_file} ${OUTPUT_DIR}/${OPSI_REPOS_FILE_PATTERN}.opsi"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# create source package
|
# create source- and binary package package
|
||||||
zip -r ${OUTPUT_DIR}/${OPSI_REPOS_FILE_PATTERN}.zip $INST_DIR
|
test "${OPSI_REPOS_UPLOAD_BIN}" = "true" && zip -r ${OUTPUT_DIR}/${OPSI_REPOS_FILE_PATTERN}.zip $INST_DIR
|
||||||
|
test "${OPSI_REPOS_UPLOAD_SOURCE}" = "true" && zip -r ${OUTPUT_DIR}/${OPSI_REPOS_FILE_PATTERN}-src.zip ${PRODUCT_DIR}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -249,8 +250,30 @@ builder_publish() {
|
|||||||
local dst=${OPSI_REPOS_PRODUCT_DIR}/${OPSI_REPOS_FILE_PATTERN}
|
local dst=${OPSI_REPOS_PRODUCT_DIR}/${OPSI_REPOS_FILE_PATTERN}
|
||||||
|
|
||||||
# copy files
|
# copy files
|
||||||
|
if [ "${OPSI_REPOS_UPLOAD_OPSI}" = "true" ] ; then
|
||||||
cp ${src}.opsi ${dst}.opsi
|
cp ${src}.opsi ${dst}.opsi
|
||||||
builder_check_error "Can't upload file $dst --> $dst"
|
builder_check_error "Can't upload file $dst.opsi --> $dst.opsi"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${OPSI_REPOS_UPLOAD_BIN}" = "true" ] ; then
|
||||||
|
cp ${src}.zip ${dst}.zip
|
||||||
|
builder_check_error "Can't upload file $dst.zip --> $dst.zip"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${OPSI_REPOS_UPLOAD_SOURCE}" = "true" ] ; then
|
||||||
|
cp ${src}-src.zip ${dst}-src.zip
|
||||||
|
builder_check_error "Can't upload file ${dst}-src.zip --> ${dst}-src.zip"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${OPSI_REPOS_UPLOAD_OPSI_ZSYNC}" = "true" ] ; then
|
||||||
|
md5sum "${dst}.opsi" | sed 's/ .*//' > ${dst}.opsi.md5
|
||||||
|
builder_check_error "Can't create md5 file"
|
||||||
|
|
||||||
|
zsyncmake -u ${OPSI_REPOS_FILE_PATTERN}.opsi -o "${dst}.opsi.zsync" "${dst}.opsi"
|
||||||
|
builder_check_error "Can't create zsync file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user