Skip to content

Commit

Permalink
Update Github Action to add S3 add-on to review-apps (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Mar 24, 2022
1 parent a7a8b80 commit 8b7ebd4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/review-app-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ env:
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}
REVIEW_APPS_ORGANIZATION_NAME: ${{ secrets.CLEVER_REVIEW_APPS_ORG }}
CONFIGURATION_ADDON: ${{ secrets.CLEVER_REVIEW_APPS_CONFIGURATION_ADDON }}
# S3_ADDON: ${{ secrets.CLEVER_REVIEW_APPS_S3_ADDON }}
S3_ADDON: ${{ secrets.CLEVER_REVIEW_APPS_S3_ADDON }}
BRANCH: ${{ github.head_ref }}
PYTHON_VERSION: 3.9

jobs:
create:
Expand Down Expand Up @@ -59,6 +60,9 @@ jobs:
# --region: server location ("par" means Paris).
# --alias: custom application name, used to find it with the CLI.
$CLEVER_CLI create $REVIEW_APP_NAME -t python --org $REVIEW_APPS_ORGANIZATION_NAME --region par --alias $REVIEW_APP_NAME
# Force Python version through env, because its default is not accurate and environment variables
# have precedence over configuration addons
$CLEVER_CLI env set CC_PYTHON_VERSION ${{ env.PYTHON_VERSION }} --alias $REVIEW_APP_NAME
$CLEVER_CLI domain add $DEPLOY_URL --alias $REVIEW_APP_NAME
$CLEVER_CLI link $REVIEW_APP_NAME --org $REVIEW_APPS_ORGANIZATION_NAME
Expand All @@ -67,10 +71,10 @@ jobs:
$CLEVER_CLI addon create postgresql-addon $REVIEW_APP_DB_NAME --org $REVIEW_APPS_ORGANIZATION_NAME --plan xxs_sml --yes
$CLEVER_CLI service link-addon $REVIEW_APP_DB_NAME
# - name: 🤝 Link S3 addon
# run: |
# $CLEVER_CLI link $REVIEW_APP_NAME --org $REVIEW_APPS_ORGANIZATION_NAME
# $CLEVER_CLI service link-addon $S3_ADDON
- name: 🤝 Link S3 addon
run: |
$CLEVER_CLI link $REVIEW_APP_NAME --org $REVIEW_APPS_ORGANIZATION_NAME
$CLEVER_CLI service link-addon $S3_ADDON
- name: 🗺 Add environment variables to the review app
run: |
Expand Down
1 change: 0 additions & 1 deletion clevercloud/pre_build_hook.sh

This file was deleted.

2 changes: 1 addition & 1 deletion lemarche/api/networks/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class NetworkViewSet(mixins.ListModelMixin, viewsets.GenericViewSet):
queryset = Network.objects.all()
serializer_class = NetworkSerializer

@extend_schema(summary="Lister tous les réseaux", tags=[Network._meta.verbose_name])
@extend_schema(summary="Lister tous les réseaux", tags=[Network._meta.verbose_name_plural])
def list(self, request, *args, **kwargs):
return super().list(request, args, kwargs)

0 comments on commit 8b7ebd4

Please sign in to comment.