Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jlab/hallc/analyzer_software/hcana
  • whit/hcana
2 results
Show changes
Commits on Source (107)
Showing
with 535 additions and 426 deletions
...@@ -5,7 +5,6 @@ AccessModifierOffset: -2 ...@@ -5,7 +5,6 @@ AccessModifierOffset: -2
AlignAfterOpenBracket: Align AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Right
AlignOperands: true AlignOperands: true
AlignTrailingComments: true AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true
...@@ -29,24 +28,17 @@ BraceWrapping: ...@@ -29,24 +28,17 @@ BraceWrapping:
AfterObjCDeclaration: false AfterObjCDeclaration: false
AfterStruct: false AfterStruct: false
AfterUnion: false AfterUnion: false
AfterExternBlock: false
BeforeCatch: false BeforeCatch: false
BeforeElse: false BeforeElse: false
IndentBraces: false IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true BreakStringLiterals: true
ColumnLimit: 100 ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:' CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4 ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4 ContinuationIndentWidth: 4
...@@ -54,12 +46,10 @@ Cpp11BracedListStyle: true ...@@ -54,12 +46,10 @@ Cpp11BracedListStyle: true
DerivePointerAlignment: false DerivePointerAlignment: false
DisableFormat: false DisableFormat: false
ExperimentalAutoDetectBinPacking: false ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros: ForEachMacros:
- foreach - foreach
- Q_FOREACH - Q_FOREACH
- BOOST_FOREACH - BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories: IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/' - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2 Priority: 2
...@@ -69,7 +59,6 @@ IncludeCategories: ...@@ -69,7 +59,6 @@ IncludeCategories:
Priority: 1 Priority: 1
IncludeIsMainRegex: '(Test)?$' IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 2 IndentWidth: 2
IndentWrappedFunctionNames: false IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave JavaScriptQuotes: Leave
...@@ -82,7 +71,6 @@ NamespaceIndentation: All ...@@ -82,7 +71,6 @@ NamespaceIndentation: All
ObjCBlockIndentWidth: 2 ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19 PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300 PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120 PenaltyBreakFirstLessLess: 120
...@@ -90,12 +78,8 @@ PenaltyBreakString: 1000 ...@@ -90,12 +78,8 @@ PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000 PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60 PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left PointerAlignment: Left
RawStringFormats:
- Language: TextProto
BasedOnStyle: google
ReflowComments: true ReflowComments: true
SortIncludes: true SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true SpaceBeforeAssignmentOperators: true
...@@ -111,5 +95,6 @@ SpacesInSquareBrackets: false ...@@ -111,5 +95,6 @@ SpacesInSquareBrackets: false
Standard: Cpp11 Standard: Cpp11
TabWidth: 8 TabWidth: 8
UseTab: Never UseTab: Never
ConstructorInitializerAllOnOneLineOrOnePerLine: true
... ...
FROM eicweb.phy.anl.gov:4567/containers/image_recipes/root_spack:@CONTAINER_TAG@
LABEL maintainer "Sylvester Joosten <sjoosten@anl.gov>"
RUN cd /tmp \
&& export CLICOLOR_FORCE=1 \
&& git clone https://eicweb.phy.anl.gov/jlab/hallc/analyzer_software/hallac_evio.git \
&& mkdir hallac_evio/build && cd hallac_evio/build \
&& cmake ../. && make -j20 && make install \
&& cd /tmp && rm -rf hallac_evio \
&& git clone https://eicweb.phy.anl.gov/jlab/hallc/analyzer_software/analyzer.git \
&& mkdir analyzer/build && cd analyzer/build && git pull && git checkout v1.8.3 \
&& cmake ../. && make -j20 && make -j4 install \
&& cd /tmp && rm -rf analyzer
## 2 layers so we can isolate hcana from the rest of the stack
RUN cd /tmp \
&& export CLICOLOR_FORCE=1 \
&& git clone -b @HCANA_BRANCH@ https://eicweb.phy.anl.gov/jlab/hallc/analyzer_software/hcana.git \
&& mkdir hcana/build && cd hcana/build \
&& cmake ../. && make -j20 && make -j4 install \
&& cd /tmp && rm -rf hcana
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
# exports variables in config.env as environment variables
export $(shell sed 's/=.*//' $(cnf))
SHELL = bash
# grep the version from the mix file
VERSION=$(shell bash version.sh)
TAG_VERSION=$(VERSION)
LONG_TAG=$(VERSION)-$(PUBLISH_TAG)
# help will output the help for each task
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
# ==========================================================================
#
build: ## build the image
docker build -t $(APP_NAME):$(LONG_TAG) .
build-nc: ## Build the container without caching (from scratch)
docker build --no-cache -t $(APP_NAME):$(LONG_TAG) .
# ==========================================================================
#
login: ## Auto login to AWS-ECR unsing aws-cli
@docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
echo "Login COMPLETE"
# ==========================================================================
#
publish: login ## Publish a tagged container to ECR
@echo 'publish $(PUBLISH_TAG) to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)'
docker tag $(APP_NAME):$(LONG_TAG) $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(PUBLISH_TAG)
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(PUBLISH_TAG)
docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(PUBLISH_TAG)
publish-version: login ## Publish the `{version}` taged container to ECR
@echo 'publish $(VERSION) to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION)'
docker tag $(APP_NAME):$(LONG_TAG) $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION)
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION)
docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION)
# ==========================================================================
# remove container from registry
unpublish: login
@echo 'removing $(PUBLISH_TAG)'
curl --request DELETE --header "PRIVATE-TOKEN: $(CI_JOB_TOKEN)" "$(REG_API_URL)/$(PUBLISH_TAG)"
# ==========================================================================
# cleanup docker registry on system used by runner
cleanup:
@echo 'removing $(REG_NAME):$(LONG_TAG)'
docker rmi $(REG_NAME):$(LONG_TAG)
# Port to run the container # Port to run the container
PORT=4000
REG_TOKEN ?= ${CI_IMAGE_BUILD_PAT}
REG_USER ?= whit
REG_NAME ?= eicweb.phy.anl.gov:4567
REG_HOST ?= eicweb.phy.anl.gov:4567
# name of alternate build:
# Dockerfile.$(ALT_NAME) --> $(APP_NAME)_${ALT_NAME}
ALT_NAME ?= broadwell
APP_NAME = hcana APP_NAME = hcana
REPO_NAME = hcana REPO_NAME = hcana
DH_ORG = hallac
GL_GROUP = jlab/hallc/analyzer_software
GL_REG_GROUP = jlab/hallc/analyzer_software
GL_REG_NAME = hcana
REPO = hcana
TAG_VERSION = latest
REG_HOST ?= eicweb.phy.anl.gov
REG_NAME ?= eicweb.phy.anl.gov:4567
REG_PORT ?= 4567
REG_URL ?= https://$(REG_HOST)
GL_GROUP = jlab/hallc/analyzer_software
GL_REG_GROUP = jlab/hallc/analyzer_software/hcana
GL_REG_NAME = $(REG_NAME)
PUBLISH_TAG = $(HCANA_TAG)
REG_API_URL = $(REG_URL)/api/v4/projects/$(CI_PROJECT_ID)/registry/repositories/49/tags
Bootstrap: docker
From: eicweb.phy.anl.gov:4567/jlab/hallc/analyzer_software/hcana:@HCANA_TAG@
%help
singularity container for hcana development
%labels
Maintainer "Whitney Armstrong, Sylvester Joosten"
Version v1-dev
%post -c /bin/bash
echo " -------------------------------------------------"
echo " ===> Image setup complete"
echo " -------------------------------------------------"
#!/bin/bash #!/bin/bash
echo "0.1" cat ../VERSION
...@@ -60,6 +60,7 @@ examples/cache ...@@ -60,6 +60,7 @@ examples/cache
work work
build* build*
build/ build/
BUILD/
*.swp *.swp
*.swo *.swo
image: eicweb.phy.anl.gov:4567/whit/image_recipes/root_base:latest variables:
CONTAINER_TAG: "1.4.0"
default:
image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest
tags:
- silicon
stages: stages:
- config
- build - build
- build_sing_img - push
- data_replays - deploy
- data_tests - cleanup
hcana_docker: workflow:
stage: build rules:
tags: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- eic0 docker - if: '$CI_COMMIT_BRANCH == "master"'
script: - if: '$CI_COMMIT_TAG'
- docker login eicweb.phy.anl.gov -u whit -p ${CI_IMAGE_BUILD_PAT}
- cd containers/docker && make release
hcana_singularity: env:
tags: stage: config
- singularity
stage: build_sing_img
#when: manual
dependencies:
- hcana_docker
script: script:
- /bin/bash .gitlabci/setup.sh - export HCANA_TAG="latest"
- mkdir -p build - |
- pwd if [ "x${CI_PIPELINE_SOURCE}" == "xmerge_request_event" ]; then
- cp containers/singularity/Singularity Singularity.hcana export HCANA_TAG="testing-mr-${CI_MERGE_REQUEST_IID}"
- cp Singularity.hcana build/. fi
- /bin/bash .gitlabci/build.sh Singularity.hcana - echo "CI HCANA_TAG for this pipeline set to ${HCANA_TAG}"
- cp Singularity.hcana.simg build/. - echo "HCANA_TAG=$HCANA_TAG" >> hcana.env
artifacts: artifacts:
paths: reports:
- build/Singularity.hcana dotenv: hcana.env
- build/Singularity.hcana.simg
elastic_replay: docker:
when: manual stage: build
tags: needs:
- eic0 docker - env
stage: data_replays
dependencies:
- hcana_singularity
script: script:
- bash tests/replay_elastic_data.sh - echo $HCANA_TAG
artifacts: - ./.gitlabci/configure.sh .containers/Dockerfile.in
paths: - cd .containers
- ROOTfiles/* - make build-nc
- build/Singularity.hcana
- build/Singularity.hcana.simg
## for now only publish the stable versions to the registry.
elastic_test1: ## if we change this down the line for some CI-time testing
when: manual ## make sure to also enable the cleanup job
tags: publish:
- eic0 docker stage: push
stage: data_tests rules:
dependencies: - if: '$CI_COMMIT_BRANCH == "master"'
- elastic_replay when: manual
- if: '$CI_COMMIT_TAG'
when: manual
needs:
- env
- docker
script: script:
- bash tests/elastic_test.sh - cd .containers
- |
if [ "x$CI_COMMIT_TAG" != "x" ]; then
make publish publish-version
else
make publish
fi
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
elastic_test2: .singularity:
when: manual stage: deploy
tags: needs:
- eic0 docker - env
stage: data_tests - publish
dependencies:
- elastic_replay
script: script:
- bash tests/elastic_test2.sh - ./.gitlabci/configure.sh .containers/hcana.def.in
- mkdir -p build
- mv .containers/hcana.def build
- singularity build build/hcana.sif build/hcana.def
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
singularity:latest:
extends: .singularity
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: manual
- if: '$CI_COMMIT_TAG'
when: manual
artifacts:
expire_in: 90 days
paths:
- build/hcana.sif
- build/hcana.def
purge_image:
stage: cleanup
needs:
- env
- publish
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
script:
- cd .containers
- make cleanup || true
- make unpublish || true
File mode changed from 100644 to 100755
#!/bin/bash
## Configure a CI file based on a template file (first and only
## argument to this script).
## Known variables that will be substituted:
## @CONTAINER_TAG@ - docker tag for the ROOT container
## @HCANA_TAG@ - output tag for the hcana version
## @HCANA_BRANCH@ - hcana git branch for build
TEMPLATE_FILE=$1
OUTPUT_FILE=${TEMPLATE_FILE%.*}
HCANA_BRANCH="master"
if [ -n "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}" ] ; then
HCANA_BRANCH=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
elif [ "x$CI_COMMIT_TAG" != "x" ]; then
HCANA_BRANCH=$CI_COMMIT_TAG
fi
echo "Configuring CI file: ${TEMPLATE_FILE}"
echo "Output will be written to: ${OUTPUT_FILE}"
sed "s/@CONTAINER_TAG@/$CONTAINER_TAG/g" $TEMPLATE_FILE | \
sed "s/@HCANA_TAG@/$HCANA_TAG/g" | \
sed "s/@HCANA_BRANCH@/$HCANA_BRANCH/g" > ${OUTPUT_FILE}
echo "Done"
#!/bin/bash
apt-get update && apt-get install -y wget git \
build-essential \
squashfs-tools \
libtool \
autotools-dev \
libarchive-dev \
automake \
autoconf \
uuid-dev \
python3 \
libssl-dev
sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers
# Check Python
echo "Python Version:"
which python
python --version
pip install sregistry[all]
sregistry version
echo "sregistry Version:"
# Install Singularity
cd /tmp && \
git clone -b vault/release-2.5 https://www.github.com/sylabs/singularity.git
cd singularity && \
./autogen.sh && \
./configure --prefix=/usr/local && \
make -j8 && make install
.gitlabci/sregistry-gitlab.png

37.4 KiB

File deleted
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
project(hcana VERSION 1.1.8 LANGUAGES CXX) project(hcana VERSION 1.4.0 LANGUAGES CXX)
option(HCANA_BUILTIN_PODD "Use built-in Podd submodule (default: YES)" OFF) option(HCANA_BUILTIN_PODD "Use built-in Podd submodule (default: YES)" OFF)
...@@ -36,11 +36,15 @@ if(HCANA_BUILTIN_PODD) ...@@ -36,11 +36,15 @@ if(HCANA_BUILTIN_PODD)
) )
include(PoddCMakeEnv) include(PoddCMakeEnv)
else() else()
#set(CMAKE_MODULE_PATH
# ${PROJECT_SOURCE_DIR}/cmake/Modules
# ${CMAKE_MODULE_PATH}
# )
# Find Podd and register it as a dependency # Find Podd and register it as a dependency
# This will also automatically set up ROOT # This will also automatically set up ROOT
find_package(Podd 1.6 REQUIRED) find_package(Podd 1.8 REQUIRED)
include(PoddCMakeEnv) include(PoddCMakeEnv)
config_add_dependency(Podd 1.6) config_add_dependency(Podd 1.8)
endif() endif()
# Register ROOT dependency - it's in our public interface # Register ROOT dependency - it's in our public interface
......
1.4.0
# CMake settings and utility functions for Podd projects
include(CheckCXXCompilerFlag)
#----------------------------------------------------------------------------
# Set default build type to RelWithDebInfo
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "RelWithDebInfo" "MinSizeRel")
endif()
#----------------------------------------------------------------------------
# Build options
option(WITH_DEBUG "Enable support for detailed debug messages" ON)
#----------------------------------------------------------------------------
# Project-specific build flags
if(${CMAKE_SYSTEM_NAME} MATCHES Darwin)
set(CMAKE_SHARED_LINKER_FLAGS
"${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,dynamic_lookup")
list(REMOVE_DUPLICATES CMAKE_SHARED_LINKER_FLAGS)
endif()
#----------------------------------------------------------------------------
# Useful shorthands
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LC)
string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
if("${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}")
set(MAIN_PROJECT_NAME ${PROJECT_NAME})
string(TOLOWER ${PROJECT_NAME} MAIN_PROJECT_NAME_LC)
endif()
if(NOT PROJECT_VERSION_PATCH)
set(PROJECT_VERSION_PATCH 0)
endif()
if(NOT PROJECT_VERSION_MINOR)
set(PROJECT_VERSION_MINOR 0)
endif()
if(NOT PROJECT_VERSION_MAJOR)
set(PROJECT_VERSION_MAJOR 0)
endif()
math(EXPR ${PROJECT_NAME_UC}_VERCODE
"${PROJECT_VERSION_MAJOR} * 65536 + ${PROJECT_VERSION_MINOR} * 256 + ${PROJECT_VERSION_PATCH}")
#============================================================================
# Remove duplicates from space-separated list of items
function(remove_duplicates _invar _outvar)
separate_arguments(_invar)
list(REMOVE_DUPLICATES _invar)
string(REPLACE ";" " " _invar "${_invar}")
set(${_outvar} "${_invar}" PARENT_SCOPE)
endfunction()
#----------------------------------------------------------------------------
# Get list of definitions for given target as list of -DXXX
# (needed for generating ROOT dictionaries)
function(get_target_definitions TARGET DEFINES)
get_target_property(defs ${TARGET} COMPILE_DEFINITIONS)
if(defs)
foreach(d IN LISTS defs)
list(APPEND deflist -D${d})
endforeach(d)
set(${DEFINES} ${deflist} PARENT_SCOPE)
endif()
endfunction(get_target_definitions)
#----------------------------------------------------------------------------
# Set project's CXX level if no "-std=xxx" flag given in CXX_FLAGS
macro(set_cxx_std CXX_FLAGS)
string(REGEX MATCH "(^| +)-std=([^ ]*)" std_flag "${CXX_FLAGS}")
if(NOT CMAKE_MATCH_COUNT GREATER 1)
if(DEFINED ROOT_VERSION AND NOT ${ROOT_VERSION} VERSION_LESS 6)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS FALSE)
endif()
endif()
unset(std_flag)
endmacro(set_cxx_std)
#----------------------------------------------------------------------------
# Set our CXX flags plus "_suggested_flags" without any -IXXX options
macro(set_compiler_flags _suggested_flags)
check_cxx_compiler_flag(-pipe cxx-compiler-supports-pipe)
check_cxx_compiler_flag(-fsigned-char cxx-compiler-supports-fsigned-char)
check_cxx_compiler_flag(-fomit-frame-pointer cxx-compiler-supports-fomit-frame-pointer)
check_cxx_compiler_flag(-mtune=generic cxx-compiler-supports-mtune-generic)
if(APPLE)
check_cxx_compiler_flag(-Qunused-arguments cxx-compiler-supports-Qunused-arguments)
endif()
if(cxx-compiler-supports-pipe)
set(${PROJECT_NAME_UC}_CXX_FLAGS "${${PROJECT_NAME_UC}_CXX_FLAGS} -pipe")
endif()
if(cxx-compiler-supports-fsigned-char)
set(${PROJECT_NAME_UC}_CXX_FLAGS "${${PROJECT_NAME_UC}_CXX_FLAGS} -fsigned-char")
endif()
if(cxx-compiler-supports-mtune-generic)
set(${PROJECT_NAME_UC}_CXX_FLAGS "${${PROJECT_NAME_UC}_CXX_FLAGS} -mtune=generic")
endif()
if(cxx-compiler-supports-Qunused-arguments)
set(${PROJECT_NAME_UC}_CXX_FLAGS "${${PROJECT_NAME_UC}_CXX_FLAGS} -Qunused-arguments")
endif()
set(${PROJECT_NAME_UC}_CXX_FLAGS "${${PROJECT_NAME_UC}_CXX_FLAGS} ${_suggested_flags}")
if(${PROJECT_NAME_UC}_CXX_FLAGS)
remove_duplicates(${${PROJECT_NAME_UC}_CXX_FLAGS} ${PROJECT_NAME_UC}_CXX_FLAGS)
set_cxx_std(${${PROJECT_NAME_UC}_CXX_FLAGS})
endif()
string(STRIP "${${PROJECT_NAME_UC}_CXX_FLAGS}" ${PROJECT_NAME_UC}_CXX_FLAGS_LIST)
separate_arguments(${PROJECT_NAME_UC}_CXX_FLAGS_LIST)
unset(cxx-compiler-supports-pipe)
unset(cxx-compiler-supports-fsigned-char)
unset(cxx-compiler-supports-fexceptions)
unset(cxx-compiler-supports-mtune-generic)
unset(cxx-compiler-supports-Qunused-arguments)
# Configuration dependent options. Avoid ugly generator expressions
if(cxx-compiler-supports-fomit-frame-pointer)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-omit-frame-pointer")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
endmacro(set_compiler_flags)
#----------------------------------------------------------------------------
# Set warning flags according to given argument(s)
macro(set_diagnostic_flags)
cmake_parse_arguments(SDF "WALL;WEXTRA;WERROR" "" "" ${ARGN})
if(SDF_UNPARSED_ARGUMENTS)
message(FATAL_ERROR
"set_diagnostic_flags: Unrecognized arguments: ${SDF_UNPARSED_ARGUMENTS}"
)
endif()
if(SDF_WALL OR SDF_WEXTRA)
set(${PROJECT_NAME_UC}_DIAG_FLAGS "${${PROJECT_NAME_UC}_DIAG_FLAGS} -Wall")
endif()
if(SDF_WEXTRA)
set(${PROJECT_NAME_UC}_DIAG_FLAGS
"${${PROJECT_NAME_UC}_DIAG_FLAGS} -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
)
endif()
if(SDF_WERROR)
set(${PROJECT_NAME_UC}_DIAG_FLAGS "${${PROJECT_NAME_UC}_DIAG_FLAGS} -Werror")
endif()
if(${ARGC} GREATER 0)
remove_duplicates(${${PROJECT_NAME_UC}_DIAG_FLAGS} ${PROJECT_NAME_UC}_DIAG_FLAGS)
endif()
string(STRIP "${${PROJECT_NAME_UC}_DIAG_FLAGS}" ${PROJECT_NAME_UC}_DIAG_FLAGS_LIST)
separate_arguments(${PROJECT_NAME_UC}_DIAG_FLAGS_LIST)
endmacro(set_diagnostic_flags)
#----------------------------------------------------------------------------
# Print build configuration details (build type, project-wde compiler flags)
function(report_build_info)
string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE_UC)
message(STATUS "Compiling for ${CMAKE_SYSTEM_NAME} with ${CMAKE_CXX_COMPILER} version ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "Build type ${CMAKE_BUILD_TYPE}")
message(STATUS "${PROJECT_NAME_UC}_CXX_FLAGS = ${${PROJECT_NAME_UC}_CXX_FLAGS} ${${PROJECT_NAME_UC}_DIAG_FLAGS}")
message(STATUS "CMAKE_CXX_FLAGS_${BUILD_TYPE_UC} = ${CMAKE_CXX_FLAGS_${BUILD_TYPE_UC}}")
endfunction(report_build_info)
#----------------------------------------------------------------------------
# Support for keeping track of dependencies loaded via our FindXXX scripts
# Dependencies already found
set_property(GLOBAL PROPERTY ${PROJECT_NAME_UC}_DEPENDENCY_LIST "")
# Commands to write to PoddConfig.cmake
set_property(GLOBAL PROPERTY ${PROJECT_NAME_UC}_FIND_DEPENDENCY_COMMANDS "")
function(config_add_dependency item)
get_property(deplist GLOBAL PROPERTY ${PROJECT_NAME_UC}_DEPENDENCY_LIST)
list(FIND deplist ${item} found)
if(${found} LESS 0)
set_property(GLOBAL APPEND PROPERTY ${PROJECT_NAME_UC}_DEPENDENCY_LIST ${item})
get_property(commands GLOBAL PROPERTY ${PROJECT_NAME_UC}_FIND_DEPENDENCY_COMMANDS)
list(LENGTH commands ncmd)
if(ncmd EQUAL 0)
set_property(GLOBAL APPEND PROPERTY ${PROJECT_NAME_UC}_FIND_DEPENDENCY_COMMANDS
"include(CMakeFindDependencyMacro)")
endif()
cmake_parse_arguments(CAD "" "" "" ${ARGN})
set(version)
if(CAD_UNPARSED_ARGUMENTS)
list(GET CAD_UNPARSED_ARGUMENTS 0 version)
endif()
if(version)
set_property(GLOBAL APPEND PROPERTY ${PROJECT_NAME_UC}_FIND_DEPENDENCY_COMMANDS
"find_dependency(${item} ${version})")
else()
set_property(GLOBAL APPEND PROPERTY ${PROJECT_NAME_UC}_FIND_DEPENDENCY_COMMANDS
"find_dependency(${item})")
endif()
endif()
endfunction()
function(build_root_dictionary dictionary)
#if(DEFINED ROOT_VERSION AND DEFINED ROOTSYS)
# if(NOT ${ROOT_VERSION} VERSION_LESS 6)
#find_program(ROOTCLING rootcling HINTS "$ENV{ROOTSYS}/bin")
# if(NOT ROOTCLING)
# message(FATAL_ERROR
# "root_generate_dictionary: Cannot find rootcling. Check ROOT installation.")
# endif()
# else()
# find_program(ROOTCINT rootcint HINTS "${ROOTSYS}/bin")
# if(NOT ROOTCINT)
# message(FATAL_ERROR
# "root_generate_dictionary: Cannot find rootcint. Check ROOT installation.")
# endif()
# endif()
#else()
# message(FATAL_ERROR "root_generate_dictionary: ROOT is not set up")
#endif()
cmake_parse_arguments(RGD "" "PCMNAME" "INCLUDEDIRS;LINKDEF;OPTIONS;TARGETS" ${ARGN})
if(NOT RGD_LINKDEF)
message(FATAL_ERROR "root_generate_dictionary: Required argument LINKDEF missing")
endif()
# Compile definitions and include directories from the given target(s)
set(defines)
set(incdirs)
foreach(tgt IN LISTS RGD_TARGETS)
list(APPEND defines $<TARGET_PROPERTY:${tgt},COMPILE_DEFINITIONS>)
#list(APPEND incdirs $<TARGET_PROPERTY:${tgt},INCLUDE_DIRECTORIES>)
endforeach()
# Add any explicitly specified include directories
list(APPEND incdirs ${RGD_INCLUDEDIRS})
set(ROOTCLING 1)
if(ROOTCLING)
# ROOT6
if(RGD_PCMNAME)
set(pcmname ${RGD_PCMNAME})
else()
set(pcmname ${dictionary})
endif()
add_custom_command(
OUTPUT ${dictionary}Dict.cxx lib${pcmname}_rdict.pcm
COMMAND rootcling
ARGS
-f ${dictionary}Dict.cxx
-s lib${pcmname}
${RGD_OPTIONS}
${RGD_INCLUDEDIRS}
#INCDIRS "${incdirs}"
#DEFINES "${defines}"
${RGD_UNPARSED_ARGUMENTS}
${RGD_LINKDEF}
VERBATIM
DEPENDS ${RGD_UNPARSED_ARGUMENTS} ${RGD_LINKDEF}
)
set(PCM_FILE ${CMAKE_CURRENT_BINARY_DIR}/lib${pcmname}_rdict.pcm)
install(FILES ${PCM_FILE} DESTINATION ${CMAKE_INSTALL_LIBDIR})
else()
# ROOT5
add_custom_command(
OUTPUT ${dictionary}Dict.cxx
COMMAND ${MK_ROOTDICT}
ARGS
${ROOTCINT}
-f ${dictionary}Dict.cxx
-c ${RGD_OPTIONS}
INCDIRS "${incdirs}"
DEFINES "${defines}"
${RGD_UNPARSED_ARGUMENTS}
${RGD_LINKDEF}
VERBATIM
DEPENDS ${RGD_UNPARSED_ARGUMENTS} ${RGD_LINKDEF}
)
endif()
add_custom_target(${dictionary}_ROOTDICT
DEPENDS ${dictionary}Dict.cxx
)
endfunction()
FROM eicweb.phy.anl.gov:4567/containers/image_recipes/root_base:latest
LABEL maintainer "Whitney Armstrong <warmstrong@anl.gov>"
#
RUN ls -lrth /usr/local/lib/lib*.so \
&& export PYTHONPATH=/usr/local/lib:$PYTHONPATH \
&& export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \
&& export PATH=/usr/local/bin:$PATH \
&& source /usr/local/bin/thisroot.sh \
&& cd /tmp \
&& git clone https://github.com/fmtlib/fmt.git && cd fmt \
&& git checkout 5.3.0 && mkdir /tmp/build && cd /tmp/build \
&& cmake -DBUILD_SHARED_LIBS=TRUE ../fmt \
&& make -j20 install \
&& cd /tmp && rm -r /tmp/build && rm -r /tmp/fmt \
&& cd /tmp \
&& git clone https://eicweb.phy.anl.gov/jlab/hallc/analyzer_software/hallac_evio.git \
&& mkdir hallac_evio/build && cd hallac_evio/build \
&& cmake ../. && make -j20 && make install \
&& cd /tmp && rm -rf hallac_evio \
&& cd /tmp \
&& export PYTHONPATH=/usr/local/lib:$PYTHONPATH \
&& export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \
&& export PATH=/usr/local/bin:$PATH \
&& git clone https://eicweb.phy.anl.gov/jlab/hallc/analyzer_software/analyzer.git \
&& mkdir analyzer/build && cd analyzer/build && git pull \
&& cmake ../. && make -j20 VERBOSE=1 && make install \
&& cd /tmp && rm -rf analyzer \
&& git clone https://eicweb.phy.anl.gov/jlab/hcana.git \
&& mkdir hcana/build && cd hcana/build \
&& git pull \
&& cmake ../. && make -j20 && make install \
&& cd /tmp && rm -rf hcana
#-DCMAKE_CXX_FLAGS=" -march=haswell -O3 -mfma -malign-data=cacheline -finline-functions "
#&& wget -O- https://root.cern.ch/download/root_v6.14.06.source.tar.gz | tar -zxvf - \
#&& mv root-6.14.06 root_master \
#RUN which c++ && ls -lrth /usr/bin/c++ && cd /tmp/builds/root_build && make -j38 VERBOSE=1 && make install \
# && cd /tmp && rm -rf /tmp/root_master && rm -rf /tmp/builds/root_build
#RUN useradd -ms /bin/bash -d /opt/user user
#USER user
#WORKDIR /opt/bubble_user
##CMD ["-c" ]
#ENTRYPOINT ["/bin/bash"]
# ROOT base
#
# A container for the latest root
#
FROM whit/image_recipes/ubuntu_base:latest
LABEL maintainer "Whitney Armstrong <warmstrong@anl.gov>"
#
RUN cd /tmp \
&& wget http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2 \
&& tar -xvf 3.3.4.tar.bz2 \
&& cd eigen-* \
&& mkdir build && cd build \
&& cmake ../. -DCMAKE_CXX_FLAGS=" -march=haswell -O3 -mfma -malign-data=cacheline -finline-functions " \
&& make -j10 > /tmp/eigen_build.log && make install
RUN cd /tmp \
&& git clone --depth=1 https://gitlab.cern.ch/CLHEP/CLHEP.git \
&& mkdir -p builds/clhep_build \
&& cd builds/clhep_build \
&& cmake /tmp/CLHEP/. -DCMAKE_CXX_FLAGS=" -march=haswell -O3 -mfma -malign-data=cacheline -finline-functions "\
&& make -j38 install > /tmp/clhep_build.log \
&& cd /tmp && rm -rf /tmp/CLHEP && rm -rf /tmp/builds/clhep_build
RUN cd /tmp \
&& git clone https://github.com/VcDevel/Vc.git \
&& cd Vc \
&& git submodule update --init \
&& mkdir build && cd build \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_TESTING=OFF -DTARGET_ARCHITECTURE=broadwell ../. \
&& make -j30 > /tmp/vc_build.log \
&& make install
# Build root from the repo master
RUN cd /tmp \
&& pwd \
&& git clone --depth=1 https://github.com/root-project/root.git root_master \
&& cd /tmp && mkdir -p builds/root_build \
&& cd builds/root_build \
&& cmake ../../root_master/. -Droot7:BOOL=ON -Dcxx17:BOOL=ON -Dfortran:BOOL=ON \
-Dgdml:BOOL=ON -Dmathmore:BOOL=ON -Dminuit2:BOOL=ON -Dbuiltin_vdt:BOOL=ON -Dbuiltin_veccore:BOOL=ON \
-Dvc:BOOL=ON -Dbuiltin_vecgeom:BOOL=ON -Dunuran:BOOL=ON \
&& cd /tmp/builds/root_build && make -j38 > /tmp/root_build.log && make install \
&& cd /tmp && rm -rf /tmp/root_master && rm -rf /tmp/builds/root_build
#-DCMAKE_CXX_FLAGS=" -march=haswell -O3 -mfma -malign-data=cacheline -finline-functions "
#&& wget -O- https://root.cern.ch/download/root_v6.14.06.source.tar.gz | tar -zxvf - \
#&& mv root-6.14.06 root_master \
#RUN which c++ && ls -lrth /usr/bin/c++ && cd /tmp/builds/root_build && make -j38 VERBOSE=1 && make install \
# && cd /tmp && rm -rf /tmp/root_master && rm -rf /tmp/builds/root_build
#RUN useradd -ms /bin/bash -d /opt/user user
#USER user
#WORKDIR /opt/bubble_user
##CMD ["-c" ]
#ENTRYPOINT ["/bin/bash"]
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
# exports variables in config.env as environment variables
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
export $(shell sed 's/=.*//' $(dpl))
# grep the version from the mix file
VERSION=$(shell bash version.sh)
# help will output the help for each task
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
# ==========================================================================
#
build: ## build the image
docker build -t $(APP_NAME) .
build-nc: ## Build the container without caching (from scratch)
docker build --no-cache -t $(APP_NAME) .
build-alt: ## build the container for various machine architectures (broadwell, haswell, knl)
@echo 'building for architecture: $(ALT_NAME)'
docker build -t $(APP_NAME)_$(ALT_NAME) -f Dockerfile.$(ALT_NAME) .
build-alt-nc: ## build the container for various machine architectures (broadwell, haswell, knl)
@echo 'build-alt-nc: building for architecture: $(ALT_NAME)'
docker build --no-cache -t $(APP_NAME)_$(ALT_NAME) -f Dockerfile.$(ALT_NAME) .
# ==========================================================================
#
run: ## Run container on port configured in `config.env`
docker run -i -t --rm --env-file=./config.env -p=$(PORT):$(PORT) --name="$(APP_NAME)" $(REPO)/$(APP_NAME):$(TAG_VERSION)
up: build run ## Run container on port configured in `config.env` (Alias to run)
stop: ## Stop and remove a running container
docker stop $(APP_NAME); docker rm $(APP_NAME)
# ==========================================================================
# Docker tagging
tag: tag-latest #tag-version ## Generate container tags for the `{version}` ans `latest` tags
tag-latest: ## Generate container `{version}` tag
@echo 'create tag latest'
#docker tag $(APP_NAME) $(REPO)/$(APP_NAME):latest
#docker tag $(APP_NAME) $(GL_GROUP)/$(APP_NAME):latest
#docker tag $(APP_NAME) $(GL_REG_GROUP)/$(APP_NAME):latest
#docker tag $(APP_NAME) $(REG_NAME)/$(REPO)/$(APP_NAME):latest
#docker tag $(APP_NAME) $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
#docker tag $(APP_NAME) $(REPO)/$(APP_NAME):$(VERSION)
#docker tag $(APP_NAME) $(GL_GROUP)/$(APP_NAME):$(VERSION)
tag-version: ## Generate container `latest` tag
@echo 'create tag $(VERSION)'
docker tag $(REPO)/$(APP_NAME):$(VERSION) $(REG_NAME)/$(REPO)/$(APP_NAME):$(VERSION)
tag-alt: tag-alt-latest # tag-alt-version ## Generate container tags for the `{version}` ans `latest` tags
tag-alt-latest: ## Generate container `{version}` tag
@echo 'create tag latest'
#docker tag $(APP_NAME)_$(ALT_NAME) $(REPO)/$(APP_NAME)_$(ALT_NAME):latest
#docker tag $(APP_NAME)_$(ALT_NAME) $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest
#docker tag $(APP_NAME)_$(ALT_NAME) $(REPO)/$(APP_NAME)_$(ALT_NAME):latest
#docker tag $(APP_NAME)_$(ALT_NAME) $(GL_GROUP)/$(APP_NAME)_$(ALT_NAME):latest
#docker tag $(APP_NAME)_$(ALT_NAME) $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest
#docker tag $(APP_NAME)_$(ALT_NAME) $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest
#docker tag $(APP_NAME)_$(ALT_NAME) $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest
tag-alt-version: ## Generate container `{version}` tag
@echo 'create tag latest'
docker tag $(APP_NAME)_$(ALT_NAME) $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):$(VERSION)
# ==========================================================================
#
login: ## Auto login to AWS-ECR unsing aws-cli
docker login $(REG_NAME) -u $(REG_USER) -p $(REG_TOKEN)
release: build-nc publish ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR
publish: publish-latest #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR
push: login ## push after login @echo 'push latest to $(REG_NAME)/$(REPO)/$(APP_NAME):latest'
docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
docker push $(REG_HOST)/$(GL_REG_GROUP)/$(APP_NAME):latest
publish-latest: ## Publish the `latest` taged container to ECR
@echo 'publish latest to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)'
docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
publish-version: tag-version ## Publish the `{version}` taged container to ECR
@echo 'publish $(VERSION) to $(REPO)'
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION)
# ==========================================================================
#
release-alt: build-alt publish-alt ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR
publish-alt: login publish-alt-latest #publish-alt-version ## Publish the `{version}` ans `latest` tagged containers to ECR
push-alt: login tag-alt-latest ## push after login
#docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest
publish-alt-latest: #tag-alt-latest ## Publish the `latest` taged container to ECR
#docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest
docker tag $(APP_NAME)_$(ALT_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest
docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest
publish-alt-version: tag-alt-version ## Publish the `latest` taged container to ECR
#docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):$(VERSION)
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION)
# ==========================================================================
#
login-dockerhub: ## login to hub.docker.com
@echo 'docker hub login :'
docker login
push-dockerhub: build #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR
@echo '$(DH_ORG)/$(APP_NAME):$(TAG_VERSION)'
docker push $(DH_ORG)/$(APP_NAME):latest
#docker push $(DH_ORG)/$(APP_NAME):$(VERSION)
publish-dockerhub: build tag #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR
@echo '$(DH_ORG)/$(APP_NAME):$(TAG_VERSION)'
docker push $(DH_ORG)/$(APP_NAME):latest
#docker push $(DH_ORG)/$(APP_NAME):$(VERSION)
# ==========================================================================
#
clean-tags:
docker rmi $(REPO)/$(APP_NAME):latest || true
docker rmi $(GL_GROUP)/$(APP_NAME):latest || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME):latest || true
docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):latest || true
docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest || true
docker rmi $(REPO)/$(APP_NAME)_$(ALT_NAME):latest || true
docker rmi $(GL_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true
docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest || true
docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true
clean:
docker rmi $(REPO_NAME)/$(APP_NAME) || true
docker rmi $(REPO_NAME)/$(APP_NAME):$(TAG_VERSION) || true
docker rmi $(REPO_NAME)/$(APP_NAME):$(VERSION) || true
docker rmi $(REPO)/$(APP_NAME) || true
docker rmi $(REPO)/$(APP_NAME):$(TAG_VERSION) || true
docker rmi $(REPO)/$(APP_NAME):$(VERSION) || true
docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):latest || true
docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):$(TAG_VERSION) || true
docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME) || true
docker rmi $(DH_ORG)/$(APP_NAME) || true
docker rmi $(DH_ORG)/$(APP_NAME):$(TAG_VERSION) || true
docker rmi $(DH_ORG)/$(APP_NAME):$(VERSION) || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME) || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION) || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME) || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME) || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME):$(VERSION) || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME) || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION) || true
docker rmi $(GL_REG_NAME)/$(REG_USER)/$(APP_NAME) || true
docker rmi $(GL_REG_NAME)/$(REG_USER)/$(APP_NAME):$(VERSION) || true
#docker rmi $(APP_NAME) || true
version: ## Output the current version
@echo $(VERSION)
# ==========================================================================
#
info: ## Output the current version
@echo 'VERSION = $(VERSION) '
@echo 'REG_USER = $(REG_USER) '
@echo 'REG_NAME = $(REG_NAME) '
@echo 'ALT_NAME = $(ALT_NAME) '
@echo 'APP_NAME = $(APP_NAME) '
@echo 'REPO_NAME = $(REPO_NAME) '
@echo 'DH_ORG = $(DH_ORG) '
@echo 'GL_GROUP = $(GL_GROUP) '
@echo 'GL_REG_GROUP = $(GL_REG_GROUP)'
@echo 'GL_REG_NAME = $(GL_REG_NAME) '
@echo 'REPO = $(REPO) '
@echo 'TAG_VERSION = $(TAG_VERSION) '
ls: ## list all docker images
docker images