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

Feature/ft 01 002 #7

Merged
merged 60 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
2d8f770
Initial state of FT_01_003, missing Step 3 of testcase
jorge-romero Jun 17, 2020
4c2b7b1
Initial state of FT_01_002, steps 1..3
jorge-romero Jun 17, 2020
216d3f7
FT_01_002
Jun 28, 2020
85f0db3
Merge remote-tracking branch 'remotes/origin/master' into feature/ft_…
Jun 30, 2020
a3ac6df
Adapt some tests to changes in GitUtil
Jun 30, 2020
1b15370
Test scope for rest client
Jun 30, 2020
0ab2003
Merge remote-tracking branch 'remotes/origin/master' into feature/ft_…
Jun 30, 2020
0d756c7
Use an actual clone command and setup sslVerify at git user config level
Jul 1, 2020
8e0f870
Fix cloneRepository
Jul 1, 2020
22d79da
Specify initial branch for git clone
Jul 1, 2020
54e2148
Fix specify initial branch
Jul 1, 2020
526ccfd
Set base bitbucket branch through environment variables
Jul 1, 2020
b13b79a
Get provisioning app name and project from properties
Jul 1, 2020
13d1563
Provisioning app name and deploy cfg name need not be the same
Jul 1, 2020
ab76fbb
Parameterize the name of the quickstarters configmap
Jul 2, 2020
d5e0c00
Debug waiting for deployment
Jul 2, 2020
bdd8f3d
Fix waiting for deployment ready
Jul 6, 2020
403fced
Fix waiting for deployment
Jul 6, 2020
c69fd52
Fix waiting for deployment
Jul 6, 2020
5e1fa1d
Fix wait for deployment
Jul 6, 2020
a7b0acb
Add diagnostics
Jul 6, 2020
1af7bbd
More diagnostics
Jul 6, 2020
74d1db4
Add pause after pod ready so that the app can boot
Jul 6, 2020
6f7cd8c
Remove diagnostics
Jul 6, 2020
101711a
Small fixes
Jul 7, 2020
b2e1a8b
projects must be static
Jul 7, 2020
719f49a
Ignore JenkinsSpec
Jul 9, 2020
4805ea8
Updated readme
Jul 9, 2020
7d61078
Improve cleanup
Jul 9, 2020
be5953a
Improve cleanup
Jul 9, 2020
d2626a4
Create a component
Jul 14, 2020
642df78
Merge branch 'feature/ft_01_002' of https://bitbucket.biscrum.com/scm…
Jul 14, 2020
fc63552
Create component
Jul 14, 2020
a3eeeb5
Select project to modify
Jul 14, 2020
e0b8835
Component id cannot contain numbers
Jul 14, 2020
6c0faa5
Wait for component job to finish
Jul 14, 2020
2b55808
Fix where to find the jenkins file
Jul 14, 2020
16bd3d7
ACtivate refresh and wait for very long
Jul 14, 2020
542661f
Only verySlow and fix detection of odsStartupComponentJob
Jul 14, 2020
a6a1a01
Fix prefix in job detection
Jul 14, 2020
fad9fa3
Fix prefix in job detection
Jul 14, 2020
364016b
Revert "Fix prefix in job detection"
Jul 15, 2020
cdd7551
Revert "Fix prefix in job detection"
Jul 15, 2020
43a9504
Reverting changes in job detection
Jul 15, 2020
2affa0e
getComponentJobs already returns jobs
Jul 15, 2020
a10c4f5
Fix test file location
Jul 15, 2020
4ed5fd2
In cleanup also wait for provapp to get ready
Jul 15, 2020
36e6736
Remove health check util
Jul 15, 2020
a93b158
Try waitFor prov-app login page
Jul 15, 2020
70c9ae1
Wait for prov-app login page in cleanup
Jul 15, 2020
0c9ab72
Merge remote-tracking branch 'remotes/origin/feature/initial-tests' i…
Jul 16, 2020
5653e80
Manually merge README.md due to a conflict with upper and lowercase.
Jul 16, 2020
0733c38
Merge remote-tracking branch 'remotes/origin/feature/initial-tests' i…
Jul 16, 2020
fb6ac1d
Don't use relative paths
Jul 16, 2020
7587302
Add variables to build.gradle
Jul 16, 2020
2d99279
Merge branch 'master' of https://bitbucket.biscrum.com/scm/edpc/ods-e…
jorge-romero Jul 22, 2020
2804e06
Fix problem when an env variable value contains special characters
Jul 27, 2020
fdb7bb9
Fixes to make it work in a onpremise environment with special needs.
jorge-romero Aug 4, 2020
62e039f
fixes to make it work again it he box
jorge-romero Aug 6, 2020
2fdebe1
Activate Test FT_01_002
jorge-romero Aug 10, 2020
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
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
PROV_APP_DEPLOY_CFG=ods-provisioning-app
PROV_APP_PROJECT=ods
PROV_APP_USER=openshift
PROV_APP_PASSWORD=openshift
ATLASSIAN_USER=openshift
Expand All @@ -11,9 +13,12 @@ OPENSHIFT_PROJECT=edpp
OPENSHIFT_PUBLIC_HOST=.ocp.odsbox.lan
OPENSHIFT_CLUSTER=https://ocp.odsbox.lan:8443/
SIMULATE=false
OPENSHIFT_TOKEN=THE_TOKEN
# values provided by ods-configuration/ods-core.env if present
JIRA_URL=http://jira.odsbox.lan:8080/
NEXUS_URL=https://nexus-ods.ocp.odsbox.lan
NEXUS_USERNAME=admin
NEXUS_PASSWORD=openshift
BITBUCKET_URL=http://bitbucket.odsbox.lan:7990
BITBUCKET_BASE_BRANCH=master
QUICKSTARTERS_CONFIGMAP=quickstarters.properties
47 changes: 25 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,31 @@ You can have a look at the `build.gradle` and `src/test/resources/GebConfig.groo
## Usage
You need to set several environment variables in order to make this work, as it is intended to use in a container / pod lately.

| Variable | Value | Description |
|-----------------------|----------------------------------|------------------------------------------------------------------------------------------------------------------|
| PROV_APP_USER | openshift | Provisioning app user name |
| PROV_APP_PASSWORD | openshift | Provisioning app password |
| ATLASSIAN_USER | openshift | Atlassian user name |
| ATLASSIAN_PASSWORD | openshift | Atlassian password |
| JENKINS_USER | developer | Jenkins user name |
| JENKINS_PASSWORD | any | Jenkins password |
| OPENSHIFT_USER | developer | Openshift user name |
| OPENSHIFT_PASSWORD | any | Openshift password |
| PROV_APP_NAME | openshift | Name of the deployment of the provisioning app |
| JIRA_URL | http://jira.odsbox.lan:8080/ | Url of Jira instance related with the prov app |
| OPENSHIFT_PROJECT | edpp | project identifier for prov app in the preliminary tests(jira tests) |
| OPENSHIFT_PUBLIC_HOST | .ocp.odsbox.lan | host where we can locate the prov app |
| OPENSHIFT_CLUSTER | https://ocp.odsbox.lan:8443/ | URL of the Openshift Cluster |
| BITBUCKET_URL | http://bitbucket.odsbox.lan:7990 | Url of Bitbucket instance |
| SIMULATE | false | Specify (true or false) if we skip the creation of project, components, etc |
| NO_NEXUS | true | In case you want to use the public repositories, if it set to true it is not needed to set the next 3 properties |
| NEXUS_URL | https://nexus-ods.ocp.odsbox.lan | The nexus url if we want to use an specific nexus instance |
| NEXUS_USERNAME | admin | The nexus user |
| NEXUS_PASSWORD | openshift | The nexus password |

| Variable | Value | Description |
|------------------------|----------------------------------|----------------------------------------------------------------------------- |
| PROV_APP_USER | openshift | Provisioning app user name |
| PROV_APP_PASSWORD | openshift | Provisioning app password |
| ATLASSIAN_USER | openshift | Atlassian user name |
| ATLASSIAN_PASSWORD | openshift | Atlassian password |
| JENKINS_USER | developer | Jenkins user name |
| JENKINS_PASSWORD | any | Jenkins password |
| OPENSHIFT_USER | developer | Openshift user name |
| OPENSHIFT_PASSWORD | any | Openshift password |
| PROV_APP_NAME | openshift | Name of the deployment of the provisioning app |
| JIRA_URL | http://jira.odsbox.lan:8080/ | Url of Jira instance related with the prov app |
| OPENSHIFT_PROJECT | edpp | project identifier for prov app in the preliminary tests(jira tests) |
| OPENSHIFT_PUBLIC_HOST | .ocp.odsbox.lan | host where we can locate the prov app |
| OPENSHIFT_CLUSTER | https://ocp.odsbox.lan:8443/ | URL of the Openshift Cluster |
| BITBUCKET_URL | http://bitbucket.odsbox.lan:7990 | Url of Bitbucket instance |
| SIMULATE | false | Specify (true or false) if we skip the creation of project, components, etc |
| NO_NEXUS | true | In case you want to use the public repositories, if it set to true it is not needed to set the next 3 properties |
| NEXUS_URL | https://nexus-ods.ocp.odsbox.lan | The nexus url if we want to use an specific nexus instance |
| NEXUS_USERNAME | admin | The nexus user |
| NEXUS_PASSWORD | openshift | The nexus password |
| BITBUCKET_BASE_BRANCH | master | The branck used as base branch for the QS(useful when you are testing the box)|
| QUICKSTARTERS_CONFIGMAP| quickstarters.properties | The configmap name where the qs of the provisioning app gets its configuration|
| OPENSHIFT_TOKEN | the_token | Token to login in Openshift to be use instead of the openshift user for specific tasks |

### Environment variables setup
To get the information needed to run the tests there are 3 steps that override the previous one:
1. If the test project is co-located with the ods-configuration folder, the process will retrieve the values that exists in the ods-core.env file to obtain the urls of Openshift, Jira, Bitbucket.
Expand Down
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ ext {
chromeDriverVersion = '83.0.4103.39'
geckoDriverVersion = '0.26.0'
htmlunitVersion = "2.36.0"
openshiftClientVersion = '9.0.0.Final'

// Environment variable needed to run the tests
dotEnvFile = './.env'
odsConfigFile = '../ods-configuration/ods-core.env'
environmentVariables = [
PROV_APP_DEPLOY_CFG : '',
PROV_APP_PROJECT : '',
PROV_APP_USER : '',
PROV_APP_PASSWORD : '',
BITBUCKET_BASE_BRANCH : '',
QUICKSTARTERS_CONFIGMAP : '',
ATLASSIAN_USER : '',
ATLASSIAN_PASSWORD : '',
JENKINS_USER : '',
Expand Down Expand Up @@ -107,6 +112,9 @@ dependencies {
testCompile "org.eclipse.jgit:org.eclipse.jgit:5.7.0.202003110725-r"
testCompile "org.yaml:snakeyaml:1.26"

// Openshift client
testImplementation "com.openshift:openshift-restclient-java:$openshiftClientVersion"

}


Expand Down
Loading