Skip to content

Commit

Permalink
Merge pull request krestomatio#73 from krestomatio/develop
Browse files Browse the repository at this point in the history
adjust updatebot
  • Loading branch information
jobcespedes authored Sep 9, 2021
2 parents cbd3d82 + 4f8a269 commit 1028e8f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .ansible-ci/inventory/group_vars/all/dockerfile_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ doc_project_readme_src: README.md.j2
doc_project_readme_dest: "{{ git_repo_dir }}/README.md"

# updatebot
updatebot_m4e_template_src: updatebot-m4e.yaml.j2
updatebot_m4e_template_dest: "{{ git_repo_dir }}/.lighthouse/updatebot-m4e.yaml"
updatebot_ansible_collection_template_src: updatebot-ansible-collection.yaml.j2
updatebot_ansible_collection_template_dest: "{{ git_repo_dir }}/.lighthouse/updatebot-ansible-collection.yaml"
4 changes: 2 additions & 2 deletions .ansible-ci/tasks/updatebot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
when:
- "'moodle_web' in ansible_play_hosts_all or 'postgres' in ansible_play_hosts_all"
template:
src: "{{ updatebot_m4e_template_src }}"
dest: "{{ updatebot_m4e_template_dest }}"
src: "{{ updatebot_ansible_collection_template_src }}"
dest: "{{ updatebot_ansible_collection_template_dest }}"
mode: '0644'
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,13 @@ spec:
sed -i \
"s#^nginx_image:.*#nginx_image: ${nginx_image//@/\\@}#" \
roles/v1alpha1/web/nginx/defaults/main/nginx.yml
- command:
# update Graphql Engine image and its tag
name: bash
args:
- -c
- |
graphql_engine_image='{{ hostvars['graphql-engine'].state_yml_repo_digest }}'
sed -i \
"s#^graphql_engine_image:.*#graphql_engine_image: ${graphql_engine_image//@/\\@}#" \
roles/v1alpha1/app/g12e/defaults/main/graphql-engine.yml
4 changes: 3 additions & 1 deletion .ansible-ci/vars/pipeline/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
version_include_major_minor_tags: true
build_image_name: "{{ build_registry_path }}/{{ ansible_host }}"
git_add_path:
"'{{ state_file }}' '{{ dockerfile_builder_path }}' '{{ doc_project_readme_dest }}' '{{ updatebot_m4e_template_dest }}'"
"'{{ state_file }}' '{{ dockerfile_builder_path }}' '{{ doc_project_readme_dest }}' '{{ updatebot_ansible_collection_template_dest }}'"
git_add_throttle: 1
git_commit_msgs:
- "chore(release): {{ release_version }}"
- "[skip.ci]"
pr_commit_tag:
"{{ lookup('pipe', 'git rev-parse HEAD^2 &>/dev/null && git rev-parse HEAD^2 || echo') | default(false,true)}}"
artifact_tag: "{{ pr_commit_tag }}"
dockerfile_builder_tags:
- "{{ artifact_tag }}"
git_push_options: --tags
git_tag: "v{{ release_version }}"
release_version: "{{ next_version | default(false,true) }}"
Expand Down
4 changes: 2 additions & 2 deletions .lighthouse/jenkins-x/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ spec:
# promote if a new commit is made during pipeline
if [[ ! -z ${HEAD_COMMIT} && ! -z ${PULL_BASE_SHA} && "${HEAD_COMMIT}" != "${PULL_BASE_SHA}" ]]; then
jx-updatebot pr -c .lighthouse/updatebot-m4e.yaml \
--commit-title "chore(m4e): bump image versions with updatebot" \
jx-updatebot pr -c .lighthouse/updatebot-ansible-collection.yaml \
--commit-title "chore: bump image versions in ansible collection with updatebot" \
--no-version
else
echo "not promoted"
Expand Down
File renamed without changes.

0 comments on commit 1028e8f

Please sign in to comment.