mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-10 22:29:00 +08:00
ci: inject local images to k3d instead of publishing them (#600)
This commit is contained in:
parent
9808c03d6d
commit
53045fc58e
74
.github/workflows/e2e-k3s.yaml
vendored
74
.github/workflows/e2e-k3s.yaml
vendored
@ -9,83 +9,33 @@ on:
|
||||
|
||||
jobs:
|
||||
|
||||
image-build-and-push-query-service:
|
||||
e2e-k3s:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.label.name == 'ok-to-test' }}
|
||||
env:
|
||||
DOCKER_TAG: pull-${{ github.event.number }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
version: latest
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push docker image
|
||||
env:
|
||||
DOCKER_TAG: pull-${{ github.event.number }}
|
||||
run: make build-push-query-service
|
||||
|
||||
image-build-and-push-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.label.name == 'ok-to-test' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
working-directory: frontend
|
||||
run: yarn install
|
||||
- name: Run Prettier
|
||||
working-directory: frontend
|
||||
run: npm run prettify
|
||||
continue-on-error: true
|
||||
- name: Run ESLint
|
||||
working-directory: frontend
|
||||
run: npm run lint
|
||||
continue-on-error: true
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
version: latest
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push docker image
|
||||
env:
|
||||
DOCKER_TAG: pull-${{ github.event.number }}
|
||||
run: make build-push-frontend
|
||||
|
||||
deploy-on-k3s-cluster:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.label.name == 'ok-to-test' }}
|
||||
needs:
|
||||
- image-build-and-push-query-service
|
||||
- image-build-and-push-frontend
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build query-service image
|
||||
run: make build-query-service-amd64
|
||||
- name: Build frontend image
|
||||
run: make build-frontend-amd64
|
||||
- name: Create a k3s cluster
|
||||
uses: AbsaOSS/k3d-action@v2
|
||||
with:
|
||||
cluster-name: "test-cluster"
|
||||
cluster-name: "signoz-cluster"
|
||||
- name: Inject the images to the cluster
|
||||
run: k3d image import signoz/query-service:$DOCKER_TAG signoz/frontend:$DOCKER_TAG -c signoz-cluster
|
||||
- name: Deploy the app
|
||||
env:
|
||||
TAG: pull-${{ github.event.number }}
|
||||
run: |
|
||||
helm dependency update deploy/kubernetes/platform
|
||||
helm install signoz deploy/kubernetes/platform/ -n platform --create-namespace \
|
||||
--wait --timeout 10m0s \
|
||||
--set cloud=null \
|
||||
--set frontend.service.type=LoadBalancer \
|
||||
--set frontend.image.tag=$TAG \
|
||||
--set query-service.image.tag=$TAG
|
||||
--set query-service.image.tag=$DOCKER_TAG \
|
||||
--set frontend.image.tag=$DOCKER_TAG
|
||||
kubectl describe deploy/signoz-frontend -n platform | grep Image
|
||||
kubectl describe statefulset/signoz-query-service -n platform | grep Image
|
||||
kubectl get pods -n platform
|
||||
|
Loading…
x
Reference in New Issue
Block a user