Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container generation #2628

Merged
merged 9 commits into from Sep 3, 2019
Merged

Container generation #2628

merged 9 commits into from Sep 3, 2019

Conversation

@bilke
Copy link
Member

bilke commented Aug 23, 2019

Adds targets for container generation:

  • docker: Builds a Docker image from the local source code. Important: Uses the same CMake config as specified on the first CMake run. Once a CMakeCache.txt is in place changed CMake options are not considered. See the docs for usage. Requires Docker

  • sif: Converts the previously created Docker container into a Singularity Image File. See the docs for usage. Requires Singularity.

  • Adds CI builds of OGS in different configurations (different MPI versions) on GitLab CI (just for the fun of it)

  • Adds CI builds of OGS in different configurations (different MPI versions) on Jenkins (master-only, Singularity image files are provided as build artifacts)

Other changes:

  • Add https://github.com/ufz/ogs-container-maker as a submodule
  • Made existence of local git repo optional for building OGS. In this PR this is used to optimize container build times (as the full source directory has to be transferred to Docker context) but should also allow building OGS from GitHub archive file (tar- or zip-file). In the later case you have to specify the CMake variable OGS_VERSION.
  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
@bilke bilke added the WIP 🏗 label Aug 23, 2019
@bilke bilke force-pushed the bilke:docker-local-build branch 2 times, most recently from 04d4b98 to b061346 Sep 2, 2019
@bilke bilke force-pushed the bilke:docker-local-build branch from b3827f4 to b5f7d48 Sep 3, 2019
@bilke bilke removed the WIP 🏗 label Sep 3, 2019
@bilke bilke requested a review from endJunction Sep 3, 2019
set(IS_GIT_REPO FALSE CACHE INTERNAL "")
if(DEFINED OGS_VERSION)
message(WARNING "Using user-provided OGS_VERSION: ${OGS_VERSION}!")
message(WARNING "Submodule setup is skipped!")

This comment has been minimized.

Copy link
@endJunction

endJunction Sep 3, 2019

Member

better to move the warning into the if in SubmoduleSetup.cmake.

This comment has been minimized.

Copy link
@bilke

bilke Sep 3, 2019

Author Member

This handles all possibilities regarding warning output. So it would leave this here and there is no additional output necessary in subsequent CMake files.

@@ -28,6 +28,10 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})

set(CMAKE_MACOSX_RPATH 1)

if(NOT IS_GIT_REPO)
return()

This comment has been minimized.

Copy link
@endJunction

endJunction Sep 3, 2019

Member

Could also issue a warning...

@@ -1,3 +1,7 @@
if(NOT IS_GIT_REPO)
return()

This comment has been minimized.

Copy link
@endJunction

endJunction Sep 3, 2019

Member
Suggested change
return()
message(WARNING "Submodule setup is skipped!")
Copy link
Member

endJunction left a comment

Nothing suspicious found ;)

@bilke bilke merged commit cc464a7 into ufz:master Sep 3, 2019
3 checks passed
3 checks passed
continuous-integration/jenkins/pr-merge This commit looks good
Details
deploy/netlify Deploy preview ready!
Details
ufz.ogs #20190903.5 succeeded
Details
@bilke bilke deleted the bilke:docker-local-build branch Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.