Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
8a75c3a
Merge 1e3a32b6c8cb450def833dbc8be4f3f4d74da22c into a46d1e1e592f8a3d7…
iam-veeramalla Feb 4, 2025
8093a15
[CI]: Update product catalog image tag
abhishekwebkul Feb 4, 2025
3e9af1d
Merge 8a6b1905fb985e2c4503eec30e9f6df4070bd78d into 8093a155ace6325dd…
iam-veeramalla Feb 4, 2025
d77f384
[CI]: Update product catalog image tag
abhishekwebkul Feb 4, 2025
dc6df2c
Merge 63979022f1ed5a2cfdbfad4f4885be66fb06cfe1 into d77f38496f8945131…
iam-veeramalla Feb 4, 2025
20c8999
[CI]: Update product catalog image tag
abhishekwebkul Feb 4, 2025
827f97b
Update docker-compose.yml
iam-veeramalla Feb 6, 2025
ed75688
Update docker-compose.yml
iam-veeramalla Feb 9, 2025
8d6bc9d
Create ingress.yaml
iam-veeramalla Feb 12, 2025
1db4238
Update docker-compose.yml
iam-veeramalla May 30, 2025
580600a
Update docker-compose.yml
iam-veeramalla May 30, 2025
7116c8e
Fix ENV command format in Dockerfile
nagenbiswal123 Aug 3, 2025
d73dc70
Merge pull request #188 from nagenbiswal123/main
iam-veeramalla Aug 11, 2025
35efab2
chore: verify github actions
Pr26an00 Sep 28, 2025
57d97a5
chore: verify github actions
Pr26an00 Sep 28, 2025
6cf9559
chore: verify github actions
Pr26an00 Sep 28, 2025
01c3643
chore: verify github actions
Pr26an00 Sep 28, 2025
abf353f
chore: verify github actions1
Pr26an00 Sep 28, 2025
22310b7
chore: verify github actions2
Pr26an00 Sep 28, 2025
4baec20
chore: verify github actions3
Pr26an00 Sep 28, 2025
4ed0006
chore: verify github actions4
Pr26an00 Sep 28, 2025
6372efe
chore: verify github actions5
Pr26an00 Sep 28, 2025
647e595
chore: changes in main.go
Pr26an00 Sep 29, 2025
6291c24
chore: small changes in ci file
Pr26an00 Sep 30, 2025
3d1f3d9
chore: small changes in ci file-1
Pr26an00 Sep 30, 2025
d0ecadd
chore: small changes in ci file-2
Pr26an00 Sep 30, 2025
1c08599
chore: small changes in ci file-3
Pr26an00 Sep 30, 2025
a3dd974
chore: small changes in ci file-4
Pr26an00 Sep 30, 2025
01fed9f
chore: small changes in ci file-5
Pr26an00 Sep 30, 2025
24ee7de
chore: small changes in ci file-6
Pr26an00 Sep 30, 2025
676b411
chore: small changes in ci file-7
Pr26an00 Sep 30, 2025
b206bfb
chore: small changes in ci file-8
Pr26an00 Sep 30, 2025
c0e2a94
chore: small changes in ci file-9
Pr26an00 Sep 30, 2025
278838c
chore: small changes in ci file-11
Pr26an00 Oct 2, 2025
554715b
chore: small change in ci file
Pr26an00 Oct 4, 2025
d3fdaa1
chore: small change in ci file-14
Pr26an00 Oct 4, 2025
055992d
chore: few changes in the main.go file -1
Pr26an00 Oct 4, 2025
a9b13b0
chore: few changes in the main.go file -2
Pr26an00 Oct 4, 2025
94f2096
chore: few changes in the main.go file -3
Pr26an00 Oct 4, 2025
f990d8d
chore: few changes in the main.go file -4
Pr26an00 Oct 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 95 additions & 102 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,108 +1,101 @@
# CI for Product Catalog Service

name: product-catalog-ci

on:
pull_request:
branches:
- main
on:
push:
branches:
- main
- githubcicheck # add more feature branches if needed
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: checkout code
uses: actions/checkout@v4

- name: Setup Go 1.22
uses: actions/setup-go@v2
with:
go-version: 1.22

- name: Build
run: |
cd src/product-catalog
go mod download
go build -o product-catalog-service main.go

- name: unit tests
run: |
cd src/product-catalog
go test ./...

code-quality:
runs-on: ubuntu-latest

steps:
- name: checkout code
uses: actions/checkout@v4

- name: Setup Go 1.22
uses: actions/setup-go@v2
with:
go-version: 1.22

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.55.2
run: golangci-lint run
working-directory: src/product-catalog

docker:
runs-on: ubuntu-latest

needs: build

steps:
- name: checkout code
uses: actions/checkout@v4

- name: Install Docker
uses: docker/setup-buildx-action@v1

- name: Login to Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Docker Push
uses: docker/build-push-action@v6
with:
context: src/product-catalog
file: src/product-catalog/Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/product-catalog:${{github.run_id}}


updatek8s:
runs-on: ubuntu-latest

needs: docker

steps:
- name: checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Update tag in kubernetes deployment manifest
run: |
sed -i "s|image: .*|image: ${{ secrets.DOCKER_USERNAME }}/product-catalog:${{github.run_id}}|" kubernetes/productcatalog/deploy.yaml

- name: Commit and push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "Abhishek Veeramalla"
git add kubernetes/productcatalog/deploy.yaml
git commit -m "[CI]: Update product catalog image tag"
git push origin HEAD:main -f



build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.21.x, 1.22.x, 1.23.x]

name: Go ${{ matrix.go-version }} CI

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Download dependencies
run: |
cd src/product-catalog
go mod download

- name: Build
run: |
cd src/product-catalog
go build -o product-catalog-service main.go

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.54.2
run:
go install github.com/golangci/golangci-lint/cmd/[email protected]
export PATH=$PATH:$(go env GOPATH)/bin
golangci-lint run
working-directory: src/product-catalog




- name: Run tests
run: |
cd src/product-catalog
go test -v ./...

docker:
runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Docker Build & Push
uses: docker/build-push-action@v6
with:
context: src/product-catalog
file: src/product-catalog/Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/product-catalog-service:${{ github.run_id }}

updatek8:
runs-on: ubuntu-latest
needs: docker

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Update tag in Kubernetes deployment manifest
run: |
sed -i 's|image: .*|image: '"${{ secrets.DOCKER_USERNAME }}"'/product-catalog-service:'"${{ github.run_id }}"'|' kubernetes/productcatalog/deploy.yaml

- name: Commit and push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "shahipranav"
git add kubernetes/productcatalog/deploy.yaml
git commit -m "[CI]: update product catalog image tag"
git push
Loading