Commit fcc5dfab authored by Spiros Koulouzis's avatar Spiros Koulouzis

added scripts

parent d0e72795
#!/bin/bash #!/bin/bash
mkdir build mvn clean install
cd drip-api
mvn install
tar -czvf drip-api-1.0-SNAPSHOT.tar.gz target/drip-api-1.0-SNAPSHOT
mv drip-api-1.0-SNAPSHOT.tar.gz ../build
cd drip-planner && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt
cd ../
cd sure_tosca-flask-server && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt
venv/bin/pip3 install -r test-requirements.txt
cd ../ cd ../
tar -czvf drip-deployer.tar.gz drip-deployer
mv drip-deployer.tar.gz build
tar -czvf drip-planner.tar.gz drip_planner2
mv drip-planner.tar.gz build
cd drip-provisioner/
mvn install
mv target/drip-provisioner-1.0-SNAPSHOT-jar-with-dependencies.jar ../build
cd ../
mv etc.tar.gz build
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.target>${java.version}</maven.compiler.target>
<springfox-version>2.9.2</springfox-version> <springfox-version>2.9.2</springfox-version>
<docker.image.prefix>deth53</docker.image.prefix>
</properties> </properties>
<parent> <parent>
<groupId>nl.uva.sne.drip</groupId> <groupId>nl.uva.sne.drip</groupId>
...@@ -30,6 +31,36 @@ ...@@ -30,6 +31,36 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.4.13</version>
<configuration>
<repository>${docker.image.prefix}/${project.artifactId}</repository>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e478ccae-5352-4e8e-9efb-3f5cda44e877" name="Default Changelist" comment=""> <list default="true" id="e478ccae-5352-4e8e-9efb-3f5cda44e877" name="Default Changelist" comment="added matplotlib">
<change beforePath="$PROJECT_DIR$/../.jenkins_pipeline.kate-swp" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/../.jenkins_pipeline.kate-swp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/pom.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../drip-manager/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/requirements.txt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/requirements.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../jenkins_pipeline" beforeDir="false" afterPath="$PROJECT_DIR$/../jenkins_pipeline" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../jenkins_pipeline" beforeDir="false" afterPath="$PROJECT_DIR$/../jenkins_pipeline" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sure_tosca-flask-server/requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/../sure_tosca-flask-server/requirements.txt" afterDir="false" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -164,7 +166,14 @@ ...@@ -164,7 +166,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1573146875676</updated> <updated>1573146875676</updated>
</task> </task>
<option name="localTasksCounter" value="9" /> <task id="LOCAL-00009" summary="added matplotlib">
<created>1573146945740</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1573146945740</updated>
</task>
<option name="localTasksCounter" value="10" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.Tabs.Properties"> <component name="Vcs.Log.Tabs.Properties">
......
...@@ -3,4 +3,5 @@ names==0.3.0 ...@@ -3,4 +3,5 @@ names==0.3.0
networkx==2.4 networkx==2.4
pyyaml==5.1.2 pyyaml==5.1.2
tosca-parser ==1.6.1 tosca-parser ==1.6.1
matplotlib==3.0.3 matplotlib==3.0.3
\ No newline at end of file networkx==2.4
\ No newline at end of file
pipeline { pipeline {
agent any agent any
tools { tools {
// Install the Maven version configured as "M3" and add it to the path. // Install the Maven version configured as "M3" and add it to the path.
maven "maven-3.6.2" maven "maven-3.6.2"
jdk "openjdk-11" jdk "openjdk-11"
} }
stages {
stage('Build') { stages {
stage('Build') {
steps { steps {
echo 'Building' echo 'Building'
steps { git branch: 'DRIP_3.0', url: 'https://github.com/skoulouzis/DRIP.git'
git branch: 'DRIP_3.0', url: 'https://github.com/skoulouzis/DRIP.git' sh "mvn clean install"
sh "mvn clean install" sh "cd drip-planner && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt"
} sh "cd ../"
} sh "cd sure_tosca-flask-server && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt"
stage('Test') { }
steps { }
echo 'Testing' stage('Test') {
} steps {
echo 'Testing'
sh "cd drip-planner && python3 -m unittest test/test_planner.py"
}
} }
stage('Deploy') { stage('Deploy') {
steps { steps {
echo 'Deploying' echo 'Deploying'
} }
} }
} }
post {
always {
echo 'This will always run'
}
success {
echo 'This will run only if successful'
}
failure {
echo 'This will run only if failed'
}
unstable {
echo 'This will run only if the run was marked as unstable'
}
changed {
echo 'This will run only if the state of the Pipeline has changed'
echo 'For example, if the Pipeline was previously failing but is now successful'
}
}
} }
...@@ -3,4 +3,4 @@ python-dateutil == 2.8.0 ...@@ -3,4 +3,4 @@ python-dateutil == 2.8.0
typing == 3.7.4.1 typing == 3.7.4.1
swagger-ui-bundle == 0.0.5 swagger-ui-bundle == 0.0.5
tinydb == 3.15.1 tinydb == 3.15.1
tosca-parser == 1.6.1 tosca-parser ==1.6.1
#!/bin/bash
cd drip-planner && python3 -m unittest test/test_planner.py
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment