Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #317 from Open-MBEE/release/3.4.0
Browse files Browse the repository at this point in the history
Release/3.4.0
  • Loading branch information
HuiJun authored Sep 21, 2018
2 parents d5d103b + 367458c commit d4067c1
Show file tree
Hide file tree
Showing 134 changed files with 3,380 additions and 2,454 deletions.
72 changes: 19 additions & 53 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,34 @@ jobs:

- run:
name: Run Maven Build
command: cd mms-ent && sh mvnw install -Pbuild
command: cd mms-ent && sh mvnw install -Pbuild && sh mvnw install -f repo-amp/target/generated-sources/swagger/java/pom.xml

- save_cache:
paths:
- ~/.m2
key: mms-{{ checksum "mms-ent/pom.xml" }}

- run:
name: Clean target directory
command: mkdir -p mms-ent/repo-amp/target/mms-java-client && mv mms-ent/repo-amp/target/generated-sources/swagger/java/target/*.jar mms-ent/repo-amp/target/generated-sources/swagger/java/pom.xml mms-ent/repo-amp/target/mms-java-client && rm -rf mms-ent/repo-amp/target/{amp,archive-tmp,classes,generated-sources,generated-test-sources,maven-archiver,maven-status,surefire-reports,test-classes} && rm -rf mms-ent/share-amp/target/{amp,archive-tmp,classes,generated-sources,generated-test-sources,maven-archiver,maven-status,surefire-reports,test-classes}

- run:
name: Prepare Store Artifacts
command: mkdir -p tmp/artifacts

- store_artifacts:
path: mms-ent/repo-amp/target/mms-amp-3.3.0-SNAPSHOT.amp
destination: tmp/artifacts/mms-amp-3.3.0-SNAPSHOT.amp

- store_artifacts:
path: mms-ent/share-amp/target/mms-share-amp-3.3.0-SNAPSHOT.amp
destination: tmp/artifacts/mms-share-amp-3.3.0-SNAPSHOT.amp

- store_artifacts:
path: mms-ent/repo-amp/target/mms-java-client-3.3.0-SNAPSHOT.zip
destination: tmp/artifacts/mms-java-client-3.3.0-SNAPSHOT.zip

- store_artifacts:
path: mms-ent/repo-amp/target/mms-python-client-3.3.0-SNAPSHOT.zip
destination: tmp/artifacts/mms-python-client-3.3.0-SNAPSHOT.zip
path: mms-ent/repo-amp/target

- store_artifacts:
path: mms-ent/repo-amp/target/mms-mathematica-client-3.3.0-SNAPSHOT.zip
destination: tmp/artifacts/mms-mathematica-client-3.3.0-SNAPSHOT.zip
path: mms-ent/share-amp/target

- persist_to_workspace:
root: mms-ent
paths:
- repo-amp/target
- share-amp/target

deploy_snapshot:
deploy_artifacts:
<<: *defaults
steps:
- attach_workspace:
Expand All @@ -68,55 +58,31 @@ jobs:
command: ./jfrog rt config --url $ARTIFACTORY_URL --user $ARTIFACTORY_USER --apikey $ARTIFACTORY_APIKEY --interactive false
- run:
name: Send mms-amp
command: ./jfrog rt u 'mms-ent/repo-amp/target/*.amp' libs-snapshot-local/gov/nasa/jpl/mms/mms-amp/3.3.0-SNAPSHOT/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
command: ./jfrog rt u 'mms-ent/repo-amp/target/*.amp' libs-release-local/gov/nasa/jpl/mms/mms-amp/3.4.0/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms-share-amp
command: ./jfrog rt u 'mms-ent/share-amp/target/*.amp' libs-snapshot-local/gov/nasa/jpl/mms/mms-share-amp/3.3.0-SNAPSHOT/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
command: ./jfrog rt u 'mms-ent/share-amp/target/*.amp' libs-release-local/gov/nasa/jpl/mms/mms-share-amp/3.4.0/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms java client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-java-*.zip' libs-snapshot-local/gov/nasa/jpl/mms/mms-java-client/3.3.0-SNAPSHOT/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms python client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-python-*.zip' libs-snapshot-local/gov/nasa/jpl/mms/mms-python-client/3.3.0-SNAPSHOT/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms mathematica client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-mathematica-*.zip' libs-snapshot-local/gov/nasa/jpl/mms/mms-mathematica-client/3.3.0-SNAPSHOT/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true

deploy_release:
<<: *defaults
steps:
- attach_workspace:
at: mms-ent
- run:
name: Get jfrog
command: curl -fL https://getcli.jfrog.io | sh
- run:
name: Set Permissions
command: sudo chmod +x jfrog
- run:
name: Configure jfrog
command: ./jfrog rt config --url $ARTIFACTORY_URL --user $ARTIFACTORY_USER --apikey $ARTIFACTORY_APIKEY --interactive false
- run:
name: Send mms-amp
command: ./jfrog rt u 'mms-ent/repo-amp/target/*.amp' libs-release-local/gov/nasa/jpl/mms/mms-amp/3.3.0-SNAPSHOT/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms-share-amp
command: ./jfrog rt u 'mms-ent/share-amp/target/*.amp' libs-release-local/gov/nasa/jpl/mms/mms-share-amp/3.3.0-SNAPSHOT/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-java-client/mms-java-*.jar' libs-release-local/gov/nasa/jpl/mms/mms-java-client/3.4.0/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms java client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-java-*.zip' libs-release-local/gov/nasa/jpl/mms/mms-java-client/3.3.0-SNAPSHOT/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-java-client/pom.xml' libs-release-local/gov/nasa/jpl/mms/mms-java-client/3.4.0/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms python client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-python-*.zip' libs-release-local/gov/nasa/jpl/mms/mms-python-client/3.3.0-SNAPSHOT/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms_python_*.zip' libs-release-local/gov/nasa/jpl/mms/mms-python-client/3.4.0/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms mathematica client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-mathematica-*.zip' libs-release-local/gov/nasa/jpl/mms/mms-mathematica-client/3.3.0-SNAPSHOT/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-mathematica-*.zip' libs-release-local/gov/nasa/jpl/mms/mms-mathematica-client/3.4.0/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms matlab client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-matlab-*.zip' libs-release-local/gov/nasa/jpl/mms/mms-matlab-client/3.4.0/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true

workflows:
version: 2
build-deploy-snapshot:
build-deploy-artifacts:
jobs:
- build_amps
- deploy_snapshot:
- deploy_artifacts:
requires:
- build_amps
88 changes: 88 additions & 0 deletions .circleci/config.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
defaults: &defaults
working_directory: ~/projects
docker:
- image: circleci/openjdk:8

version: 2
jobs:
build_amps:
<<: *defaults
steps:
- checkout

- restore_cache:
key: mms-{{ checksum "mms-ent/pom.xml" }}

- run:
name: Run Maven Build
command: cd mms-ent && sh mvnw install -Pbuild && sh mvnw install -f repo-amp/target/generated-sources/swagger/java/pom.xml

- save_cache:
paths:
- ~/.m2
key: mms-{{ checksum "mms-ent/pom.xml" }}

- run:
name: Clean target directory
command: mkdir -p mms-ent/repo-amp/target/mms-java-client && mv mms-ent/repo-amp/target/generated-sources/swagger/java/target/*.jar mms-ent/repo-amp/target/generated-sources/swagger/java/pom.xml mms-ent/repo-amp/target/mms-java-client && rm -rf mms-ent/repo-amp/target/{amp,archive-tmp,classes,generated-sources,generated-test-sources,maven-archiver,maven-status,surefire-reports,test-classes} && rm -rf mms-ent/share-amp/target/{amp,archive-tmp,classes,generated-sources,generated-test-sources,maven-archiver,maven-status,surefire-reports,test-classes}

- run:
name: Prepare Store Artifacts
command: mkdir -p tmp/artifacts

- store_artifacts:
path: mms-ent/repo-amp/target

- store_artifacts:
path: mms-ent/share-amp/target

- persist_to_workspace:
root: mms-ent
paths:
- repo-amp/target
- share-amp/target

deploy_artifacts:
<<: *defaults
steps:
- attach_workspace:
at: mms-ent
- run:
name: Get jfrog
command: curl -fL https://getcli.jfrog.io | sh
- run:
name: Set Permissions
command: sudo chmod +x jfrog
- run:
name: Configure jfrog
command: ./jfrog rt config --url $ARTIFACTORY_URL --user $ARTIFACTORY_USER --apikey $ARTIFACTORY_APIKEY --interactive false
- run:
name: Send mms-amp
command: ./jfrog rt u 'mms-ent/repo-amp/target/*.amp' libs-snapshot-local/gov/nasa/jpl/mms/mms-amp/${version}/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms-share-amp
command: ./jfrog rt u 'mms-ent/share-amp/target/*.amp' libs-snapshot-local/gov/nasa/jpl/mms/mms-share-amp/${version}/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms java client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-java-client/mms-java-*.jar' libs-snapshot-local/gov/nasa/jpl/mms/mms-java-client/${version}/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms java client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-java-client/pom.xml' libs-snapshot-local/gov/nasa/jpl/mms/mms-java-client/${version}/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms python client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms_python_*.zip' libs-snapshot-local/gov/nasa/jpl/mms/mms-python-client/${version}/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms mathematica client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-mathematica-*.zip' libs-snapshot-local/gov/nasa/jpl/mms/mms-mathematica-client/${version}/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true
- run:
name: Send mms matlab client
command: ./jfrog rt u 'mms-ent/repo-amp/target/mms-matlab-*.zip' libs-snapshot-local/gov/nasa/jpl/mms/mms-matlab-client/${version}/ --build-name=mms-circleci --build-number=$CIRCLE_BUILD_NUM --flat=true

workflows:
version: 2
build-deploy-artifacts:
jobs:
- build_amps
- deploy_artifacts:
requires:
- build_amps
6 changes: 5 additions & 1 deletion mms-ent/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ if [ "$1" == "" ]; then
MAVEN_OPTS="-Xms256m -Xmx8G -Xdebug" ./mvnw clean package -f pom.xml -P build -Ddependency.surf.version=6.3 -Dmaven.test.skip=true -U -Dmaven.repo.local=$HOME/.m2/repository;
else
./mvnw versions:set -DnewVersion=$1 -DgenerateBackupPoms=false -Ddependency.surf.version=6.3
rm -f ../.circleci/config.yml
sed "s/\${version}/$1/" ../.circleci/config.yml.template > ../.circleci/config.yml
if [[ $1 != *"SNAPSHOT"* ]];then
sed -i "s/libs-snapshot-local/libs-release-local/" ../.circleci/config.yml
fi
fi

10 changes: 9 additions & 1 deletion mms-ent/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ if [[ "$OSTYPE" == "darwin" ]]; then
dropdb -U $dbuser _MountCommit
dropdb -U $dbuser _CollaboratorProject
dropdb -U $dbuser _CompleteModelGet
dropdb -U $dbuser _MoveModel
dropdb -U $dbuser $usedb
createdb -U $dbuser $usedb
psql -U $dbuser -f ./repo-amp/src/main/resources/mms.sql $usedb
Expand Down Expand Up @@ -127,7 +128,13 @@ expect "*Password*"
send "$password\r"
expect eof
EOD

$EXPECT <<EOD
log_user 0
spawn dropdb -U $dbuser _MoveModel
expect "*Password*"
send "$password\r"
expect eof
EOD
$EXPECT <<EOD
log_user 0
spawn dropdb -U $dbuser $usedb
Expand Down Expand Up @@ -160,6 +167,7 @@ EOD
dropdb -U $dbuser _MountCommit
dropdb -U $dbuser _CollaboratorProject
dropdb -U $dbuser _CompleteModelGet
dropdb -U $dbuser _MoveModel
dropdb -U $dbuser $usedb
createdb -U $dbuser $usedb
psql -U $dbuser -f ./repo-amp/src/main/resources/mms.sql $usedb
Expand Down
Loading

0 comments on commit d4067c1

Please sign in to comment.