Skip to content

Commit

Permalink
naming convention in app.py for CICD pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
dlpzx committed Sep 14, 2023
1 parent 4c3263c commit 2592122
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deploy/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging
import os
import subprocess
import re

import boto3
import botocore
Expand Down Expand Up @@ -33,7 +34,8 @@
# Configuration of the branch in subsequent deployments
git_branch = os.environ.get("DATAALL_REPO_BRANCH")

git_branch = git_branch if git_branch != "" else "main"

git_branch = re.sub('^[a-zA-Z0-9-_]+$', '', git_branch)[:12] if git_branch != "" else "main"

# Configuration of the cdk.json SSM or in Repository
try:
Expand Down

0 comments on commit 2592122

Please sign in to comment.