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

Use cron-apt instead of apt upgrade molecule upgrade testing scenario #5214

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- name: Install gettext
apt:
name: gettext
state: latest
update_cache: yes
cache_valid_time: 3600
tags:
- apt
21 changes: 17 additions & 4 deletions molecule/upgrade/side_effect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,23 @@
hosts: securedrop
become: yes
tasks:
- name: Perform safe upgrade
apt:
update_cache: yes
upgrade: yes
- name: Add apt-test to install non-local packages referenced by metapackages (linux images)
lineinfile:
path: /etc/apt/security.list
line: "deb [arch=amd64] https://apt-test.freedom.press xenial main"
become: yes

- name: Perform cron-apt upgrade
command: cron-apt -i -s
become: yes

# cron-apt will always return 0, even if packages are held back.
# Here, we should manually check to see if packages were kept back with security.list
- name: Check to see if packages were kept back
command: "apt-get upgrade -y -o Dir::Etc::SourceList=security.list"
become: yes
register: apt_upgrade_output
failed_when: "'The following packages have been kept back' in apt_upgrade_output.stdout"

- name: Lay out app testing deps
hosts: securedrop_application_server
Expand Down