Skip to content

Commit

Permalink
Merge branch 'main' into kubectl-build-deploy-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Toby Bellwood committed Dec 24, 2020
2 parents 3fdb17b + 878d17a commit 66906d1
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions images/oc-build-deploy-dind/build-deploy-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ if [[ ( "$TYPE" == "pullrequest" || "$TYPE" == "branch" ) && ! $THIS_IS_TUG ==
BUILD_ARGS+=(--build-arg LAGOON_GIT_BRANCH="${BRANCH}")
BUILD_ARGS+=(--build-arg LAGOON_GIT_SAFE_BRANCH="${SAFE_BRANCH}")
BUILD_ARGS+=(--build-arg LAGOON_PROJECT="${PROJECT}")
BUILD_ARGS+=(--build-arg LAGOON_ENVIRONMENT="${SAFE_BRANCH}")
BUILD_ARGS+=(--build-arg LAGOON_SAFE_PROJECT="${SAFE_PROJECT}")
BUILD_ARGS+=(--build-arg LAGOON_BUILD_TYPE="${TYPE}")
BUILD_ARGS+=(--build-arg LAGOON_GIT_SOURCE_REPOSITORY="${SOURCE_REPOSITORY}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ objects:
LAGOON_GIT_BRANCH: ${BRANCH}
LAGOON_SAFE_PROJECT: ${SAFE_PROJECT}
LAGOON_PROJECT: ${PROJECT}
LAGOON_ENVIRONMENT: ${SAFE_BRANCH}
LAGOON_ENVIRONMENT_TYPE: ${ENVIRONMENT_TYPE}
LAGOON_ROUTE: ${ROUTE}
LAGOON_ROUTES: ${ROUTES}
Expand Down
2 changes: 1 addition & 1 deletion tests/checks/check-ingress-annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
jq -er ".metadata.annotations | .\"$annotation\"") = "$value" ]
loop: "{{ expected_annotations }}"
register: result
retries: 20
retries: 30
delay: 10
until: result.rc == 0
- name: "{{ testname }} - Check if {{ingress}} ingress of namespace {{ project }}-{{ branch }} has annotation"
Expand Down
2 changes: 1 addition & 1 deletion tests/checks/check-namespace-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
jq -er ".metadata.labels | .\"$label\"") = "$value" ]
loop: "{{ expected_labels }}"
register: result
retries: 20
retries: 30
delay: 10
until: result.rc == 0
- name: "{{ testname }} - Check if {{project}} namespace is labelled"
Expand Down
2 changes: 1 addition & 1 deletion tests/checks/check-url-header.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
register: result
until: result[expected_header] is defined
failed_when: result[expected_header] != expected_header_value
retries: 20
retries: 30
delay: 10

- name: >-
Expand Down
2 changes: 1 addition & 1 deletion tests/checks/check-url-redirect-host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
validate_certs: no
register: result
until: result.location | default('') | regex_search(expected_redirect_location)
retries: 20
retries: 30
delay: 10
- name: "{{ testname }} - Check if URL {{url}} with sending Host: {{ host }} redirects to the location {{expected_redirect_location}}"
debug: msg="Success!!!"
Expand Down
2 changes: 1 addition & 1 deletion tests/checks/check-url-redirect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
validate_certs: no
register: result
until: result.location | default('') | regex_search(expected_redirect_location)
retries: 20
retries: 30
delay: 10
- name: "{{ testname }} - Check if URL {{url}} redirects to the location {{expected_redirect_location}}"
debug: msg="Success!!!"
Expand Down
2 changes: 1 addition & 1 deletion tests/checks/check-url-returncode-host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
validate_certs: no
register: result
until: result.status is defined and result.status == expected_returncode|int
retries: 20
retries: 30
delay: 10
- name: "{{ testname }} - Check if URL {{url}} with sending Host: {{ host }} returns with return code {{expected_returncode}}"
debug: msg="Success!!!"
Expand Down
2 changes: 1 addition & 1 deletion tests/checks/check-url-returncode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
validate_certs: no
register: result
until: result.status is defined and result.status == expected_returncode|int
retries: 20
retries: 30
delay: 10
- name: "{{ testname }} - Check if URL {{url}} returns with return code {{expected_returncode}}"
debug: msg="Success!!!"
Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/ssh/ssh-command.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
shell: ssh {{username}}@{{ lookup('env','SSH_HOST') }} -p {{ lookup('env','SSH_PORT') }} {{command}}
register: result
until: result.stdout | search(expected_content)
retries: 20
retries: 30
delay: 10
8 changes: 4 additions & 4 deletions tests/tests/active-standby/deploy-active-standby.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
body: '{ "query": "query($id: Int!) {taskById(id: $id){status}}", "variables": {"id":{{ apiresponse.json.data.switchActiveStandby.id }}}}'
register: taskresult
until: taskresult.json.data is defined and (taskresult.json.data.taskById.status == "succeeded" or taskresult.json.data.taskById.status == "failed")
retries: 20
delay: 5
retries: 30
delay: 10
- name: "{{ testname }} - fail if task fails"
fail:
msg: "The route migration failed for some reason"
Expand All @@ -40,5 +40,5 @@
body: '{ "query": "query($projectName: String!) {projectByName(name:$projectName){productionEnvironment,standbyProductionEnvironment}}", "variables": {"projectName":"{{ project }}"}}'
register: switchresult
until: switchresult.json.data.projectByName.productionEnvironment == standby_branch or switchresult.json.data.projectByName.standbyProductionEnvironment == branch
retries: 20
delay: 5
retries: 30
delay: 10

0 comments on commit 66906d1

Please sign in to comment.