Skip to content

Commit e3f70ea

Browse files
committed
Adds CI mirroring and fixes code.json for main
1 parent e99e3ee commit e3f70ea

File tree

2 files changed

+74
-4
lines changed

2 files changed

+74
-4
lines changed

.gitlab-ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
image: ubuntu:18.04
2+
3+
clone_github:
4+
stage: deploy
5+
before_script:
6+
- apt-get update -y && apt-get install openssh-client -y
7+
- apt install git -y
8+
- eval $(ssh-agent -s)
9+
- echo "$GIT_SSH_PRIVATE_KEY" | openssl base64 -A -d | ssh-add -
10+
- mkdir -p ~/.ssh
11+
- chmod 700 ~/.ssh
12+
- ssh-keyscan $GIT_LAB_HOST >> ~/.ssh/known_hosts
13+
- chmod 644 ~/.ssh/known_hosts
14+
- git config --global user.name "${GIT_USER_NAME}"
15+
- git config --global user.email "${GIT_USER_EMAIL}"
16+
- ssh "git@$GIT_LAB_HOST"
17+
script:
18+
- echo $SOURCE_REPOSITORY
19+
- git config --global http.sslVerify false # Epic....
20+
- rm -rf FoundationalDataProducts # Needed to allow multiple CI runs
21+
- git clone --mirror $SOURCE_REPOSITORY FoundationalDataProducts
22+
- cd FoundationalDataProducts
23+
- git remote remove origin
24+
- git remote add origin $DESTINATION_REPOSITORY
25+
- git push -f --prune --all
26+
- git push -f --prune --tags
27+
only:
28+
- branches

code.json

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,48 @@
11
[
22
{
3-
"name": "fdp_website",
3+
"name": "FoundationalDataProducts",
4+
"organization": "U.S. Geological Survey",
5+
"description": "Git repository containing the Foundational Data Products (FDP) website code and content.",
6+
"version": "main",
7+
"status": "Development",
8+
"permissions": {
9+
"usageType": "openSource",
10+
"licenses": [
11+
{
12+
"name": "Public Domain, CC0-1.0",
13+
"URL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts/-/raw/main/LICENSE.md"
14+
}
15+
]
16+
},
17+
18+
"homepageURL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts/",
19+
"downloadURL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts/-/archive/main/FoundationalDataProducts-main.zip",
20+
"disclaimerURL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts/-/raw/main/DISCLAIMER.md",
21+
"repositoryURL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts.git",
22+
"vcs": "git",
23+
24+
"laborHours": 120,
25+
26+
"tags": [
27+
"Planetary",
28+
"Spatial Data Infrastructure",
29+
"Foundational Data Products"
30+
],
31+
32+
"languages": [
33+
"Go"
34+
],
35+
36+
"contact": {
37+
"name": "Jason Laura",
38+
"email": "[email protected]"
39+
},
40+
41+
"date": {
42+
"metadataLastUpdated": "2023-01-25"
43+
}
44+
},{
45+
"name": "FoundationalDataProducts",
446
"organization": "U.S. Geological Survey",
547
"description": "Git repository containing the Foundational Data Products (FDP) website code and content.",
648
"version": "1.0.0",
@@ -10,15 +52,15 @@
1052
"licenses": [
1153
{
1254
"name": "Public Domain, CC0-1.0",
13-
"URL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts/-/blob/1.0.0/LICENSE.md"
55+
"URL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts/-/raw/1.0.0/LICENSE.md"
1456
}
1557
]
1658
},
1759

1860
"homepageURL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts/",
1961
"downloadURL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts/-/archive/1.0.0/FoundationalDataProducts-1.0.0.zip",
20-
"disclaimerURL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts/-/blob/1.0.0/DISCLAIMER.md",
21-
"repositoryURL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts/",
62+
"disclaimerURL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts/-/raw/1.0.0/DISCLAIMER.md",
63+
"repositoryURL": "https://code.usgs.gov/astrogeology/FoundationalDataProducts.git",
2264
"vcs": "git",
2365

2466
"laborHours": 120,

0 commit comments

Comments
 (0)