Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yuhao Liu
ogs
Commits
d94a048f
Commit
d94a048f
authored
9 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
Added target upload-data which transfers files to Amazon S3.
- requires s3cmd (
http://s3tools.org/s3cmd
)
parent
4b6c26d5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/cmake/Find.cmake
+2
-0
2 additions, 0 deletions
scripts/cmake/Find.cmake
scripts/cmake/test/Data.cmake
+20
-4
20 additions, 4 deletions
scripts/cmake/test/Data.cmake
with
22 additions
and
4 deletions
scripts/cmake/Find.cmake
+
2
−
0
View file @
d94a048f
...
@@ -60,6 +60,8 @@ endif()
...
@@ -60,6 +60,8 @@ endif()
find_program
(
CURL_TOOL_PATH curl DOC
"The curl-tool"
)
find_program
(
CURL_TOOL_PATH curl DOC
"The curl-tool"
)
find_program
(
S3CMD_TOOL_PATH s3cmd DOC
"S3cmd tool for uploading to Amazon S3"
)
######################
######################
### Find libraries ###
### Find libraries ###
######################
######################
...
...
This diff is collapsed.
Click to expand it.
scripts/cmake/test/Data.cmake
+
20
−
4
View file @
d94a048f
include
(
ExternalData
)
include
(
ExternalData
)
set
(
ExternalData_LOCAL_FOLDER ogs6-data
)
set
(
ExternalData_OBJECT_STORES
"
${
ExternalData_OBJECT_STORES_DEFAULT
}
"
CACHE STRING
set
(
ExternalData_OBJECT_STORES
"
${
ExternalData_OBJECT_STORES_DEFAULT
}
"
CACHE STRING
"Semicolon-separated list of local directories holding test data files in the layout %(algo)/%(hash)."
)
"Semicolon-separated list of local directories holding test data files in the layout %(algo)/%(hash)."
)
mark_as_advanced
(
ExternalData_OBJECT_STORES
)
mark_as_advanced
(
ExternalData_OBJECT_STORES
)
if
(
NOT ExternalData_OBJECT_STORES
)
if
(
NOT ExternalData_OBJECT_STORES
)
set
(
ExternalData_OBJECT_STORES
"
${
CMAKE_SOURCE_DIR
}
/../
ogs6-data
"
)
set
(
ExternalData_OBJECT_STORES
"
${
CMAKE_SOURCE_DIR
}
/../
${
ExternalData_LOCAL_FOLDER
}
"
)
file
(
MAKE_DIRECTORY
"
${
ExternalData_OBJECT_STORES
}
"
)
file
(
MAKE_DIRECTORY
"
${
ExternalData_OBJECT_STORES
}
"
)
endif
()
endif
()
...
@@ -12,7 +14,13 @@ set(ExternalData_SOURCE_ROOT ${CMAKE_SOURCE_DIR}/Tests/Data)
...
@@ -12,7 +14,13 @@ set(ExternalData_SOURCE_ROOT ${CMAKE_SOURCE_DIR}/Tests/Data)
set
(
ExternalData_BINARY_ROOT
${
CMAKE_BINARY_DIR
}
/Tests/Data
)
set
(
ExternalData_BINARY_ROOT
${
CMAKE_BINARY_DIR
}
/Tests/Data
)
set
(
ExternalData_LINK_CONTENT MD5
)
set
(
ExternalData_LINK_CONTENT MD5
)
set
(
ExternalData_URL_TEMPLATES
"http://www.opengeosys.org/images/dev/%(algo)/%(hash)"
)
# Amazon S3 config
set
(
ExternalData_S3_Bucket opengeosys
)
set
(
ExternalData_URL_TEMPLATES
"http://www.opengeosys.org/images/dev/%(algo)/%(hash)"
"http://
${
ExternalData_S3_Bucket
}
.s3.amazonaws.com/
${
ExternalData_LOCAL_FOLDER
}
/%(algo)/%(hash)"
)
add_custom_target
(
add_custom_target
(
move-data
move-data
...
@@ -24,12 +32,20 @@ add_custom_target(
...
@@ -24,12 +32,20 @@ add_custom_target(
VERBATIM
VERBATIM
)
)
if
(
S3CMD_TOOL_PATH
)
add_custom_target
(
upload-data
COMMAND
${
S3CMD_TOOL_PATH
}
sync --acl-public --skip-existing --no-check-md5
${
CMAKE_SOURCE_DIR
}
/../
${
ExternalData_LOCAL_FOLDER
}
s3://
${
ExternalData_S3_Bucket
}
)
endif
()
if
(
HOSTNAME STREQUAL
"envinf1.eve.ufz.de"
)
if
(
HOSTNAME STREQUAL
"envinf1.eve.ufz.de"
)
add_custom_target
(
add_custom_target
(
sync-data
sync-data
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
CMAKE_SOURCE_DIR
}
/../
ogs6-data
${
CMAKE_SOURCE_DIR
}
/../
${
ExternalData_LOCAL_FOLDER
}
/data/ogs/
ogs6-data
/data/ogs/
${
ExternalData_LOCAL_FOLDER
}
)
)
if
(
CURL_TOOL_PATH
)
if
(
CURL_TOOL_PATH
)
add_custom_command
(
add_custom_command
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment