Skip to content

Commit 14bd9a2

Browse files
committed
chore: reenable disabled code
1 parent 8daf6d9 commit 14bd9a2

File tree

1 file changed

+76
-76
lines changed

1 file changed

+76
-76
lines changed

.github/workflows/testinfra.yml

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -49,78 +49,78 @@ jobs:
4949
- name: Checkout Repo
5050
uses: actions/checkout@v4
5151

52-
# - id: args
53-
# uses: mikefarah/yq@master
54-
# with:
55-
# cmd: yq 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' 'ansible/vars.yml'
56-
57-
# - run: docker context create builders
58-
59-
# - uses: docker/setup-buildx-action@v3
60-
# with:
61-
# endpoint: builders
62-
63-
# - uses: docker/build-push-action@v5
64-
# with:
65-
# load: true
66-
# build-args: |
67-
# ${{ steps.args.outputs.result }}
68-
# target: extensions
69-
# tags: supabase/postgres:extensions
70-
# platforms: linux/${{ matrix.arch }}
71-
# cache-from: |
72-
# type=gha,scope=${{ github.ref_name }}-extensions
73-
# type=gha,scope=${{ github.base_ref }}-extensions
74-
# type=gha,scope=develop-extensions
75-
# cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-extensions
76-
77-
# - name: Extract built packages
78-
# run: |
79-
# mkdir -p /tmp/extensions ansible/files/extensions
80-
# docker save supabase/postgres:extensions | tar xv -C /tmp/extensions
81-
# for layer in /tmp/extensions/*/layer.tar; do
82-
# tar xvf "$layer" -C ansible/files/extensions --strip-components 1
83-
# done
84-
85-
# - id: version
86-
# run: echo "${{ steps.args.outputs.result }}" | grep "postgresql" >> "$GITHUB_OUTPUT"
87-
88-
# - name: Build Postgres deb
89-
# uses: docker/build-push-action@v5
90-
# with:
91-
# load: true
92-
# file: docker/Dockerfile
93-
# target: pg-deb
94-
# build-args: |
95-
# ubuntu_release=${{ matrix.ubuntu_release }}
96-
# ubuntu_release_no=${{ matrix.ubuntu_version }}
97-
# postgresql_major=${{ steps.version.outputs.postgresql_major }}
98-
# postgresql_release=${{ steps.version.outputs.postgresql_release }}
99-
# CPPFLAGS=-mcpu=${{ matrix.mcpu }}
100-
# tags: supabase/postgres:deb
101-
# platforms: linux/${{ matrix.arch }}
102-
# cache-from: |
103-
# type=gha,scope=${{ github.ref_name }}-deb
104-
# type=gha,scope=${{ github.base_ref }}-deb
105-
# type=gha,scope=develop-deb
106-
# cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-deb
107-
108-
# - name: Extract Postgres deb
109-
# run: |
110-
# mkdir -p /tmp/build ansible/files/postgres
111-
# docker save supabase/postgres:deb | tar xv -C /tmp/build
112-
# for layer in /tmp/build/*/layer.tar; do
113-
# tar xvf "$layer" -C ansible/files/postgres --strip-components 1
114-
# done
115-
116-
# # Packer doesn't support skipping registering the AMI for the ebssurrogate
117-
# # builder, so we register an AMI with a fixed name and run tests on an
118-
# # instance launched from that
119-
# # https://github.com/hashicorp/packer/issues/4899
120-
# - name: Build AMI
121-
# run: |
122-
# GIT_SHA=${{github.sha}}
123-
# packer build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common.vars.pkr.hcl" -var "ansible_arguments=" -var "postgres-version=ci-ami-test" -var "region=ap-southeast-1" -var 'ami_regions=["ap-southeast-1"]' -var "force-deregister=true" amazon-arm64.pkr.hcl
52+
- id: args
53+
uses: mikefarah/yq@master
54+
with:
55+
cmd: yq 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' 'ansible/vars.yml'
56+
57+
- run: docker context create builders
58+
59+
- uses: docker/setup-buildx-action@v3
60+
with:
61+
endpoint: builders
62+
63+
- uses: docker/build-push-action@v5
64+
with:
65+
load: true
66+
build-args: |
67+
${{ steps.args.outputs.result }}
68+
target: extensions
69+
tags: supabase/postgres:extensions
70+
platforms: linux/${{ matrix.arch }}
71+
cache-from: |
72+
type=gha,scope=${{ github.ref_name }}-extensions
73+
type=gha,scope=${{ github.base_ref }}-extensions
74+
type=gha,scope=develop-extensions
75+
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-extensions
76+
77+
- name: Extract built packages
78+
run: |
79+
mkdir -p /tmp/extensions ansible/files/extensions
80+
docker save supabase/postgres:extensions | tar xv -C /tmp/extensions
81+
for layer in /tmp/extensions/*/layer.tar; do
82+
tar xvf "$layer" -C ansible/files/extensions --strip-components 1
83+
done
84+
85+
- id: version
86+
run: echo "${{ steps.args.outputs.result }}" | grep "postgresql" >> "$GITHUB_OUTPUT"
87+
88+
- name: Build Postgres deb
89+
uses: docker/build-push-action@v5
90+
with:
91+
load: true
92+
file: docker/Dockerfile
93+
target: pg-deb
94+
build-args: |
95+
ubuntu_release=${{ matrix.ubuntu_release }}
96+
ubuntu_release_no=${{ matrix.ubuntu_version }}
97+
postgresql_major=${{ steps.version.outputs.postgresql_major }}
98+
postgresql_release=${{ steps.version.outputs.postgresql_release }}
99+
CPPFLAGS=-mcpu=${{ matrix.mcpu }}
100+
tags: supabase/postgres:deb
101+
platforms: linux/${{ matrix.arch }}
102+
cache-from: |
103+
type=gha,scope=${{ github.ref_name }}-deb
104+
type=gha,scope=${{ github.base_ref }}-deb
105+
type=gha,scope=develop-deb
106+
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-deb
107+
108+
- name: Extract Postgres deb
109+
run: |
110+
mkdir -p /tmp/build ansible/files/postgres
111+
docker save supabase/postgres:deb | tar xv -C /tmp/build
112+
for layer in /tmp/build/*/layer.tar; do
113+
tar xvf "$layer" -C ansible/files/postgres --strip-components 1
114+
done
115+
116+
# Packer doesn't support skipping registering the AMI for the ebssurrogate
117+
# builder, so we register an AMI with a fixed name and run tests on an
118+
# instance launched from that
119+
# https://github.com/hashicorp/packer/issues/4899
120+
- name: Build AMI
121+
run: |
122+
GIT_SHA=${{github.sha}}
123+
packer build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common.vars.pkr.hcl" -var "ansible_arguments=" -var "postgres-version=ci-ami-test" -var "region=ap-southeast-1" -var 'ami_regions=["ap-southeast-1"]' -var "force-deregister=true" amazon-arm64.pkr.hcl
124124
125125
- name: Run tests
126126
timeout-minutes: 5
@@ -134,7 +134,7 @@ jobs:
134134
run: |
135135
aws ec2 --region ap-southeast-1 describe-instances --filters "Name=tag:packerExecutionId,Values=${GITHUB_RUN_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -I {} aws ec2 terminate-instances --instance-ids {}
136136
137-
# - name: Cleanup resources on build cancellation
138-
# if: ${{ always() }}
139-
# run: |
140-
# aws ec2 --region ap-southeast-1 describe-instances --filters "Name=tag:testinfra-run-id,Values=${GITHUB_RUN_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -I {} aws ec2 terminate-instances --instance-ids {}
137+
- name: Cleanup resources on build cancellation
138+
if: ${{ always() }}
139+
run: |
140+
aws ec2 --region ap-southeast-1 describe-instances --filters "Name=tag:testinfra-run-id,Values=${GITHUB_RUN_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -I {} aws ec2 terminate-instances --instance-ids {}

0 commit comments

Comments
 (0)