Skip to content

Commit

Permalink
Summit checkpoint
Browse files Browse the repository at this point in the history
Use the summit-checkpoint branch of all used services
  • Loading branch information
Aiden Keating committed May 14, 2019
1 parent 6fac33c commit e927d03
Show file tree
Hide file tree
Showing 20 changed files with 113 additions and 70 deletions.
4 changes: 2 additions & 2 deletions ansible/playbooks/group_vars/postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
namespace_postgresql: "{{ project_name }}"

postgresql_init_scripts:
- https://raw.githubusercontent.com/NAPS-emergency-response-project/sql-scripts/master/naps_emergency_response_ddl.sql
- https://raw.githubusercontent.com/NAPS-emergency-response-project/sql-scripts/summit/naps_emergency_response_ddl.sql

postgresql_username: naps
postgresql_password: naps
postgresql_database: naps_emergency_response

postgresql_application_name: postgresql
postgresql_credentials_secret: "{{ postgresql_application_name }}-credentials"
postgresql_credentials_secret: "{{ postgresql_application_name }}-credentials"
29 changes: 29 additions & 0 deletions ansible/playbooks/group_vars/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,46 @@ incident_priority_service_application_name: incident-priority-service
disaster_simulator_service_application_name: disaster-simulator

incident_service_git_repo: https://github.com/NAPS-emergency-response-project/incident-service.git
incident_service_git_branch: summit-checkpoint

responder_simulator_service_git_repo: https://github.com/NAPS-emergency-response-project/responder-simulator.git
responder_simulator_service_git_branch: summit-checkpoint

responder_service_git_repo: https://github.com/NAPS-emergency-response-project/responder-service.git
responder_service_git_branch: summit-checkpoint

incident_process_git_repo: https://github.com/NAPS-emergency-response-project/incident-process-kjar.git
incident_process_git_branch: summit-checkpoint

assignment_rules_git_repo: https://github.com/NAPS-emergency-response-project/cajun-navy-rules.git
assignment_rules_git_branch: summit-checkpoint

assignment_rules_model_git_repo: https://github.com/NAPS-emergency-response-project/cajun-navy-rules-model.git
assignment_rules_model_git_branch: summit-checkpoint

process_service_git_repo: https://github.com/NAPS-emergency-response-project/process-service.git
process_service_git_branch: summit-checkpoint

mission_service_git_repo: https://github.com/NAPS-emergency-response-project/mission-service.git
mission_service_git_branch: summit-checkpoint

emergency_console_git_repo: https://github.com/NAPS-emergency-response-project/emergency-console.git
emergency_console_git_branch: summit-checkpoint

process_viewer_git_repo: https://github.com/NAPS-emergency-response-project/process-viewer.git
process_viewer_git_repo: summit-checkpoint

incident_priority_service_git_repo: https://github.com/NAPS-emergency-response-project/incident-priority-service.git
incident_priority_service_git_branch: summit-checkpoint

disaster_simulator_service_git_repo: https://github.com/NAPS-emergency-response-project/disaster-simulator.git
disaster_simulator_service_git_branch: summit-checkpoint

process_viewer_git_repo: https://github.com/NAPS-emergency-response-project/process-viewer.git
process_viewer_git_branch: summit-checkpoint

sso_theme_git_repo: https://github.com/NAPS-emergency-response-project/emergency-sso
sso_theme_git_branch: summit-checkpoint

process_service_postgresql_username: rhpam
process_service_postgresql_password: rhpam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
jenkinsPipelineStrategy:
jenkinsfile: |-
def git_repo = "{{ assignment_rules_model_git_repo }}"
def git_branch = "{{ assignment_rules_model_git_branch }}"
def version = ""
def groupId = ""
def artifactId = ""
Expand All @@ -21,7 +22,7 @@ spec:
node ('maven-with-nexus') {
stage ('Compile') {
echo "Starting build"
git url: "${git_repo}", branch: "master"
git url: "${git_repo}", branch: "${git_branch}"
def pom = readMavenPom file: 'pom.xml'
version = pom.version
groupId = pom.groupId
Expand All @@ -42,9 +43,9 @@ spec:
stage ('Publish to Nexus') {
echo "adding server settings to ~/.m2/settings.xml"
def xml=" <servers><server><id>releases</id>" +
"<username>deployment</username><password>deployment123</password>" +
"</server><server><id>snapshots</id>" +
def xml=" <servers><server><id>releases</id>" +
"<username>deployment</username><password>deployment123</password>" +
"</server><server><id>snapshots</id>" +
"<username>deployment</username><password>deployment123</password>" +
"</server></servers>"
sh "sed -i 's|<proxies>||' /home/jenkins/.m2/settings.xml"
Expand All @@ -59,12 +60,12 @@ spec:
sh "mvn deploy -DskipTests=true -Dcom.redhat.xpaas.repo.redhatga=true -DaltDeploymentRepository=releases::default::${nexusUrl}/content/repositories/releases"
}
}
}
}
type: JenkinsPipeline
triggers:
- github:
secret: {{ github_secret }}
type: GitHub
- generic:
secret: {{ generic_secret }}
type: Generic
type: Generic
13 changes: 7 additions & 6 deletions ansible/resources/assignment-rules/assignment-rules-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
jenkinsPipelineStrategy:
jenkinsfile: |-
def git_repo = "{{ assignment_rules_git_repo }}"
def git_branch = "{{ assignment_rules_git_branch }}"
def version = ""
def groupId = ""
def artifactId = ""
Expand All @@ -21,7 +22,7 @@ spec:
node ('maven-with-nexus') {
stage ('Compile') {
echo "Starting build"
git url: "${git_repo}", branch: "master"
git url: "${git_repo}", branch: "${git_branch}"
def pom = readMavenPom file: 'pom.xml'
version = pom.version
groupId = pom.groupId
Expand All @@ -42,9 +43,9 @@ spec:
stage ('Publish to Nexus') {
echo "adding server settings to ~/.m2/settings.xml"
def xml=" <servers><server><id>releases</id>" +
"<username>deployment</username><password>deployment123</password>" +
"</server><server><id>snapshots</id>" +
def xml=" <servers><server><id>releases</id>" +
"<username>deployment</username><password>deployment123</password>" +
"</server><server><id>snapshots</id>" +
"<username>deployment</username><password>deployment123</password>" +
"</server></servers>"
sh "sed -i 's|<proxies>||' /home/jenkins/.m2/settings.xml"
Expand All @@ -59,12 +60,12 @@ spec:
sh "mvn deploy -DskipTests=true -Dcom.redhat.xpaas.repo.redhatga=true -DaltDeploymentRepository=releases::${nexusUrl}/content/repositories/releases"
}
}
}
}
type: JenkinsPipeline
triggers:
- github:
secret: {{ github_secret }}
type: GitHub
- generic:
secret: {{ generic_secret }}
type: Generic
type: Generic
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
jenkinsPipelineStrategy:
jenkinsfile: |-
def git_repo = "{{ disaster_simulator_service_git_repo }}"
def git_branch = "{{ disaster_simulator_service_git_branch }}"
def version = ""
def groupId = ""
def artifactId = ""
Expand All @@ -24,7 +25,7 @@ spec:
node ('maven-with-nexus') {
stage ('Compile') {
echo "Starting build"
git url: "${git_repo}", branch: "master"
git url: "${git_repo}", branch: "${git_branch}"
def pom = readMavenPom file: 'pom.xml'
version = pom.version
groupId = pom.groupId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
jenkinsPipelineStrategy:
jenkinsfile: |-
def git_repo = "{{ incident_service_git_repo }}"
def git_branch = "{{ incident_service_git_branch }}"
def namespace_jenkins = "{{ namespace_tools }}"
def namespace_app = "{{ namespace }}"
def app_build = "{{ buildconfig_name }}"
Expand All @@ -33,30 +34,30 @@ spec:
}
builds.untilEach(1) {
return it.object().status.phase == "Complete"
}
}
}
}
}
stage ('Deploy') {
openshift.withCluster() {
openshift.withProject( "${namespace_app}") {
openshift.withProject( "${namespace_app}") {
openshift.tag("${namespace_jenkins}/${app_imagestream}:latest", "${namespace_app}/${app_imagestream}:latest")
def dc_app = openshift.selector("dc", "${app_name}")
timeout (5) {
dc_app.untilEach(1) {
return it.object().status.readyReplicas == 1
}
}
}
}
}
}
}
}
type: JenkinsPipeline
triggers:
- github:
secret: {{ github_secret }}
type: GitHub
- generic:
secret: {{ generic_secret }}
type: Generic
type: Generic
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
jenkinsPipelineStrategy:
jenkinsfile: |-
def git_repo = "{{ incident_priority_service_git_repo }}"
def git_branch = "{{ incident_priority_service_git_branch }}"
def version = ""
def groupId = ""
def artifactId = ""
Expand All @@ -24,7 +25,7 @@ spec:
node ('maven-with-nexus') {
stage ('Compile') {
echo "Starting build"
git url: "${git_repo}", branch: "master"
git url: "${git_repo}", branch: "${git_branch}"
def pom = readMavenPom file: 'pom.xml'
version = pom.version
groupId = pom.groupId
Expand Down Expand Up @@ -62,14 +63,14 @@ spec:
}
builds.untilEach(1) {
return it.object().status.phase == "Complete"
}
}
}
}
}
stage ('Deploy') {
openshift.withCluster() {
openshift.withProject( "${namespace_app}") {
openshift.withProject( "${namespace_app}") {
openshift.tag("${namespace_jenkins}/${app_imagestream}:latest", "${namespace_app}/${app_imagestream}:latest")
openshift.tag("${namespace_jenkins}/${app_imagestream}:latest", "${namespace_jenkins}/${app_imagestream}:${commitId}")
openshift.tag("${namespace_app}/${app_imagestream}:latest", "${namespace_app}/${app_imagestream}:${commitId}")
Expand All @@ -79,15 +80,15 @@ spec:
return it.object().status.readyReplicas == 1
}
}
}
}
}
}
}
}
type: JenkinsPipeline
triggers:
- github:
secret: {{ github_secret }}
type: GitHub
- generic:
secret: {{ generic_secret }}
type: Generic
type: Generic
13 changes: 7 additions & 6 deletions ansible/resources/incident-process/incident-process-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
jenkinsPipelineStrategy:
jenkinsfile: |-
def git_repo = "{{ incident_process_git_repo }}"
def git_branch = "{{ incident_process_git_branch }}"
def version = ""
def groupId = ""
def artifactId = ""
Expand All @@ -21,7 +22,7 @@ spec:
node ('maven-with-nexus') {
stage ('Compile') {
echo "Starting build"
git url: "${git_repo}", branch: "master"
git url: "${git_repo}", branch: "${git_branch}"
def pom = readMavenPom file: 'pom.xml'
version = pom.version
groupId = pom.groupId
Expand All @@ -38,9 +39,9 @@ spec:
stage ('Publish to Nexus') {
echo "adding server settings to ~/.m2/settings.xml"
def xml=" <servers><server><id>releases</id>" +
"<username>deployment</username><password>deployment123</password>" +
"</server><server><id>snapshots</id>" +
def xml=" <servers><server><id>releases</id>" +
"<username>deployment</username><password>deployment123</password>" +
"</server><server><id>snapshots</id>" +
"<username>deployment</username><password>deployment123</password>" +
"</server></servers>"
sh "sed -i 's|<proxies>||' /home/jenkins/.m2/settings.xml"
Expand All @@ -55,12 +56,12 @@ spec:
sh "mvn deploy -DskipTests=true -Dcom.redhat.xpaas.repo.redhatga=true -DaltDeploymentRepository=releases::${nexusUrl}/content/repositories/releases"
}
}
}
}
type: JenkinsPipeline
triggers:
- github:
secret: {{ github_secret }}
type: GitHub
- generic:
secret: {{ generic_secret }}
type: Generic
type: Generic
13 changes: 7 additions & 6 deletions ansible/resources/incident-service/incident-service-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
jenkinsPipelineStrategy:
jenkinsfile: |-
def git_repo = "{{ incident_service_git_repo }}"
def git_branch = "{{ incident_service_git_branch }}"
def version = ""
def groupId = ""
def artifactId = ""
Expand All @@ -24,7 +25,7 @@ spec:
node ('maven-with-nexus') {
stage ('Compile') {
echo "Starting build"
git url: "${git_repo}", branch: "master"
git url: "${git_repo}", branch: "${git_branch}"
def pom = readMavenPom file: 'pom.xml'
version = pom.version
groupId = pom.groupId
Expand Down Expand Up @@ -62,14 +63,14 @@ spec:
}
builds.untilEach(1) {
return it.object().status.phase == "Complete"
}
}
}
}
}
stage ('Deploy') {
openshift.withCluster() {
openshift.withProject( "${namespace_app}") {
openshift.withProject( "${namespace_app}") {
openshift.tag("${namespace_jenkins}/${app_imagestream}:latest", "${namespace_app}/${app_imagestream}:latest")
openshift.tag("${namespace_jenkins}/${app_imagestream}:latest", "${namespace_jenkins}/${app_imagestream}:${commitId}")
openshift.tag("${namespace_app}/${app_imagestream}:latest", "${namespace_app}/${app_imagestream}:${commitId}")
Expand All @@ -79,15 +80,15 @@ spec:
return it.object().status.readyReplicas == 1
}
}
}
}
}
}
}
}
type: JenkinsPipeline
triggers:
- github:
secret: {{ github_secret }}
type: GitHub
- generic:
secret: {{ generic_secret }}
type: Generic
type: Generic
Loading

0 comments on commit e927d03

Please sign in to comment.