Skip to content

Commit 90bc701

Browse files
committed
testing
1 parent d414612 commit 90bc701

File tree

1 file changed

+74
-77
lines changed

1 file changed

+74
-77
lines changed

Diff for: .github/workflows/update_all_user_environments.yaml

+74-77
Original file line numberDiff line numberDiff line change
@@ -54,89 +54,86 @@ jobs:
5454
- name: Checkout repository
5555
uses: actions/checkout@v2
5656

57-
- name: Print branches output
58-
run: echo "${{ needs.get-all-demo-environments.outputs.branches }}"
59-
60-
6157
- name: Setup branch environment
6258
run: |
6359
echo "Updating branch ${{ matrix.branch }}"
6460
git fetch
6561
git checkout ${{ matrix.branch }}
6662
git merge origin/main --no-edit
67-
68-
- name: Get Namespace
69-
id: get-namespace
70-
run: |
71-
NAMESPACE="${{ matrix.branch }}#demoenv-"
72-
echo "NAMESPACE=${NAMESPACE}" >> $GITHUB_ENV
73-
74-
- name: Set up Python
75-
uses: actions/setup-python@v2
76-
with:
77-
python-version: "3.9"
78-
79-
- name: Install dependencies
80-
run: |
81-
python -m pip install --upgrade pip
82-
pip install -r ./.github/workflows/requirements.txt
83-
84-
- name: Get LD Env Vars for Demo Environment
85-
id: create_ld_project
86-
env:
87-
LD_API_KEY: ${{ secrets.LD_API_KEY }}
88-
NAMESPACE: ${{ env.DEMO_NAMESPACE }}
89-
run: |
90-
echo "Creating LaunchDarkly project for namespace: ${{ env.DEMO_NAMESPACE }}"
91-
python ./.github/workflows/create_ld_project.py
63+
git push origin ${{ matrix.branch }}
64+
65+
# - name: Get Namespace
66+
# id: get-namespace
67+
# run: |
68+
# NAMESPACE="${{ matrix.branch }}#demoenv-"
69+
# echo "NAMESPACE=${NAMESPACE}" >> $GITHUB_ENV
70+
71+
# - name: Set up Python
72+
# uses: actions/setup-python@v2
73+
# with:
74+
# python-version: "3.9"
75+
76+
# - name: Install dependencies
77+
# run: |
78+
# python -m pip install --upgrade pip
79+
# pip install -r ./.github/workflows/requirements.txt
80+
81+
# - name: Get LD Env Vars for Demo Environment
82+
# id: create_ld_project
83+
# env:
84+
# LD_API_KEY: ${{ secrets.LD_API_KEY }}
85+
# NAMESPACE: ${{ env.DEMO_NAMESPACE }}
86+
# run: |
87+
# echo "Creating LaunchDarkly project for namespace: ${{ env.DEMO_NAMESPACE }}"
88+
# python ./.github/workflows/create_ld_project.py
9289

93-
- name: Create .env file
94-
run: |
95-
touch ./.env.production
96-
echo NEXT_PUBLIC_LD_CLIENT_KEY=${{ env.LD_CLIENT_KEY }} >> ./.env.production
97-
echo LD_SDK_KEY=${{ env.LD_SDK_KEY }} >> ./.env.production
98-
echo DB_URL=${{ secrets.DB_URL }} >> ./.env.production
99-
echo LD_API_KEY=${{ secrets.LD_API_KEY }} >> ./.env.production
100-
echo DESTINATIONENV=${{ env.DEMO_NAMESPACE }} >> ./.env.production
101-
echo PROJECT_KEY=${{ env.DEMO_NAMESPACE }}-ld-demo >> ./.env.production
90+
# - name: Create .env file
91+
# run: |
92+
# touch ./.env.production
93+
# echo NEXT_PUBLIC_LD_CLIENT_KEY=${{ env.LD_CLIENT_KEY }} >> ./.env.production
94+
# echo LD_SDK_KEY=${{ env.LD_SDK_KEY }} >> ./.env.production
95+
# echo DB_URL=${{ secrets.DB_URL }} >> ./.env.production
96+
# echo LD_API_KEY=${{ secrets.LD_API_KEY }} >> ./.env.production
97+
# echo DESTINATIONENV=${{ env.DEMO_NAMESPACE }} >> ./.env.production
98+
# echo PROJECT_KEY=${{ env.DEMO_NAMESPACE }}-ld-demo >> ./.env.production
10299

103-
- name: Login to Amazon ECR
104-
id: login-ecr
105-
uses: aws-actions/amazon-ecr-login@v1
100+
# - name: Login to Amazon ECR
101+
# id: login-ecr
102+
# uses: aws-actions/amazon-ecr-login@v1
106103

107-
- name: Build, tag, and push image to Amazon ECR
108-
env:
109-
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
110-
ECR_REPOSITORY: ld-core-demo
111-
run: |
112-
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.DEMO_NAMESPACE }}-${{ github.run_id }} .
113-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.DEMO_NAMESPACE }}-${{ github.run_id }}
114-
115-
- name: Update K8s Deploy File
116-
run: python ./.github/workflows/update_k8s_deploy_file.py
117-
env:
118-
NAMESPACE: ${{ env.DEMO_NAMESPACE }}
119-
URL: ${{ env.DEMO_NAMESPACE }}.launchdarklydemos.com
120-
IMAGE: ${{ steps.login-ecr.outputs.registry }}/ld-core-demo:${{ env.DEMO_NAMESPACE }}-${{ github.run_id }}
121-
122-
- name: Check Namespace in Kubernetes
123-
uses: kodermax/kubectl-aws-eks@master
124-
with:
125-
args: get namespace ${{ env.DEMO_NAMESPACE }} &>/dev/null && echo "namespace_exists=true" >> $GITHUB_ENV || echo "namespace_exists=false" >> $GITHUB_ENV
126-
127-
- name: Create Namespace In Kubernetes
128-
if: env.namespace_exists == 'false'
129-
uses: kodermax/kubectl-aws-eks@master
130-
with:
131-
args: create namespace ${{ env.DEMO_NAMESPACE }}
132-
133-
- name: Applying deploy file to Kubernetes
134-
uses: kodermax/kubectl-aws-eks@master
135-
with:
136-
args: apply -f ./.github/workflows/deploy_files/deploy.yaml -n ${{ env.DEMO_NAMESPACE }}
137-
138-
- name: Delete the deploy file
139-
run: rm -rf ./.github/workflows/deploy_files
140-
141-
- name: Remove .env file
142-
run: rm ./.env.production
104+
# - name: Build, tag, and push image to Amazon ECR
105+
# env:
106+
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
107+
# ECR_REPOSITORY: ld-core-demo
108+
# run: |
109+
# docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.DEMO_NAMESPACE }}-${{ github.run_id }} .
110+
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.DEMO_NAMESPACE }}-${{ github.run_id }}
111+
112+
# - name: Update K8s Deploy File
113+
# run: python ./.github/workflows/update_k8s_deploy_file.py
114+
# env:
115+
# NAMESPACE: ${{ env.DEMO_NAMESPACE }}
116+
# URL: ${{ env.DEMO_NAMESPACE }}.launchdarklydemos.com
117+
# IMAGE: ${{ steps.login-ecr.outputs.registry }}/ld-core-demo:${{ env.DEMO_NAMESPACE }}-${{ github.run_id }}
118+
119+
# - name: Check Namespace in Kubernetes
120+
# uses: kodermax/kubectl-aws-eks@master
121+
# with:
122+
# args: get namespace ${{ env.DEMO_NAMESPACE }} &>/dev/null && echo "namespace_exists=true" >> $GITHUB_ENV || echo "namespace_exists=false" >> $GITHUB_ENV
123+
124+
# - name: Create Namespace In Kubernetes
125+
# if: env.namespace_exists == 'false'
126+
# uses: kodermax/kubectl-aws-eks@master
127+
# with:
128+
# args: create namespace ${{ env.DEMO_NAMESPACE }}
129+
130+
# - name: Applying deploy file to Kubernetes
131+
# uses: kodermax/kubectl-aws-eks@master
132+
# with:
133+
# args: apply -f ./.github/workflows/deploy_files/deploy.yaml -n ${{ env.DEMO_NAMESPACE }}
134+
135+
# - name: Delete the deploy file
136+
# run: rm -rf ./.github/workflows/deploy_files
137+
138+
# - name: Remove .env file
139+
# run: rm ./.env.production

0 commit comments

Comments
 (0)