Skip to content

Commit

Permalink
Merge pull request #35 from krgauraw/release-5.7.0
Browse files Browse the repository at this point in the history
Issue #IQ-524 feat: changes for cloud storage
  • Loading branch information
sajeshkayyath authored Aug 9, 2023
2 parents 224b680 + 495bc83 commit 2962a9d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ jobs:
- run:
name: Installation of imagemagick
command: |
sudo sed -i -e 's/deb.debian.org/archive.debian.org/g' -e 's|security.debian.org|archive.debian.org/|g' -e '/stretch-updates/d' /etc/apt/sources.list
sudo rm /etc/apt/sources.list.d/stretch-backports.list
sudo apt-get update || sudo apt-get update
sudo apt-get install -y imagemagick
- run:
name: Execute coverage report
command: |
mvn clean scoverage:report
mvn clean scoverage:report -DCLOUD_STORE_GROUP_ID=$CLOUD_STORE_GROUP_ID -DCLOUD_STORE_ARTIFACT_ID=$CLOUD_STORE_ARTIFACT_ID -DCLOUD_STORE_VERSION=$CLOUD_STORE_VERSION
- run:
name: Save test results
command: |
Expand Down
6 changes: 3 additions & 3 deletions jobs-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
<version>0.1.1</version>
</dependency>
<dependency>
<groupId>org.sunbird</groupId>
<artifactId>cloud-store-sdk_2.12</artifactId>
<version>1.4.6</version>
<groupId>${CLOUD_STORE_GROUP_ID}</groupId>
<artifactId>${CLOUD_STORE_ARTIFACT_ID}</artifactId>
<version>${CLOUD_STORE_VERSION}</version>
<exclusions>
<exclusion>
<artifactId>log4j</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class FileUtilsSpec extends FlatSpec with Matchers {
}

"downloadFile " should " download the media source file starting with http or https " in {
val fileUrl: String = "https://preprodall.blob.core.windows.net/ntp-content-preprod/content/do_21273718766395392014320/artifact/book-image_1554832478631.jpg"
val fileUrl: String = "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/content/assets/do_2137327580080128001217/gateway-of-india.jpg"
val downloadedFile: File = FileUtils.downloadFile(fileUrl, "/tmp/contentBundle")
assert(downloadedFile.exists())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class HTTPUtilSpec extends FlatSpec with Matchers {
}

"downloadFile" should "download file with lower case name" in {
val fileUrl = "https://file-examples.com/wp-content/uploads/2017/04/file_example_MP4_480_1_5MG.mp4"
val fileUrl = "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/content/assets/do_2137327580080128001217/gateway-of-india.jpg"
val httpUtil = new HttpUtil
val downloadPath = "/tmp/content" + File.separator + "_temp_" + System.currentTimeMillis
val downloadedFile = httpUtil.downloadFile(fileUrl, downloadPath)
Expand Down
6 changes: 4 additions & 2 deletions kubernetes/pipelines/build/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ node('build-slave') {
commit_hash = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
build_tag = sh(script: "echo " + params.inquiry_release_tag.split('/')[-1] + "_" + commit_hash + "_" + env.BUILD_NUMBER, returnStdout: true).trim()
echo "build_tag: " + build_tag
cloud_store_group_id = params.CLOUD_STORE_GROUP_ID
cloud_store_artifact_id = params.CLOUD_STORE_ARTIFACT_ID
cloud_store_version = params.CLOUD_STORE_VERSION

stage('Build') {
env.NODE_ENV = "build"
print "Environment will be : ${env.NODE_ENV}"
sh '/opt/apache-maven-3.6.3/bin/mvn3.6 -v'
sh '/opt/apache-maven-3.6.3/bin/mvn3.6 clean install -DskipTests'

sh '/opt/apache-maven-3.6.3/bin/mvn3.6 clean install -DskipTests -DCLOUD_STORE_GROUP_ID=' + cloud_store_group_id + ' -DCLOUD_STORE_ARTIFACT_ID=' + cloud_store_artifact_id + ' -DCLOUD_STORE_VERSION=' + cloud_store_version
}

stage('Package') {
Expand Down

0 comments on commit 2962a9d

Please sign in to comment.