Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

000 refactor for devpos check #2622

Merged
merged 27 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bce1769
2508: fix and switch on job which clear unused pictures
Jun 5, 2023
1c3f867
2508: fix and switch on job which clear unused pictures
Jun 7, 2023
f11db5b
Merge branch 'master' of https://github.com/Brain-up/brn into master
Jun 8, 2023
57bd061
Merge branch 'master' of https://github.com/Brain-up/brn into master
Jul 14, 2023
71dfe6a
Merge branch 'master' of https://github.com/Brain-up/brn into master
Sep 13, 2023
0b63d7b
Merge branch 'master' of https://github.com/Brain-up/brn into master
Oct 20, 2023
fd7b24e
Merge branch 'master' of https://github.com/Brain-up/brn into master
Oct 27, 2023
d071187
Merge branch 'master' of https://github.com/Brain-up/brn into master
Nov 8, 2023
55b12e0
Merge branch 'master' of https://github.com/Brain-up/brn into master
Nov 29, 2023
c21af0d
Merge branch 'master' of https://github.com/Brain-up/brn into master
Nov 29, 2023
323919c
Merge branch 'master' of https://github.com/Brain-up/brn into master
Nov 30, 2023
3fe1ceb
Merge branch 'master' of https://github.com/Brain-up/brn into master
Jan 17, 2024
86a6719
Merge branch 'master' of https://github.com/Brain-up/brn into master
Jan 18, 2024
0242323
Merge branch 'master' of https://github.com/Brain-up/brn into master
Feb 17, 2024
6efc270
Merge branch 'master' of https://github.com/Brain-up/brn into master
Jun 5, 2024
ba9485b
Merge branch 'master' of https://github.com/Brain-up/brn into master
Jun 6, 2024
685afb0
Merge branch 'master' of https://github.com/Brain-up/brn into master
Jul 30, 2024
e07f371
Merge branch 'master' of https://github.com/Brain-up/brn into master
Aug 10, 2024
93a1ca8
Merge branch 'master' of https://github.com/Brain-up/brn into master
Aug 19, 2024
1315a60
Merge branch 'master' of https://github.com/Brain-up/brn into master
Sep 27, 2024
d61cc3f
Merge branch 'master' of https://github.com/Brain-up/brn into master
Oct 4, 2024
97db0f0
2590 fix version update
Oct 4, 2024
723a145
Merge branch 'master' of https://github.com/Brain-up/brn into master
Oct 9, 2024
31de7c5
Merge branch 'master' of https://github.com/Brain-up/brn into master
Oct 16, 2024
932a301
Merge branch 'master' of https://github.com/Brain-up/brn into master
Oct 18, 2024
781be28
refactor for devops check
Oct 18, 2024
20e3383
Merge branch 'master' into 000_refactor_for_devpos_check
DmitriyStoyanov Oct 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/main/kotlin/com/epam/brn/config/FirebaseConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ class FirebaseConfig {
fun firebaseApp(): FirebaseApp {
if (FirebaseApp.getApps().isEmpty()) {
val refreshToken = FileInputStream(firebaseCredentialsPath)

val options = FirebaseOptions.builder()
.setCredentials(GoogleCredentials.fromStream(refreshToken))
.build()

FirebaseApp.initializeApp(options)
}
return FirebaseApp.getInstance()
Expand Down
13 changes: 7 additions & 6 deletions src/main/kotlin/com/epam/brn/config/GoogleCloudConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.google.auth.oauth2.GoogleCredentials
import com.google.cloud.storage.Storage
import com.google.cloud.storage.StorageOptions
import com.google.common.collect.Lists
import org.apache.logging.log4j.kotlin.logger
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.context.annotation.Configuration
Expand All @@ -20,8 +19,6 @@ class GoogleCloudConfig(
@Value("\${cloud.expireAfterDuration}") expireAfterDuration: String
) {

private val log = logger()

@Value("\${google.bucketName}")
val bucketName: String = ""
@Value("\${google.bucketLink}")
Expand All @@ -31,11 +28,15 @@ class GoogleCloudConfig(
final var storage: Storage?

init {
val credentials = GoogleCredentials.fromStream(FileInputStream(credentialsPath))
val credentials = GoogleCredentials
.fromStream(FileInputStream(credentialsPath))
.createScoped(Lists.newArrayList(credentialScope))
storage =
StorageOptions.newBuilder().setCredentials(credentials).setProjectId(projectId)
.build().getService()
StorageOptions.newBuilder()
.setCredentials(credentials)
.setProjectId(projectId)
.build()
.service
expireAfter = Duration.parse(expireAfterDuration)
}
}
Loading