From e41dee662f507d3d21b1d4fcf4d46fb39e46a145 Mon Sep 17 00:00:00 2001 From: Oleksandr Varchenko Date: Mon, 5 Feb 2024 10:58:53 +0200 Subject: [PATCH 01/11] Add env to ci --- .github/workflows/actions.yaml | 3 ++- .github/workflows/tag.yaml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index a1e8211..107af09 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -1,7 +1,7 @@ on: push: branches: - - 'master' + - 'add-env' jobs: converge: @@ -30,6 +30,7 @@ jobs: - name: Run Build run: | . $(werf ci-env github --as-file) + echo "${{ secrets.STAGE_ENV }}" > .env werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA stage-deploy: diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml index 5578b2e..88bd4b2 100644 --- a/.github/workflows/tag.yaml +++ b/.github/workflows/tag.yaml @@ -30,6 +30,7 @@ jobs: - name: Run Build run: | . $(werf ci-env github --as-file) + echo "${{ secrets.PROD_ENV }}" > .env werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME --dev # prod-deploy: # name: Deploy on prod From d91808e8e5f45b3a3ec06dc91c159d7cebe72cd8 Mon Sep 17 00:00:00 2001 From: Oleksandr Varchenko Date: Mon, 5 Feb 2024 10:59:58 +0200 Subject: [PATCH 02/11] Update ci --- .github/workflows/actions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index 107af09..4a306ce 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -31,7 +31,7 @@ jobs: run: | . $(werf ci-env github --as-file) echo "${{ secrets.STAGE_ENV }}" > .env - werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA + werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA --dev stage-deploy: name: Deploy on stage From 92a28adb576605e9abe50ed6bfad3453f2a56dd1 Mon Sep 17 00:00:00 2001 From: Oleksandr Varchenko <88536216+alexvarko@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:21:32 +0200 Subject: [PATCH 03/11] Update werf.yaml --- werf.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/werf.yaml b/werf.yaml index 93ef2fb..76e4a4a 100644 --- a/werf.yaml +++ b/werf.yaml @@ -28,6 +28,8 @@ from: nginx:alpine git: - add: /nginx.conf to: /etc/nginx/nginx.conf + - add: /.env + to: /usr/share/nginx/html import: - image: builder add: /app/build From 16231eced05f0a2f6332a491a96fcac79b6d21da Mon Sep 17 00:00:00 2001 From: Oleksandr Varchenko <88536216+alexvarko@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:33:20 +0200 Subject: [PATCH 04/11] Update werf.yaml --- werf.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/werf.yaml b/werf.yaml index 76e4a4a..c6b3e57 100644 --- a/werf.yaml +++ b/werf.yaml @@ -29,7 +29,7 @@ git: - add: /nginx.conf to: /etc/nginx/nginx.conf - add: /.env - to: /usr/share/nginx/html + to: /usr/share/nginx/html/.env import: - image: builder add: /app/build From 4fab2d6c564fb8558b3dc1d8ebdd6dd595aac64b Mon Sep 17 00:00:00 2001 From: Oleksandr Varchenko <88536216+alexvarko@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:45:47 +0200 Subject: [PATCH 05/11] Update actions.yaml --- .github/workflows/actions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index 4a306ce..09e5f5e 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -1,7 +1,7 @@ on: push: branches: - - 'add-env' + - 'master' jobs: converge: From 90a238a55c36df8a3d6febd33b838d0e0613923c Mon Sep 17 00:00:00 2001 From: Oleksandr Varchenko Date: Mon, 5 Feb 2024 17:25:17 +0200 Subject: [PATCH 06/11] Update ci --- .github/workflows/actions.yaml | 2 +- werf.yaml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index 09e5f5e..32eb2fb 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -30,7 +30,7 @@ jobs: - name: Run Build run: | . $(werf ci-env github --as-file) - echo "${{ secrets.STAGE_ENV }}" > .env + echo "${{ secrets.STAGE_ENV }}" > .env.deploy werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA --dev stage-deploy: diff --git a/werf.yaml b/werf.yaml index c6b3e57..a420294 100644 --- a/werf.yaml +++ b/werf.yaml @@ -17,6 +17,7 @@ shell: - cd /app #- yarn autoclean --init #- yarn autoclean --force + - mv .env.deploy .env - npm install setup: # Для стадии Setup. - cd /app @@ -28,8 +29,6 @@ from: nginx:alpine git: - add: /nginx.conf to: /etc/nginx/nginx.conf - - add: /.env - to: /usr/share/nginx/html/.env import: - image: builder add: /app/build From ce905a73a337ed952823c3aab9d92dbab1eb73dc Mon Sep 17 00:00:00 2001 From: Oleksandr Varchenko <88536216+alexvarko@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:25:49 +0200 Subject: [PATCH 07/11] Update actions.yaml --- .github/workflows/actions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index 32eb2fb..4e88340 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -1,7 +1,7 @@ on: push: branches: - - 'master' + - 'add-env' jobs: converge: From d79bf602de3e3f7dbff1bd188815ac985db63c7b Mon Sep 17 00:00:00 2001 From: Oleksandr Varchenko <88536216+alexvarko@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:26:50 +0200 Subject: [PATCH 08/11] Update werf.yaml --- werf.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/werf.yaml b/werf.yaml index a420294..17d4e27 100644 --- a/werf.yaml +++ b/werf.yaml @@ -18,6 +18,7 @@ shell: #- yarn autoclean --init #- yarn autoclean --force - mv .env.deploy .env + - ls -la - npm install setup: # Для стадии Setup. - cd /app From 54037e1a42afae88413b5e65b0cc04782ce2fa78 Mon Sep 17 00:00:00 2001 From: Oleksandr Varchenko <88536216+alexvarko@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:34:55 +0200 Subject: [PATCH 09/11] Update actions.yaml --- .github/workflows/actions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index 4e88340..3665080 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -1,7 +1,7 @@ on: push: branches: - - 'add-env' + - 'test-env' jobs: converge: From 4e6d7286b3fc5129747884536d296be2e5a194f5 Mon Sep 17 00:00:00 2001 From: Oleksandr Varchenko <88536216+alexvarko@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:44:12 +0200 Subject: [PATCH 10/11] Update actions.yaml --- .github/workflows/actions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index 3665080..32eb2fb 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -1,7 +1,7 @@ on: push: branches: - - 'test-env' + - 'master' jobs: converge: From ccf58e851362f98fb150d6d9a3281f972af04999 Mon Sep 17 00:00:00 2001 From: Oleksandr Varchenko <88536216+alexvarko@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:44:34 +0200 Subject: [PATCH 11/11] Update werf.yaml --- werf.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/werf.yaml b/werf.yaml index 17d4e27..a420294 100644 --- a/werf.yaml +++ b/werf.yaml @@ -18,7 +18,6 @@ shell: #- yarn autoclean --init #- yarn autoclean --force - mv .env.deploy .env - - ls -la - npm install setup: # Для стадии Setup. - cd /app