-
-
Notifications
You must be signed in to change notification settings - Fork 173
/
Copy pathmanifest-playbook.yml
75 lines (63 loc) · 2.92 KB
/
manifest-playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
- hosts: localhost
gather_facts: no
vars_files:
- ./vars.yml
tasks:
- name: Write out image manifest
action: template src=files/manifest.json dest=./image-manifest-{{ ami_release_version }}.json
- name: Upload image manifest
shell: |
aws s3 cp ./image-manifest-{{ ami_release_version }}.json s3://{{ internal_artifacts_bucket }}/manifests/postgres-{{ ami_release_version }}/software-manifest.json
# upload software artifacts of interest
# Generally - download, extract, repack as xz archive, upload
# currently, we upload gotrue, adminapi, postgrest
- name: gotrue - download commit archive
get_url:
url: "https://github.com/supabase/gotrue/releases/download/v{{ gotrue_release }}/auth-v{{ gotrue_release }}-arm64.tar.gz"
dest: /tmp/auth-v{{ gotrue_release }}-arm64.tar.gz
checksum: "{{ gotrue_release_checksum }}"
timeout: 60
- name: PostgREST - download ubuntu binary archive (arm)
get_url:
url: "https://github.com/PostgREST/postgrest/releases/download/v{{ postgrest_release }}/postgrest-v{{ postgrest_release }}-ubuntu-aarch64.tar.xz"
dest: /tmp/postgrest-{{ postgrest_release }}-arm64.tar.xz
checksum: "{{ postgrest_arm_release_checksum }}"
timeout: 60
- name: Download adminapi archive
get_url:
url: "https://supabase-public-artifacts-bucket.s3.amazonaws.com/supabase-admin-api/v{{ adminapi_release }}/supabase-admin-api_{{ adminapi_release }}_linux_arm64.tar.gz"
dest: "/tmp/adminapi.tar.gz"
timeout: 90
- name: adminapi - unpack archive in /tmp
unarchive:
remote_src: yes
src: /tmp/adminapi.tar.gz
dest: /tmp
- name: adminapi - pack archive
shell: |
cd /tmp && tar -cJf supabase-admin-api-{{ adminapi_release }}-arm64.tar.xz supabase-admin-api
- name: Download admin-mgr archive
get_url:
url: "https://supabase-public-artifacts-bucket.s3.amazonaws.com/admin-mgr/v{{ adminmgr_release }}/admin-mgr_{{ adminmgr_release }}_linux_arm64.tar.gz"
dest: "/tmp/admin-mgr.tar.gz"
timeout: 90
- name: admin-mgr - unpack archive in /tmp
unarchive:
remote_src: yes
src: /tmp/admin-mgr.tar.gz
dest: /tmp
- name: admin-mgr - pack archive
shell: |
cd /tmp && tar -cJf admin-mgr-{{ adminmgr_release }}-arm64.tar.xz admin-mgr
- name: upload archives
shell: |
aws s3 cp /tmp/{{ item.file }} s3://{{ internal_artifacts_bucket }}/upgrades/{{ item.service }}/{{ item.file }}
with_items:
- service: gotrue
file: auth-v{{ gotrue_release }}-arm64.tar.gz
- service: postgrest
file: postgrest-{{ postgrest_release }}-arm64.tar.xz
- service: supabase-admin-api
file: supabase-admin-api-{{ adminapi_release }}-arm64.tar.xz
- service: admin-mgr
file: admin-mgr-{{ adminmgr_release }}-arm64.tar.xz