Skip to content

Commit 87ea9a8

Browse files
committed
Update workflow for QA branch
1 parent 5552dab commit 87ea9a8

File tree

2 files changed

+57
-57
lines changed

2 files changed

+57
-57
lines changed

.github/workflows/build-image.yaml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
# name: Build Image User Service
1+
name: Build Image User Service
22

3-
# on:
4-
# workflow_call:
5-
# secrets:
6-
# DOCKER_HUB_ACCESS_TOKEN:
7-
# required: true
3+
on:
4+
workflow_call:
5+
secrets:
6+
DOCKER_HUB_ACCESS_TOKEN:
7+
required: true
88

9-
# jobs:
10-
# build-image:
11-
# name: Build and Push Docker Image
12-
# runs-on: ubuntu-latest
13-
# steps:
14-
# - name: Checkout code
15-
# uses: actions/checkout@v3
9+
jobs:
10+
build-image:
11+
name: Build and Push Docker Image
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
1616

17-
# - name: Setup JDK 17
18-
# uses: actions/setup-java@v3
19-
# with:
20-
# distribution: 'corretto'
21-
# java-version: 17
17+
- name: Setup JDK 17
18+
uses: actions/setup-java@v3
19+
with:
20+
distribution: 'corretto'
21+
java-version: 17
2222

23-
# - name: Login to Docker Hub
24-
# uses: docker/login-action@v2
25-
# with:
26-
# username: datuits
27-
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
23+
- name: Login to Docker Hub
24+
uses: docker/login-action@v2
25+
with:
26+
username: datuits
27+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
2828

29-
# - name: Build the application
30-
# run: |
31-
# mvn clean
32-
# mvn -B package --file pom.xml
29+
- name: Build the application
30+
run: |
31+
mvn clean
32+
mvn -B package --file pom.xml
3333
34-
# - name: Build and Push the docker image
35-
# run: |
36-
# docker build -t datuits/devops-user-service:latest .
37-
# docker push datuits/devops-user-service:latest
34+
- name: Build and Push the docker image
35+
run: |
36+
docker build -t datuits/devops-user-service:latest .
37+
docker push datuits/devops-user-service:latest

.github/workflows/main.yaml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
# name: Continuous Integration for Comment Service
1+
name: Continuous Integration for User Service
22

3-
# on:
4-
# push:
5-
# branches:
6-
# - main
3+
on:
4+
push:
5+
branches:
6+
- QA
77

8-
# jobs:
9-
# testing:
10-
# name: Testing Comment Service
11-
# runs-on: ubuntu-latest
12-
# steps:
8+
jobs:
9+
testing:
10+
name: Testing Comment Service
11+
runs-on: ubuntu-latest
12+
steps:
1313

14-
# - name: Checkout code
15-
# uses: actions/checkout@v3
14+
- name: Checkout code
15+
uses: actions/checkout@v3
1616

17-
# - name: Setup JDK 17
18-
# uses: actions/setup-java@v3
19-
# with:
20-
# distribution: 'corretto'
21-
# java-version: 17
17+
- name: Setup JDK 17
18+
uses: actions/setup-java@v3
19+
with:
20+
distribution: 'corretto'
21+
java-version: 17
2222

23-
# - name: Set up MongoDB URI
24-
# run: echo "SPRING_DATA_MONGODB_URI=mongodb://localhost:27017/user-service" >> $GITHUB_ENV
23+
- name: Set up MongoDB URI
24+
run: echo "SPRING_DATA_MONGODB_URI=mongodb://localhost:27017/user-service" >> $GITHUB_ENV
2525

26-
# - name: Unit Tests
27-
# run: mvn -B test --file pom.xml
26+
- name: Unit Tests
27+
run: mvn -B test --file pom.xml
2828

2929
# sonar-cloud-scan:
3030
# needs: testing
3131
# uses: ./.github/workflows/SonarQube.yaml
3232
# secrets:
3333
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3434

35-
# build-image:
36-
# needs: testing
37-
# uses: ./.github/workflows/build-image.yaml
38-
# secrets:
39-
# DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
35+
build-image:
36+
needs: testing
37+
uses: ./.github/workflows/build-image.yaml
38+
secrets:
39+
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
4040

4141
# scan-image:
4242
# needs: build-image

0 commit comments

Comments
 (0)