-
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upload software artifacts to internal bucket
- Loading branch information
Showing
5 changed files
with
97 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ | |
.python-version | ||
venv/ | ||
*.swp | ||
docker/cache/ | ||
docker/cache/ | ||
|
||
ansible/image-manifest*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ vars | to_json }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
- 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/{{ gotrue_release }}/gotrue-{{ gotrue_release }}-arm64.tar.gz" | ||
dest: /tmp/gotrue.tar.gz | ||
checksum: "{{ gotrue_release_checksum }}" | ||
timeout: 60 | ||
|
||
- name: gotrue - create /tmp/gotrue | ||
file: | ||
path: /tmp/gotrue | ||
state: directory | ||
mode: 0775 | ||
|
||
- name: gotrue - unpack archive in /tmp/gotrue | ||
unarchive: | ||
remote_src: yes | ||
src: /tmp/gotrue.tar.gz | ||
dest: /tmp/gotrue | ||
|
||
- name: gotrue - pack archive | ||
shell: | | ||
tar -cJf /tmp/gotrue-{{ gotrue_release }}-arm64.tar.xz /tmp/gotrue | ||
- 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: | | ||
tar -cJf /tmp/supabase-admin-api-{{ adminapi_release }}-arm64.tar.xz /tmp/supabase-admin-api | ||
- name: upload archives | ||
shell: | | ||
aws s3 cp /tmp/{{ item.file }} s3://{{ internal_artifacts_bucket }}/upgrades/{{ item.service }}/{{ item.file }} | ||
with_items: | ||
- service: gotrue | ||
file: gotrue-{{ gotrue_release }}-arm64.tar.xz | ||
- service: postgrest | ||
file: postgrest-{{ postgrest_release }}-arm64.tar.xz | ||
- service: supabase-admin-api | ||
file: supabase-admin-api-{{ adminapi_release }}-arm64.tar.xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
postgres-version = "15.1.0.45" | ||
postgres-version = "15.1.0.46-rc0" |