Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Schema
Commits
e11d133c
Commit
e11d133c
authored
Sep 01, 2021
by
Aman Verma
Browse files
pointing all the CSVs to azure test directory temporarily
parent
41cbdd4b
Pipeline
#62433
failed with stages
in 2 minutes and 14 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
e11d133c
variables
:
GCP_BUILD_SUBDIR
:
provider/schema-gcp
GCP_INT_TEST_SUBDIR
:
testing/schema-test-
gcp
GCP_INT_TEST_SUBDIR
:
testing/schema-test-
azure
GCP_APPLICATION_NAME
:
os-schema
GCP_ENVIRONMENT
:
testing
GCP_PROJECT
:
opendes-evt
...
...
@@ -9,14 +9,14 @@ variables:
GCP_DOMAIN
:
cloud.slb-ds.com
IBM_BUILD_SUBDIR
:
provider/schema-ibm
IBM_INT_TEST_SUBDIR
:
testing/schema-test-
co
re
IBM_INT_TEST_SUBDIR
:
testing/schema-test-
azu
re
IBM_TEST_CMD
:
verify
IBM_DEPLOYMENTS_SUBDIR
:
deployments/scripts/ibm
IBM_DEPLOYMENTS_SCRIPTS_SUBDIR
:
deployments/scripts
AZURE_SERVICE
:
schema
AZURE_BUILD_SUBDIR
:
provider/schema-azure
AZURE_TEST_SUBDIR
:
testing/schema-test-
co
re
AZURE_TEST_SUBDIR
:
testing/schema-test-
azu
re
AZURE_ONLY_TEST_SUBDIR
:
testing/schema-test-azure
AZURE_DEPLOYMENTS_SUBDIR
:
deployments/scripts/azure
AZURE_DEPLOYMENTS_SCRIPTS_SUBDIR
:
deployments/scripts
...
...
@@ -28,7 +28,7 @@ variables:
AWS_BUILD_SUBDIR
:
provider/schema-aws/build-aws
AWS_TEST_SUBDIR
:
testing/schema-test-
co
re
AWS_TEST_SUBDIR
:
testing/schema-test-
azu
re
AWS_DEPLOYMENTS_SUBDIR
:
deployments/scripts/aws
AWS_SERVICE
:
schema
AWS_ENVIRONMENT
:
dev
...
...
testing/schema-test-azure/pom.xml
View file @
e11d133c
...
...
@@ -93,6 +93,12 @@
<artifactId>
os-core-lib-ibm
</artifactId>
<version>
${os-core-lib-ibm.version}
</version>
</dependency>
<dependency>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
core-lib-gcp
</artifactId>
<version>
0.9.0
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
<dependencyManagement>
...
...
testing/schema-test-azure/src/test/java/org/opengroup/osdu/schema/util/AuthUtil.java
View file @
e11d133c
...
...
@@ -3,6 +3,7 @@ package org.opengroup.osdu.schema.util;
import
com.google.common.base.Strings
;
import
org.opengroup.osdu.azure.util.AzureServicePrincipal
;
import
org.opengroup.osdu.core.aws.cognito.AWSCognitoClient
;
import
org.opengroup.osdu.core.gcp.auth.GoogleServiceAccount
;
import
org.opengroup.osdu.core.ibm.util.IdentityClient
;
...
...
@@ -10,12 +11,26 @@ public class AuthUtil {
public
synchronized
String
getToken
()
throws
Exception
{
String
token
=
null
;
String
vendor
=
System
.
getProperty
(
"VENDOR"
,
System
.
getenv
(
"VENDOR"
));
if
(
Strings
.
isNullOrEmpty
(
token
)
&&
vendor
.
equals
(
"azure"
))
{
if
(
Strings
.
isNullOrEmpty
(
token
)
&&
vendor
.
equals
(
"gcp"
))
{
String
serviceAccountFile
=
System
.
getProperty
(
"INTEGRATION_TESTER"
,
System
.
getenv
(
"INTEGRATION_TESTER"
));
String
audience
=
System
.
getProperty
(
"INTEGRATION_TEST_AUDIENCE"
,
System
.
getenv
(
"INTEGRATION_TEST_AUDIENCE"
));
token
=
new
GoogleServiceAccount
(
serviceAccountFile
).
getAuthToken
(
audience
);
}
else
if
(
Strings
.
isNullOrEmpty
(
token
)
&&
vendor
.
equals
(
"aws"
))
{
String
awsCognitoClientId
=
System
.
getProperty
(
"AWS_COGNITO_CLIENT_ID"
,
System
.
getenv
(
"AWS_COGNITO_CLIENT_ID"
));
String
awsCognitoAuthFlow
=
"USER_PASSWORD_AUTH"
;
String
awsCognitoAuthParamsUser
=
System
.
getProperty
(
"AWS_COGNITO_AUTH_PARAMS_USER"
,
System
.
getenv
(
"AWS_COGNITO_AUTH_PARAMS_USER"
));
String
awsCognitoAuthParamsPassword
=
System
.
getProperty
(
"AWS_COGNITO_AUTH_PARAMS_PASSWORD"
,
System
.
getenv
(
"AWS_COGNITO_AUTH_PARAMS_PASSWORD"
));
AWSCognitoClient
client
=
new
AWSCognitoClient
(
awsCognitoClientId
,
awsCognitoAuthFlow
,
awsCognitoAuthParamsUser
,
awsCognitoAuthParamsPassword
);
token
=
client
.
getToken
();
}
else
if
(
Strings
.
isNullOrEmpty
(
token
)
&&
vendor
.
equals
(
"azure"
))
{
String
sp_id
=
System
.
getProperty
(
"INTEGRATION_TESTER"
,
System
.
getenv
(
"INTEGRATION_TESTER"
));
String
sp_secret
=
System
.
getProperty
(
"TESTER_SERVICEPRINCIPAL_SECRET"
,
System
.
getenv
(
"TESTER_SERVICEPRINCIPAL_SECRET"
));
String
tenant_id
=
System
.
getProperty
(
"AZURE_AD_TENANT_ID"
,
System
.
getenv
(
"AZURE_AD_TENANT_ID"
));
String
app_resource_id
=
System
.
getProperty
(
"AZURE_AD_APP_RESOURCE_ID"
,
System
.
getenv
(
"AZURE_AD_APP_RESOURCE_ID"
));
token
=
new
AzureServicePrincipal
().
getIdToken
(
sp_id
,
sp_secret
,
tenant_id
,
app_resource_id
);
}
else
if
(
Strings
.
isNullOrEmpty
(
token
)
&&
vendor
.
equals
(
"ibm"
))
{
token
=
IdentityClient
.
getTokenForUserWithAccess
();
}
return
"Bearer "
+
token
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment