Skip to content

Commit fdb8cd6

Browse files
committed
Merge pull request #55 from iNFJZ/fix/jenkinsfile
Enhance Jenkinsfile for improved Docker management: Added pre-cleanup…
2 parents 38f5f23 + 89cd0ce commit fdb8cd6

File tree

11 files changed

+245
-69
lines changed

11 files changed

+245
-69
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ updates:
99
time: "09:00"
1010
open-pull-requests-limit: 10
1111
reviewers:
12-
- "your-username"
12+
- "iNFJZ"
1313
assignees:
14-
- "your-username"
14+
- "iNFJZ"
1515
commit-message:
1616
prefix: "deps"
1717
include: "scope"
@@ -25,9 +25,9 @@ updates:
2525
time: "09:00"
2626
open-pull-requests-limit: 5
2727
reviewers:
28-
- "your-username"
28+
- "iNFJZ"
2929
assignees:
30-
- "your-username"
30+
- "iNFJZ"
3131
commit-message:
3232
prefix: "deps"
3333
include: "scope"
@@ -41,9 +41,9 @@ updates:
4141
time: "09:00"
4242
open-pull-requests-limit: 5
4343
reviewers:
44-
- "your-username"
44+
- "iNFJZ"
4545
assignees:
46-
- "your-username"
46+
- "iNFJZ"
4747
commit-message:
4848
prefix: "ci"
4949
include: "scope"

.github/workflows/cd-production.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
echo "Deploying to production environment..."
4545
4646
# Pull the latest image
47-
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main
47+
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:master
4848
4949
# Create production docker-compose file
5050
cat > docker-compose.production.yml << 'EOF'
@@ -105,7 +105,7 @@ jobs:
105105
- microservice-network-production
106106
107107
auth-service:
108-
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main
108+
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:master
109109
container_name: auth-service-production
110110
working_dir: /app/AuthService
111111
ports:
@@ -123,7 +123,7 @@ jobs:
123123
restart: always
124124
125125
file-service:
126-
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main
126+
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:master
127127
container_name: file-service-production
128128
working_dir: /app/FileService
129129
ports:
@@ -149,7 +149,7 @@ jobs:
149149
restart: always
150150
151151
gateway-api:
152-
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main
152+
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:master
153153
container_name: gateway-api-production
154154
working_dir: /app/GatewayApi
155155
ports:
@@ -165,7 +165,7 @@ jobs:
165165
restart: always
166166
167167
worker-service:
168-
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main
168+
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:master
169169
container_name: worker-service-production
170170
working_dir: /app/WorkerService
171171
command: dotnet WorkerService.dll

.github/workflows/ci-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
build-docker-images:
113113
runs-on: ubuntu-latest
114114
needs: [build-and-test, security-scan]
115-
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')
115+
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
116116

117117
steps:
118118
- name: Checkout code

.github/workflows/notify.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
- name: Notify Slack/Discord
1515
if: always()
1616
run: |
17-
# Thay thế YOUR_WEBHOOK_URL bằng webhook URL thực tế
1817
WEBHOOK_URL="${{ secrets.NOTIFICATION_WEBHOOK_URL }}"
1918
2019
if [ -n "$WEBHOOK_URL" ]; then

.github/workflows/rollback.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
id: get-tags
4343
run: |
4444
# Get available tags from registry
45-
TAGS=$(docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/your-username/your-repo:latest 2>/dev/null || echo "")
45+
TAGS=$(docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest 2>/dev/null || echo "")
4646
echo "available_tags=$TAGS" >> $GITHUB_OUTPUT
4747
4848
- name: Determine rollback version
@@ -82,7 +82,7 @@ jobs:
8282
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.rollback-version.outputs.version }}
8383
8484
# Update docker-compose file to use the specific version
85-
sed -i "s/image: ${{ env.REGISTRY }}\/${{ env.IMAGE_NAME }}:main/image: ${{ env.REGISTRY }}\/${{ env.IMAGE_NAME }}:${{ steps.rollback-version.outputs.version }}/g" docker-compose.production.yml
85+
sed -i "s/image: ${{ env.REGISTRY }}\/${{ env.IMAGE_NAME }}:master/image: ${{ env.REGISTRY }}\/${{ env.IMAGE_NAME }}:${{ steps.rollback-version.outputs.version }}/g" docker-compose.production.yml
8686
8787
# Restart services
8888
docker-compose -f docker-compose.production.yml down

Frontend/html/admin/files/files.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@
356356
>
357357
<small
358358
class="text-muted user-role"
359-
data-i18n="loading"
360-
>Loading...</small
359+
data-i18n="admin"
360+
>Admin</small
361361
>
362362
</div>
363363
</div>

Frontend/html/admin/files/upload-file.html

Lines changed: 92 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,25 +134,108 @@
134134
<!--/ Language -->
135135
<!-- User -->
136136
<li class="nav-item navbar-dropdown dropdown-user dropdown">
137-
<a class="nav-link dropdown-toggle hide-arrow" href="javascript:void(0);" data-bs-toggle="dropdown">
137+
<a
138+
class="nav-link dropdown-toggle hide-arrow"
139+
href="javascript:void(0);"
140+
data-bs-toggle="dropdown"
141+
>
138142
<div class="d-flex">
139143
<div class="flex-shrink-0 me-3">
140144
<div class="avatar avatar-online">
141-
<img alt="User Avatar" class="w-px-40 h-auto rounded-circle user-avatar" />
145+
<img
146+
class="w-px-40 h-auto rounded-circle user-avatar"
147+
/>
142148
</div>
143149
</div>
144150
<div class="flex-grow-1">
145-
<span class="fw-semibold d-block user-name" data-i18n="loading">Loading...</span>
146-
<small class="text-muted user-role" data-i18n="admin">Admin</small>
151+
<span
152+
class="fw-semibold d-block user-name"
153+
data-i18n="loading"
154+
>Loading...</span
155+
>
156+
<small class="text-muted user-role" data-i18n="admin"
157+
>Admin</small
158+
>
147159
</div>
148160
</div>
149161
</a>
150162
<ul class="dropdown-menu dropdown-menu-end">
151-
<li><a class="dropdown-item" href="/admin/profile/my-profile.html"><i class="ti ti-user-check me-2 ti-sm"></i><span class="align-middle" data-i18n="myProfile">My Profile</span></a></li>
152-
<li><a class="dropdown-item" href="/admin/profile/security.html"><i class="ti ti-lock me-2 ti-sm"></i><span class="align-middle" data-i18n="security">Security</span></a></li>
153-
<li><a class="dropdown-item" href="/admin/profile/notifications.html"><i class="ti ti-settings me-2 ti-sm"></i><span class="align-middle" data-i18n="settings">Settings</span></a></li>
154-
<li><div class="dropdown-divider"></div></li>
155-
<li><a class="dropdown-item" href="javascript:void(0);" id="logout-btn-dropdown"><i class="ti ti-logout me-2 ti-sm"></i><span class="align-middle" data-i18n="logOut">Log Out</span></a></li>
163+
<li>
164+
<a
165+
class="dropdown-item"
166+
href="/admin/profile/my-profile.html"
167+
>
168+
<div class="d-flex">
169+
<div class="flex-shrink-0 me-3">
170+
<div class="avatar avatar-online">
171+
<img
172+
class="w-px-40 h-auto rounded-circle user-avatar"
173+
/>
174+
</div>
175+
</div>
176+
<div class="flex-grow-1">
177+
<span
178+
class="fw-semibold d-block user-name"
179+
data-i18n="loading"
180+
>Loading...</span
181+
>
182+
<small
183+
class="text-muted user-role"
184+
data-i18n="admin"
185+
>Admin</small
186+
>
187+
</div>
188+
</div>
189+
</a>
190+
</li>
191+
<li>
192+
<div class="dropdown-divider"></div>
193+
</li>
194+
<li>
195+
<a
196+
class="dropdown-item"
197+
href="/admin/profile/my-profile.html"
198+
>
199+
<i class="ti ti-user-check me-2 ti-sm"></i>
200+
<span class="align-middle" data-i18n="myProfile"
201+
>My Profile</span
202+
>
203+
</a>
204+
</li>
205+
<li>
206+
<a
207+
class="dropdown-item"
208+
href="/admin/profile/security.html"
209+
>
210+
<i class="ti ti-lock me-2 ti-sm"></i>
211+
<span class="align-middle" data-i18n="security"
212+
>Security</span
213+
>
214+
</a>
215+
</li>
216+
<li>
217+
<a
218+
class="dropdown-item"
219+
href="/admin/profile/notifications.html"
220+
>
221+
<i class="ti ti-settings me-2 ti-sm"></i>
222+
<span class="align-middle" data-i18n="settings"
223+
>Settings</span
224+
>
225+
</a>
226+
</li>
227+
<li>
228+
<a
229+
class="dropdown-item"
230+
href="javascript:void(0);"
231+
id="logout-btn-dropdown"
232+
>
233+
<i class="ti ti-logout me-2 ti-sm"></i>
234+
<span class="align-middle" data-i18n="logOut"
235+
>Log Out</span
236+
>
237+
</a>
238+
</li>
156239
</ul>
157240
</li>
158241
<!--/ User -->

Frontend/html/admin/profile/my-profile.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
</div>
274274
<div class="flex-grow-1">
275275
<span class="fw-semibold d-block user-name" data-i18n="loading">Loading...</span>
276-
<small class="text-muted user-role" data-i18n="loading">Loading...</small>
276+
<small class="text-muted user-role" data-i18n="admin">Admin</small>
277277
</div>
278278
</div>
279279
</a>

Frontend/html/admin/users/active-users.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
</div>
227227
<div class="flex-grow-1">
228228
<span class="fw-semibold d-block user-name" data-i18n="loading">Loading...</span>
229-
<small class="text-muted user-role" data-i18n="loading">Loading...</small>
229+
<small class="text-muted user-role" data-i18n="admin">Admin</small>
230230
</div>
231231
</div>
232232
</a>

0 commit comments

Comments
 (0)