From ae4f0341aebc3bcc30451d5df5b5ec766aeea4c3 Mon Sep 17 00:00:00 2001 From: Preston Sharpe Date: Fri, 5 Feb 2021 11:53:32 -0700 Subject: [PATCH 1/6] get a static war file --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index e34cba8..0f6e384 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -35,7 +35,7 @@ mode: 0644 - name: Find latest release of .war file - shell: curl -s https://api.github.com/repos/gsa/catalog-fgdc2iso/releases/latest | jq -r ".assets[] | .browser_download_url" + shell: curl https://api.github.com/repos/GSA/catalog-fgdc2iso/releases/32097298/assets | jq '.[0].browser_download_url' register: latest_war_url tags: skip_ansible_lint args: From 9c85b8af26c670a587addfa5e797043962b1a898 Mon Sep 17 00:00:00 2001 From: Preston Date: Fri, 5 Feb 2021 12:23:16 -0700 Subject: [PATCH 2/6] Add correct flags --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 0f6e384..704f710 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -35,7 +35,7 @@ mode: 0644 - name: Find latest release of .war file - shell: curl https://api.github.com/repos/GSA/catalog-fgdc2iso/releases/32097298/assets | jq '.[0].browser_download_url' + shell: curl -s https://api.github.com/repos/GSA/catalog-fgdc2iso/releases/32097298/assets | jq -r '.[0].browser_download_url' register: latest_war_url tags: skip_ansible_lint args: From 08348352619de0221b3731b772ddc7dbdfea79d9 Mon Sep 17 00:00:00 2001 From: Preston Sharpe Date: Fri, 5 Feb 2021 14:31:32 -0700 Subject: [PATCH 3/6] make pinned url a variable --- defaults/main.yml | 2 ++ tasks/main.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index ed97d53..ac9d25a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1 +1,3 @@ --- + +catalog_fgdc2iso_pinned_war_url = https://api.github.com/repos/GSA/catalog-fgdc2iso/releases/32097298/assets \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 704f710..31b5bfa 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -35,7 +35,7 @@ mode: 0644 - name: Find latest release of .war file - shell: curl -s https://api.github.com/repos/GSA/catalog-fgdc2iso/releases/32097298/assets | jq -r '.[0].browser_download_url' + shell: curl -s {{ catalog_fgdc2iso_pinned_war_url }} | jq -r '.[0].browser_download_url' register: latest_war_url tags: skip_ansible_lint args: From 12c45178c0da06af0e8a1116968f304751179341 Mon Sep 17 00:00:00 2001 From: Preston Sharpe Date: Fri, 5 Feb 2021 14:32:37 -0700 Subject: [PATCH 4/6] add new line --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index ac9d25a..8f2005c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,3 +1,3 @@ --- -catalog_fgdc2iso_pinned_war_url = https://api.github.com/repos/GSA/catalog-fgdc2iso/releases/32097298/assets \ No newline at end of file +catalog_fgdc2iso_pinned_war_url = https://api.github.com/repos/GSA/catalog-fgdc2iso/releases/32097298/assets From d9b7033f8d1f218051f419fcded7250b3563e876 Mon Sep 17 00:00:00 2001 From: Preston Sharpe Date: Fri, 5 Feb 2021 14:38:12 -0700 Subject: [PATCH 5/6] convert to yml --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 8f2005c..7b8db51 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,3 +1,3 @@ --- -catalog_fgdc2iso_pinned_war_url = https://api.github.com/repos/GSA/catalog-fgdc2iso/releases/32097298/assets +catalog_fgdc2iso_pinned_war_url: https://api.github.com/repos/GSA/catalog-fgdc2iso/releases/32097298/assets From cd609bc0666686b49c427292a70793ff1984c14f Mon Sep 17 00:00:00 2001 From: Preston Sharpe Date: Fri, 5 Feb 2021 17:04:52 -0700 Subject: [PATCH 6/6] add comments --- tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 31b5bfa..f22e076 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -34,6 +34,9 @@ dest: /etc/cron.d/clean-tmp-files mode: 0644 +# We used to use the latest war file until we moved to 'freezing' our repos +# See: https://github.com/GSA/datagov-deploy/issues/2745 +# If you need to change this url without doing another release, add a variable to datagov-deploy - name: Find latest release of .war file shell: curl -s {{ catalog_fgdc2iso_pinned_war_url }} | jq -r '.[0].browser_download_url' register: latest_war_url