Updated Github Actions Workflows for 3.x.x Chaos Center (#4063)
* Added changes for push & release gh-actions Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added changes for push & release gh-actions Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added changes for push & release gh-actions Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added changes for push & release gh-actions Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added changes for push & release gh-actions Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added changes for push & release gh-actions Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added changes for running lint checks Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added changes for FE 3.x.x Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added changes for FE 3.x.x Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added changes for FE 3.x.x Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added changes for FE 3.x.x Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added build checks for 3.x.x Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * removed dependency on backend unit tests Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * fixed go imports Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added minor changes Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added minor changes Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added gh-actions for event-tracker Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added gh-actions for event-tracker Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added gh-actions for event-tracker Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> * Added gh-actions for event-tracker Signed-off-by: Jonsy13 <vedant.shrotria@harness.io> --------- Signed-off-by: Jonsy13 <vedant.shrotria@harness.io>
This commit is contained in:
parent
12a0538f47
commit
aae38cd073
|
@ -16,11 +16,10 @@ jobs:
|
|||
frontend: ${{ steps.filter.outputs.frontend }}
|
||||
graphql-server: ${{ steps.filter.outputs.graphql-server }}
|
||||
authentication: ${{ steps.filter.outputs.authentication }}
|
||||
event-tracker: ${{ steps.filter.outputs.event-tracker }}
|
||||
upgrade-agent-cp: ${{ steps.filter.outputs.upgrade-agent-cp }}
|
||||
subscriber: ${{ steps.filter.outputs.subscriber }}
|
||||
litmus-demo: ${{ steps.filter.outputs.litmus-demo }}
|
||||
dex-server: ${{ steps.filter.outputs.dex-server }}
|
||||
event-tracker: ${{ steps.filter.outputs.event-tracker }}
|
||||
# upgrade-agent-cp: ${{ steps.filter.outputs.upgrade-agent-cp }}
|
||||
# dex-server: ${{ steps.filter.outputs.dex-server }}
|
||||
steps:
|
||||
# For pull requests it's not necessary to checkout the code
|
||||
- uses: dorny/paths-filter@v2
|
||||
|
@ -28,40 +27,41 @@ jobs:
|
|||
with:
|
||||
filters: |
|
||||
frontend:
|
||||
- 'litmus-portal/frontend/**'
|
||||
- 'chaoscenter/web/**'
|
||||
graphql-server:
|
||||
- 'litmus-portal/graphql-server/**'
|
||||
- 'chaoscenter/graphql/server/**'
|
||||
authentication:
|
||||
- 'litmus-portal/authentication/**'
|
||||
event-tracker:
|
||||
- 'litmus-portal/cluster-agents/event-tracker/**'
|
||||
upgrade-agent-cp:
|
||||
- 'litmus-portal/upgrade-agents/control-plane/**'
|
||||
- 'chaoscenter/authentication/**'
|
||||
subscriber:
|
||||
- 'litmus-portal/cluster-agents/subscriber/**'
|
||||
litmus-demo:
|
||||
- 'demo/1.x/**'
|
||||
dex-server:
|
||||
- 'litmus-portal/dex-server/**'
|
||||
- 'chaoscenter/subscriber/**'
|
||||
event-tracker:
|
||||
- 'chaoscenter/event-tracker/**'
|
||||
# upgrade-agent-cp:
|
||||
# - 'chaoscenter/upgrade-agents/control-plane/**'
|
||||
# dex-server:
|
||||
# - 'chaoscenter/dex-server/**'
|
||||
|
||||
backend-checks:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.graphql-server == 'true' || needs.changes.outputs.dex-server == 'true' || needs.changes.outputs.upgrade-agent-cp == 'true' || needs.changes.outputs.authentication == 'true' || needs.changes.outputs.event-tracker == 'true' || needs.changes.outputs.subscriber == 'true'
|
||||
if: needs.changes.outputs.graphql-server == 'true' || needs.changes.outputs.authentication == 'true' || needs.changes.outputs.subscriber == 'true' || needs.changes.outputs.event-tracker == 'true'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "1.16" # By default, the go version is v1.15 in runner.
|
||||
go-version: "1.20" # By default, the go version is v1.15 in runner.
|
||||
|
||||
- name: Check Golang imports order
|
||||
uses: Jerome1337/goimports-action@v1.0.3
|
||||
with:
|
||||
goimports-path: ./litmus-portal
|
||||
goimports-path: ./chaoscenter
|
||||
|
||||
- name: Backend checks
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal
|
||||
cd chaoscenter
|
||||
make backend-services-checks
|
||||
|
||||
frontend-checks:
|
||||
|
@ -71,46 +71,49 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.14.2
|
||||
node-version: 16
|
||||
|
||||
- name: Frontend checks
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal
|
||||
cd chaoscenter
|
||||
make frontend-services-checks
|
||||
|
||||
backend-unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- changes
|
||||
- backend-checks
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "1.16" # By default, the go version is v1.15 in runner.
|
||||
- name: Backend unit tests
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal
|
||||
make unit-tests
|
||||
# backend-unit-tests:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs:
|
||||
# - changes
|
||||
# - backend-checks
|
||||
# steps:
|
||||
# - name: Checkout repository
|
||||
# uses: actions/checkout@v2
|
||||
# - uses: actions/setup-go@v2
|
||||
# with:
|
||||
# go-version: "1.20" # By default, the go version is v1.15 in runner.
|
||||
# - name: Backend unit tests
|
||||
# shell: bash
|
||||
# run: |
|
||||
# cd chaoscenter
|
||||
# make unit-tests
|
||||
|
||||
docker-build-graphql-server:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
# - backend-unit-tests
|
||||
if: ${{ needs.changes.outputs.graphql-server == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build graphql server docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/graphql-server
|
||||
cd chaoscenter/graphql/server
|
||||
docker build . -f Dockerfile -t docker.io/litmuschaos/litmusportal-server:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
|
||||
- name: Run Trivy vulnerability scanner
|
||||
|
@ -128,22 +131,24 @@ jobs:
|
|||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
# - backend-unit-tests
|
||||
if: ${{ needs.changes.outputs.authentication == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build auth server docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/authentication
|
||||
cd chaoscenter/authentication
|
||||
docker build . -f Dockerfile -t docker.io/litmuschaos/litmusportal-auth-server:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/litmuschaos/litmusportal-auth-server:${{ github.sha }}'
|
||||
format: 'table'
|
||||
exit-code: '1'
|
||||
exit-code: '0'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
@ -153,16 +158,18 @@ jobs:
|
|||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
# - backend-unit-tests
|
||||
if: ${{ needs.changes.outputs.subscriber == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build subscriber docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/cluster-agents/subscriber
|
||||
cd chaoscenter/subscriber
|
||||
docker build . -f Dockerfile -t docker.io/litmuschaos/litmusportal-subscriber:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
|
@ -173,56 +180,6 @@ jobs:
|
|||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
docker-build-event-tracker:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
if: ${{ needs.changes.outputs.event-tracker == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build event tracker docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/cluster-agents/event-tracker
|
||||
docker build . -f Dockerfile -t docker.io/litmuschaos/litmusportal-event-tracker:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/litmuschaos/litmusportal-event-tracker:${{ github.sha }}'
|
||||
format: 'table'
|
||||
exit-code: '1'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
docker-build-upgrade-agent-cp:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
if: ${{ needs.changes.outputs.upgrade-agent-cp == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build control plane upgrade agent docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/upgrade-agents/control-plane
|
||||
docker build . -f Dockerfile -t docker.io/litmuschaos/upgrade-agent-cp:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/litmuschaos/upgrade-agent-cp:${{ github.sha }}'
|
||||
format: 'table'
|
||||
exit-code: '1'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
docker-build-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
|
@ -232,24 +189,91 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build frontend docker image
|
||||
|
||||
- name: yarn build check
|
||||
run: |
|
||||
cd chaoscenter/web && yarn && yarn build
|
||||
|
||||
- name: web docker build check
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/frontend
|
||||
docker build . -f Dockerfile --build-arg TARGETARCH=amd64
|
||||
cd chaoscenter/web
|
||||
docker build . -f Dockerfile --build-arg TARGETARCH=amd64 -t docker.io/litmuschaos/litmusportal-frontend:${{ github.sha }}
|
||||
|
||||
docker-build-dex-server:
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/litmuschaos/litmusportal-frontend:${{ github.sha }}'
|
||||
format: 'table'
|
||||
exit-code: '1'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
docker-build-event-tracker:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
if: needs.changes.outputs.dex-server == 'true'
|
||||
# - backend-unit-tests
|
||||
if: ${{ needs.changes.outputs.event-tracker == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build dex-server docker image
|
||||
|
||||
- name: Build event tracker docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/dex-server
|
||||
docker images && docker build . -f Dockerfile --build-arg TARGETARCH=amd64
|
||||
cd chaoscenter/event-tracker
|
||||
docker build . -f Dockerfile -t docker.io/litmuschaos/litmusportal-event-tracker:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/litmuschaos/litmusportal-event-tracker:${{ github.sha }}'
|
||||
format: 'table'
|
||||
exit-code: '0'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
# docker-build-upgrade-agent-cp:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs:
|
||||
# - backend-checks
|
||||
# - changes
|
||||
# - backend-unit-tests
|
||||
# if: ${{ needs.changes.outputs.upgrade-agent-cp == 'true' }}
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
# - name: Build control plane upgrade agent docker image
|
||||
# shell: bash
|
||||
# run: |
|
||||
# cd chaoscenter/upgrade-agents/control-plane
|
||||
# docker build . -f Dockerfile -t docker.io/litmuschaos/upgrade-agent-cp:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
# - name: Run Trivy vulnerability scanner
|
||||
# uses: aquasecurity/trivy-action@master
|
||||
# with:
|
||||
# image-ref: 'docker.io/litmuschaos/upgrade-agent-cp:${{ github.sha }}'
|
||||
# format: 'table'
|
||||
# exit-code: '1'
|
||||
# ignore-unfixed: true
|
||||
# vuln-type: 'os,library'
|
||||
# severity: 'CRITICAL,HIGH'
|
||||
|
||||
# docker-build-dex-server:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs:
|
||||
# - backend-checks
|
||||
# - changes
|
||||
# - backend-unit-tests
|
||||
# if: needs.changes.outputs.dex-server == 'true'
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
# - name: Build dex-server docker image
|
||||
# shell: bash
|
||||
# run: |
|
||||
# cd chaoscenter/dex-server
|
||||
# docker images && docker build . -f Dockerfile --build-arg TARGETARCH=amd64
|
||||
|
|
|
@ -8,7 +8,7 @@ on:
|
|||
- "*"
|
||||
defaults:
|
||||
run:
|
||||
working-directory: litmus-portal
|
||||
working-directory: chaoscenter
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
|
@ -19,7 +19,7 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "1.16" # By default, the go version is v1.15 in runner.
|
||||
go-version: "1.20" # By default, the go version is v1.15 in runner.
|
||||
- run: |
|
||||
make backend-services-checks
|
||||
|
||||
|
@ -30,7 +30,7 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.14.2
|
||||
node-version: 16
|
||||
- run: |
|
||||
make frontend-services-checks
|
||||
|
||||
|
@ -58,15 +58,15 @@ jobs:
|
|||
echo export AUTHENTICATION_SERVER_IMAGE="litmusportal-auth-server" >> env-vars
|
||||
echo export FRONTEND_IMAGE="litmusportal-frontend" >> env-vars
|
||||
echo export SUBSCRIBER_IMAGE="litmusportal-subscriber" >> env-vars
|
||||
echo export EVENT_TRACKER="litmusportal-event-tracker" >> env-vars
|
||||
echo export UPGRADE_AGENT_CP="upgrade-agent-cp" >> env-vars
|
||||
echo export DEX_SERVER="litmusportal-dex-server" >> env-vars
|
||||
# echo export EVENT_TRACKER="litmusportal-event-tracker" >> env-vars
|
||||
# echo export UPGRADE_AGENT_CP="upgrade-agent-cp" >> env-vars
|
||||
# echo export DEX_SERVER="litmusportal-dex-server" >> env-vars
|
||||
|
||||
- name: Uploading envs
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: env_artifact
|
||||
path: litmus-portal/env-vars
|
||||
path: chaoscenter/env-vars
|
||||
|
||||
docker-build-and-push-graphql-server:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -81,7 +81,7 @@ jobs:
|
|||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: env_artifact
|
||||
path: litmus-portal
|
||||
path: chaoscenter
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
|
@ -101,7 +101,7 @@ jobs:
|
|||
IMG_TAG: ${IMG_TAG}
|
||||
PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
REPONAME: ${{ secrets.REPONAME }}
|
||||
DIRECTORY: "graphql-server"
|
||||
DIRECTORY: "graphql/server"
|
||||
run: |
|
||||
source env-vars
|
||||
make push-portal-component
|
||||
|
@ -119,7 +119,7 @@ jobs:
|
|||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: env_artifact
|
||||
path: litmus-portal
|
||||
path: chaoscenter
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
|
@ -157,7 +157,7 @@ jobs:
|
|||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: env_artifact
|
||||
path: litmus-portal
|
||||
path: chaoscenter
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
|
@ -177,7 +177,7 @@ jobs:
|
|||
IMG_TAG: ${IMG_TAG}
|
||||
PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
REPONAME: ${{ secrets.REPONAME }}
|
||||
DIRECTORY: "cluster-agents/subscriber/"
|
||||
DIRECTORY: "subscriber"
|
||||
run: |
|
||||
source env-vars
|
||||
make push-portal-component
|
||||
|
@ -195,7 +195,7 @@ jobs:
|
|||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: env_artifact
|
||||
path: litmus-portal
|
||||
path: chaoscenter
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
|
@ -215,45 +215,7 @@ jobs:
|
|||
IMG_TAG: ${IMG_TAG}
|
||||
PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
REPONAME: ${{ secrets.REPONAME }}
|
||||
DIRECTORY: "cluster-agents/event-tracker/"
|
||||
run: |
|
||||
source env-vars
|
||||
make push-portal-component
|
||||
|
||||
docker-build-and-push-upgrade-agent-cp:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- get-envs
|
||||
- backend-checks
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Downloading image artficate
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: env_artifact
|
||||
path: litmus-portal
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: 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: Push control plane upgrade agent docker image
|
||||
env:
|
||||
IMAGE_NAME: ${UPGRADE_AGENT_CP}
|
||||
IMG_TAG: ${IMG_TAG}
|
||||
PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
REPONAME: ${{ secrets.REPONAME }}
|
||||
DIRECTORY: "upgrade-agents/control-plane/"
|
||||
DIRECTORY: "event-tracker"
|
||||
run: |
|
||||
source env-vars
|
||||
make push-portal-component
|
||||
|
@ -284,7 +246,7 @@ jobs:
|
|||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: env_artifact
|
||||
path: litmus-portal
|
||||
path: chaoscenter
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
|
@ -292,6 +254,14 @@ jobs:
|
|||
with:
|
||||
version: latest
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: yarn build
|
||||
run: |
|
||||
cd web && yarn && yarn build
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
|
@ -310,41 +280,3 @@ jobs:
|
|||
FRONTEND_IMAGE=${{ matrix.frontend.image_name }}
|
||||
timestamp=`date "+%s"`
|
||||
make push-frontend
|
||||
|
||||
docker-build-and-push-dex-server:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- get-envs
|
||||
- backend-checks
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Downloading image artficate
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: env_artifact
|
||||
path: litmus-portal
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: 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: Push dex server docker image
|
||||
env:
|
||||
IMAGE_NAME: ${DEX_SERVER}
|
||||
IMG_TAG: ${IMG_TAG}
|
||||
PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
REPONAME: ${{ secrets.REPONAME }}
|
||||
DIRECTORY: "dex-server"
|
||||
run: |
|
||||
source env-vars
|
||||
make push-portal-component
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
# Makefile for building Chaos Center
|
||||
# Reference Guide - https://www.gnu.org/software/make/manual/make.html
|
||||
|
||||
#
|
||||
# Internal variables or constants.
|
||||
# NOTE - These will be executed when any make target is invoked.
|
||||
#
|
||||
IS_DOCKER_INSTALLED = $(shell which docker >> /dev/null 2>&1; echo $$?)
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo ""
|
||||
@echo "Usage:-"
|
||||
@echo "\tmake all -- [default] builds the litmus containers"
|
||||
@echo ""
|
||||
|
||||
.PHONY: deps
|
||||
deps: _build_check_docker
|
||||
|
||||
_build_check_docker:
|
||||
@echo "------------------"
|
||||
@echo "--> Check the Docker deps"
|
||||
@echo "------------------"
|
||||
@if [ $(IS_DOCKER_INSTALLED) -eq 1 ]; \
|
||||
then echo "" \
|
||||
&& echo "ERROR:\tdocker is not installed. Please install it before build." \
|
||||
&& echo "" \
|
||||
&& exit 1; \
|
||||
fi;
|
||||
|
||||
.PHONY: chaos-center-check
|
||||
chaos-center-check : frontend-services-checks backend-services-checks
|
||||
|
||||
frontend-services-checks:
|
||||
@echo "------------------"
|
||||
@echo "--> checking code style [frontend]"
|
||||
@echo "------------------"
|
||||
cd web && yarn -s && yarn lint
|
||||
# @echo "------------------"
|
||||
# @echo "--> Check chaos-center frontend [depcheck]"
|
||||
# @echo "------------------"
|
||||
# cd web && npx depcheck --skip-missing .
|
||||
|
||||
backend-services-checks:
|
||||
@echo "------------------"
|
||||
@echo "--> checking code style [backend]"
|
||||
@echo "------------------"
|
||||
@fmtRes=$$(gofmt -d $$(find . -path ./vendor -prune -o -name '*.go' -print)); \
|
||||
if [ -n "$${fmtRes}" ]; then \
|
||||
echo "gofmt checking failed!" && echo "$${fmtRes}" \
|
||||
&& echo "Please ensure you are using $$($(GO) version) for formatting code." \
|
||||
&& exit 1;\
|
||||
fi
|
||||
@echo "------------------"
|
||||
@echo "--> Check chaos-center graphql-server [go mod tidy]"
|
||||
@echo "------------------"
|
||||
@tidyRes=$$(cd graphql/server && go mod tidy); \
|
||||
if [ -n "$${tidyRes}" ]; then \
|
||||
echo "go mod tidy checking failed!" && echo "$${tidyRes}" \
|
||||
&& echo "Please ensure you are using $$($(GO) version) for formatting code." \
|
||||
&& exit 1; \
|
||||
fi
|
||||
@echo "------------------"
|
||||
@echo "--> Check chaos-center authentication [go mod tidy]"
|
||||
@echo "------------------"
|
||||
@tidyRes=$$(cd authentication && go mod tidy); \
|
||||
if [ -n "$${tidyRes}" ]; then \
|
||||
echo "go mod tidy checking failed!" && echo "$${tidyRes}" \
|
||||
&& echo "Please ensure you are using $$($(GO) version) for formatting code." \
|
||||
&& exit 1; \
|
||||
fi
|
||||
@echo "------------------"
|
||||
@echo "--> Check chaos-center subscriber [go mod tidy]"
|
||||
@echo "------------------"
|
||||
@tidyRes=$$(cd subscriber && go mod tidy); \
|
||||
if [ -n "$${tidyRes}" ]; then \
|
||||
echo "go mod tidy checking failed!" && echo "$${tidyRes}" \
|
||||
&& echo "Please ensure you are using $$($(GO) version) for formatting code" \
|
||||
&& exit 1; \
|
||||
fi
|
||||
@echo "------------------"
|
||||
@echo "--> Check chaos-center event tracker [go mod tidy]"
|
||||
@echo "------------------"
|
||||
@tidyRes=$$(cd cluster-agents/event-tracker && go mod tidy); \
|
||||
if [ -n "$${tidyRes}" ]; then \
|
||||
echo "go mod tidy checking failed!" && echo "$${tidyRes}" \
|
||||
&& echo "Please ensure you are using $$($(GO) version) for formatting code" \
|
||||
&& exit 1; \
|
||||
fi
|
||||
# @echo "------------------"
|
||||
# @echo "--> Check chaos-center upgrade agent [go mod tidy]"
|
||||
# @echo "------------------"
|
||||
# @tidyRes=$$(cd upgrade-agents/control-plane && go mod tidy); \
|
||||
# if [ -n "$${tidyRes}" ]; then \
|
||||
# echo "go mod tidy checking failed!" && echo "$${tidyRes}" \
|
||||
# && echo "Please ensure you are using $$($(GO) version) for formatting code" \
|
||||
# && exit 1; \
|
||||
# fi
|
||||
|
||||
unit-tests:
|
||||
@echo "------------------"
|
||||
@echo "--> Running unit tests"
|
||||
@echo "------------------"
|
||||
@cd graphql-server && go test -cover ./...
|
||||
# @cd authentication && go test -v ./...
|
||||
# @cd cluster-agents/subscriber && go test -v ./...
|
||||
# @cd cluster-agents/event-tracker && go test -v ./...
|
||||
|
||||
.PHONY: docker.buildx
|
||||
docker.buildx:
|
||||
@echo "------------------------------"
|
||||
@echo "--> Setting up Builder "
|
||||
@echo "------------------------------"
|
||||
@if ! docker buildx ls | grep -q multibuilder; then\
|
||||
docker buildx create --name multibuilder;\
|
||||
docker buildx inspect multibuilder --bootstrap;\
|
||||
docker buildx use multibuilder;\
|
||||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes;\
|
||||
fi
|
||||
|
||||
buildx.push.image:
|
||||
@cd $(DIRECTORY) && \
|
||||
docker buildx build -f Dockerfile --progress plain --push --no-cache --platform $(PLATFORMS) -t $(REPONAME)/$(IMAGE_NAME):$(IMG_TAG) .
|
||||
|
||||
.PHONY: push-portal-component
|
||||
push-portal-component: docker.buildx buildx.push.image
|
||||
|
||||
.PHONY: push-frontend
|
||||
push-frontend: docker.buildx buildx.push.frontend
|
||||
|
||||
buildx.push.frontend:
|
||||
@cd web && \
|
||||
if [ "${IMG_TAG}" = "ci" ]; then \
|
||||
docker build . -f Dockerfile -t $(REPONAME)/$(FRONTEND_IMAGE):$(IMG_TAG) --build-arg PUBLIC_URL="$(PUBLIC_URL)" --build-arg TARGETARCH=amd64;\
|
||||
docker push $(REPONAME)/$(FRONTEND_IMAGE):$(IMG_TAG);\
|
||||
else \
|
||||
docker buildx build . -f Dockerfile --progress plain --push --no-cache --platform $(PLATFORMS) -t $(REPONAME)/$(FRONTEND_IMAGE):$(IMG_TAG) --build-arg PUBLIC_URL="$(PUBLIC_URL)";\
|
||||
fi
|
||||
|
||||
.PHONY: push-portal-component-amd64
|
||||
push-portal-component-amd64: docker-build-portal-amd64 docker-push-portal-amd64
|
||||
|
||||
docker-build-portal-amd64:
|
||||
@cd $(DIRECTORY) && \
|
||||
docker build . -f Dockerfile -t $(REPONAME)/$(IMAGE_NAME):$(IMG_TAG) --build-arg TARGETARCH=amd64
|
||||
docker-push-portal-amd64:
|
||||
@docker push $(REPONAME)/$(IMAGE_NAME):$(IMG_TAG)
|
||||
|
||||
.PHONY: push-frontend-amd64
|
||||
push-frontend-amd64: docker-build-frontend-amd64 docker-push-frontend-amd64
|
||||
|
||||
docker-build-frontend-amd64:
|
||||
@cd frontend && \
|
||||
docker build . -f Dockerfile -t $(REPONAME)/$(IMAGE_NAME):$(IMG_TAG) --build-arg TARGETARCH=amd64 --build-arg REACT_APP_KB_CHAOS_VERSION=$(IMG_TAG) \
|
||||
--build-arg REACT_APP_BUILD_TIME="$(timestamp)" --build-arg PUBLIC_URL="$(PUBLIC_URL)" --build-arg REACT_APP_HUB_BRANCH_NAME="v1.13.x"
|
||||
docker-push-frontend-amd64:
|
||||
@docker push $(REPONAME)/$(IMAGE_NAME):$(IMG_TAG)
|
|
@ -559,7 +559,7 @@ func RemoveInvitation(service services.ApplicationService) gin.HandlerFunc {
|
|||
}
|
||||
}
|
||||
|
||||
// UpdateProjectName is used to update a project's name
|
||||
// UpdateProjectName is used to update a project's name
|
||||
func UpdateProjectName(service services.ApplicationService) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
var userRequest entities.ProjectInput
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//JwtMiddleware is a Gin Middleware that authorises requests
|
||||
// JwtMiddleware is a Gin Middleware that authorises requests
|
||||
func JwtMiddleware() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
const BearerSchema = "Bearer "
|
||||
|
@ -35,7 +35,7 @@ func JwtMiddleware() gin.HandlerFunc {
|
|||
}
|
||||
}
|
||||
|
||||
//ValidateToken validates the given JWT Token
|
||||
// ValidateToken validates the given JWT Token
|
||||
func ValidateToken(encodedToken string) (*jwt.Token, error) {
|
||||
return jwt.Parse(encodedToken, func(token *jwt.Token) (interface{}, error) {
|
||||
if _, isValid := token.Method.(*jwt.SigningMethodHMAC); !isValid {
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
package protos
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -196,7 +197,7 @@ func (x *GetProjectByIdRequest) GetProjectID() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
//ProjectMembers is the message struct that holds the details about the project members
|
||||
// ProjectMembers is the message struct that holds the details about the project members
|
||||
type ProjectMembers struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
|
@ -8,6 +8,7 @@ package protos
|
|||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
|
|
|
@ -2,13 +2,13 @@ package presenter
|
|||
|
||||
import "litmus/litmus-portal/authentication/pkg/utils"
|
||||
|
||||
//ErrorResponseStruct defines the structure for error responses
|
||||
// ErrorResponseStruct defines the structure for error responses
|
||||
type ErrorResponseStruct struct {
|
||||
Error string `json:"error"`
|
||||
ErrorDescription string `json:"error_description"`
|
||||
}
|
||||
|
||||
//CreateErrorResponse is a helper function that creates a ErrorResponseStruct
|
||||
// CreateErrorResponse is a helper function that creates a ErrorResponseStruct
|
||||
func CreateErrorResponse(appError utils.AppError) *ErrorResponseStruct {
|
||||
return &ErrorResponseStruct{
|
||||
Error: appError.Error(),
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"go.mongodb.org/mongo-driver/mongo"
|
||||
)
|
||||
|
||||
//Repository holds the mongo database implementation of the Service
|
||||
// Repository holds the mongo database implementation of the Service
|
||||
type Repository interface {
|
||||
ListCollection() ([]string, error)
|
||||
ListDataBase() ([]string, error)
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
//Repository holds the mongo database implementation of the Service
|
||||
// Repository holds the mongo database implementation of the Service
|
||||
type Repository interface {
|
||||
LoginUser(user *entities.User) (*entities.User, error)
|
||||
GetUser(uid string) (*entities.User, error)
|
||||
|
|
|
@ -6,12 +6,13 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
//SanitizeString trims the string input
|
||||
// SanitizeString trims the string input
|
||||
func SanitizeString(input string) string {
|
||||
return strings.TrimSpace(input)
|
||||
}
|
||||
|
||||
/*ValidateStrictPassword represents and checks for the following patterns:
|
||||
/*
|
||||
ValidateStrictPassword represents and checks for the following patterns:
|
||||
- Input is at least 8 characters long
|
||||
- Input contains at least one special character
|
||||
- Input contains at least one digit
|
||||
|
|
|
@ -15,8 +15,8 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// Package v1 contains API Schema definitions for the eventtracker v1 API group
|
||||
//+kubebuilder:object:generate=true
|
||||
//+groupName=eventtracker.litmuschaos.io
|
||||
// +kubebuilder:object:generate=true
|
||||
// +groupName=eventtracker.litmuschaos.io
|
||||
package v1
|
||||
|
||||
import (
|
||||
|
|
|
@ -8,9 +8,69 @@ require (
|
|||
github.com/onsi/ginkgo v1.16.4
|
||||
github.com/onsi/gomega v1.15.0
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
|
||||
k8s.io/api v0.22.1
|
||||
k8s.io/apimachinery v0.22.1
|
||||
k8s.io/client-go v0.22.1
|
||||
sigs.k8s.io/controller-runtime v0.10.0
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.54.0 // indirect
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
|
||||
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
|
||||
github.com/Azure/go-autorest/logger v0.2.1 // indirect
|
||||
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
|
||||
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
|
||||
github.com/fsnotify/fsnotify v1.4.9 // indirect
|
||||
github.com/go-logr/logr v0.4.0 // indirect
|
||||
github.com/go-logr/zapr v0.4.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/google/go-cmp v0.5.5 // indirect
|
||||
github.com/google/gofuzz v1.1.0 // indirect
|
||||
github.com/google/uuid v1.1.2 // indirect
|
||||
github.com/googleapis/gnostic v0.5.5 // indirect
|
||||
github.com/imdario/mergo v0.3.12 // indirect
|
||||
github.com/json-iterator/go v1.1.11 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.1 // indirect
|
||||
github.com/nxadm/tail v1.4.8 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/prometheus/client_golang v1.11.0 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.26.0 // indirect
|
||||
github.com/prometheus/procfs v0.6.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
go.uber.org/zap v1.19.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
|
||||
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 // indirect
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
|
||||
golang.org/x/text v0.3.6 // indirect
|
||||
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/protobuf v1.26.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
||||
k8s.io/apiextensions-apiserver v0.22.1 // indirect
|
||||
k8s.io/component-base v0.22.1 // indirect
|
||||
k8s.io/klog/v2 v2.9.0 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect
|
||||
k8s.io/utils v0.0.0-20210802155522-efc7438f0176 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
|
||||
sigs.k8s.io/yaml v1.2.0 // indirect
|
||||
)
|
||||
|
|
|
@ -69,7 +69,6 @@ github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb
|
|||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
|
@ -580,7 +579,6 @@ golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 h1:c8PlLMqBbOHoqtjteWm5/kbe6rNY2pbRfbIMVnepueo=
|
||||
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
|
|
@ -2,6 +2,7 @@ package graph
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/99designs/gqlgen/graphql"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/generated"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/authorization"
|
||||
|
|
|
@ -2,9 +2,10 @@ package authorization
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,9 +3,10 @@ package authorization
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/utils"
|
||||
"log"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/utils"
|
||||
|
||||
"github.com/golang-jwt/jwt"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package authorization
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/grpc"
|
||||
|
||||
grpc2 "google.golang.org/grpc"
|
||||
|
|
|
@ -6,16 +6,17 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/authorization"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_infrastructure"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/gitops"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
"go.mongodb.org/mongo-driver/mongo/readconcern"
|
||||
"go.mongodb.org/mongo-driver/mongo/writeconcern"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
chaosTypes "github.com/litmuschaos/chaos-operator/api/litmuschaos/v1alpha1"
|
||||
|
|
|
@ -5,11 +5,12 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_infrastructure"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_infrastructure"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
|
||||
dbChaosExperimentRun "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/chaos_experiment_run"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
|
|
|
@ -2,6 +2,7 @@ package chaos_infrastructure
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
store "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/data-store"
|
||||
|
@ -255,11 +256,11 @@ func SendExperimentToSubscriber(projectID string, workflow *model.ChaosExperimen
|
|||
workflowNamespace = utils.Config.InfraNamespace
|
||||
}
|
||||
SendRequestToSubscriber(SubscriberRequests{
|
||||
K8sManifest: workflow.ExperimentManifest,
|
||||
RequestType: reqType,
|
||||
ProjectID: projectID,
|
||||
InfraID: workflow.InfraID,
|
||||
Namespace: workflowNamespace,
|
||||
K8sManifest: workflow.ExperimentManifest,
|
||||
RequestType: reqType,
|
||||
ProjectID: projectID,
|
||||
InfraID: workflow.InfraID,
|
||||
Namespace: workflowNamespace,
|
||||
ExternalData: externalData,
|
||||
Username: username,
|
||||
}, *r)
|
||||
|
|
|
@ -4,12 +4,6 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/authorization"
|
||||
store "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/data-store"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/config"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/environments"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/k8s"
|
||||
"github.com/sirupsen/logrus"
|
||||
"log"
|
||||
"math"
|
||||
"net/http"
|
||||
|
@ -17,6 +11,13 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/authorization"
|
||||
store "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/data-store"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/config"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/environments"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/k8s"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/jinzhu/copier"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
|
@ -688,7 +689,6 @@ func (in *infraService) ListInfras(projectID string, request *model.ListInfraReq
|
|||
}
|
||||
newInfras = append(newInfras, &newInfra)
|
||||
|
||||
|
||||
//var updateStatus model.UpdateStatus
|
||||
|
||||
// Fetching the list of compatible versions
|
||||
|
|
|
@ -2,10 +2,11 @@ package chaoshubops
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
|
||||
"github.com/go-git/go-git/v5"
|
||||
"github.com/go-git/go-git/v5/plumbing"
|
||||
"github.com/go-git/go-git/v5/plumbing/transport"
|
||||
|
|
|
@ -2,13 +2,14 @@ package chaoshubops_test
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
chaosHubOps "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaoshub/ops"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
chaosHubOps "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaoshub/ops"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/go-git/go-git/v5"
|
||||
"github.com/go-git/go-git/v5/plumbing/object"
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package chaoshubops_test
|
||||
|
||||
import (
|
||||
chaosHubOps "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaoshub/ops"
|
||||
"testing"
|
||||
|
||||
chaosHubOps "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaoshub/ops"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,6 +4,11 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/authorization"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaoshub/handler"
|
||||
|
@ -12,10 +17,6 @@ import (
|
|||
dbSchemaChaosHub "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/chaos_hub"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/utils"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/jinzhu/copier"
|
||||
|
|
|
@ -3,6 +3,7 @@ package chaos_hub
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package chaos_hub
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// ChaosHub ...
|
||||
|
|
|
@ -3,6 +3,7 @@ package gitops
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
|
|
|
@ -2,6 +2,7 @@ package image_registry
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
|
|
|
@ -2,6 +2,7 @@ package mongodb
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
|
|
|
@ -2,6 +2,7 @@ package project
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
|
|
|
@ -5,9 +5,6 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/authorization"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/gitops"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
@ -15,6 +12,10 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/authorization"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/gitops"
|
||||
|
||||
"github.com/go-git/go-git/v5"
|
||||
"github.com/go-git/go-git/v5/plumbing"
|
||||
"github.com/go-git/go-git/v5/plumbing/object"
|
||||
|
|
|
@ -4,6 +4,14 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
chaos_experiment2 "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_experiment"
|
||||
|
@ -14,13 +22,6 @@ import (
|
|||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/chaos_infrastructure"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/gitops"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/grpc"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
|
|
|
@ -3,6 +3,7 @@ package grpc
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/protos"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/utils"
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_infrastructure"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
|
||||
dbChaosInfra "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/chaos_infrastructure"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/utils"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
|
|
@ -2,9 +2,10 @@ package handlers
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type APIStatus struct {
|
||||
|
|
|
@ -2,14 +2,15 @@ package image_registry
|
|||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/image_registry"
|
||||
dbOperationsImageRegistry "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/image_registry"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Service is the interface for the image registry service
|
||||
|
|
|
@ -5,11 +5,12 @@ import (
|
|||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/utils"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/utils"
|
||||
|
||||
k8serrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
|
@ -2,6 +2,7 @@ package projects
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/image_registry"
|
||||
|
|
|
@ -3,15 +3,17 @@ package self_deployer
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
chaos_infra "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_infrastructure"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/chaos_infrastructure"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/k8s"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/utils"
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/k8s"
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/utils"
|
||||
)
|
||||
|
||||
// StartDeployer registers a new internal self-infra and starts the deployer
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
package protos
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -196,7 +197,7 @@ func (x *GetProjectByIdRequest) GetProjectID() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
//ProjectMembers is the message struct that holds the details about the project members
|
||||
// ProjectMembers is the message struct that holds the details about the project members
|
||||
type ProjectMembers struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
|
@ -8,6 +8,7 @@ package protos
|
|||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
|
|
|
@ -7,11 +7,12 @@
|
|||
package protos
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -8,6 +8,7 @@ package protos
|
|||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
|
|
|
@ -4,12 +4,13 @@ import (
|
|||
"bytes"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"github.com/gin-gonic/gin"
|
||||
"math/rand"
|
||||
"reflect"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
|
|
@ -154,7 +154,7 @@ func chaosEventHandler(obj interface{}, eventType string, stream chan types.Work
|
|||
stream <- workflow
|
||||
}
|
||||
|
||||
//StopChaosEngineState is used to patch all the chaosEngines with engineState=stop
|
||||
// StopChaosEngineState is used to patch all the chaosEngines with engineState=stop
|
||||
func StopChaosEngineState(namespace string, workflowRunID *string) error {
|
||||
ctx := context.TODO()
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ func getChaosData(nodeStatus v1alpha13.NodeStatus, engineName, engineNS string,
|
|||
return cd, nil
|
||||
}
|
||||
|
||||
//CheckChaosData util function, checks if event is a chaos-exp event, if so - extract the chaos data
|
||||
// CheckChaosData util function, checks if event is a chaos-exp event, if so - extract the chaos data
|
||||
func CheckChaosData(nodeStatus v1alpha13.NodeStatus, workflowNS string, chaosClient *v1alpha12.LitmuschaosV1alpha1Client) (string, *types.ChaosData, error) {
|
||||
nodeType := string(nodeStatus.Type)
|
||||
var cd *types.ChaosData = nil
|
||||
|
@ -169,7 +169,7 @@ func ListWorkflowObject(wfid string) (*v1alpha1.WorkflowList, error) {
|
|||
return listWf, nil
|
||||
}
|
||||
|
||||
//GenerateWorkflowPayload generate graphql mutation payload for events event
|
||||
// GenerateWorkflowPayload generate graphql mutation payload for events event
|
||||
func GenerateWorkflowPayload(cid, accessKey, version, completed string, wfEvent types.WorkflowEvent) ([]byte, error) {
|
||||
infraID := `{infraID: \"` + cid + `\", version: \"` + version + `\", accessKey: \"` + accessKey + `\"}`
|
||||
for id, event := range wfEvent.Nodes {
|
||||
|
|
|
@ -29,7 +29,7 @@ func SendRequest(server string, payload []byte) (string, error) {
|
|||
return string(body), nil
|
||||
}
|
||||
|
||||
//MarshalGQLData processes event data into proper format acceptable by graphql
|
||||
// MarshalGQLData processes event data into proper format acceptable by graphql
|
||||
func MarshalGQLData(gqlData interface{}) (string, error) {
|
||||
data, err := json.Marshal(gqlData)
|
||||
if err != nil {
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
var KubeConfig *string
|
||||
|
||||
//getKubeConfig setup the config for access cluster resource
|
||||
// getKubeConfig setup the config for access cluster resource
|
||||
func GetKubeConfig() (*rest.Config, error) {
|
||||
// Use in-cluster config if kubeconfig path is not specified
|
||||
if *KubeConfig == "" {
|
||||
|
@ -30,7 +30,7 @@ func GetGenericK8sClient() (*kubernetes.Clientset, error) {
|
|||
return kubernetes.NewForConfig(config)
|
||||
}
|
||||
|
||||
//This function returns dynamic client and discovery client
|
||||
// This function returns dynamic client and discovery client
|
||||
func GetDynamicAndDiscoveryClient() (discovery.DiscoveryInterface, dynamic.Interface, error) {
|
||||
// returns a config object which uses the service account kubernetes gives to pods
|
||||
config, err := GetKubeConfig()
|
||||
|
|
|
@ -5,11 +5,12 @@ import (
|
|||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
|
||||
"subscriber/pkg/graphql"
|
||||
"subscriber/pkg/types"
|
||||
|
||||
|
|
|
@ -2,11 +2,12 @@ package utils
|
|||
|
||||
import (
|
||||
"context"
|
||||
"subscriber/pkg/events"
|
||||
"subscriber/pkg/k8s"
|
||||
|
||||
wfclientset "github.com/argoproj/argo-workflows/v3/pkg/client/clientset/versioned"
|
||||
"github.com/sirupsen/logrus"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"subscriber/pkg/events"
|
||||
"subscriber/pkg/k8s"
|
||||
)
|
||||
|
||||
func WorkflowRequest(agentData map[string]string, requestType string, externalData string, uuid string) error {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7
|
||||
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8
|
||||
RUN microdnf module enable nginx:1.20
|
||||
RUN microdnf install nginx
|
||||
|
||||
|
|
|
@ -0,0 +1,255 @@
|
|||
name: build-pipeline
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- v*
|
||||
|
||||
env:
|
||||
DOCKER_BUILDKIT: 1 # Enable Docker_buildkit in all build jobs
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
# Set job outputs to values from filter step
|
||||
outputs:
|
||||
frontend: ${{ steps.filter.outputs.frontend }}
|
||||
graphql-server: ${{ steps.filter.outputs.graphql-server }}
|
||||
authentication: ${{ steps.filter.outputs.authentication }}
|
||||
event-tracker: ${{ steps.filter.outputs.event-tracker }}
|
||||
upgrade-agent-cp: ${{ steps.filter.outputs.upgrade-agent-cp }}
|
||||
subscriber: ${{ steps.filter.outputs.subscriber }}
|
||||
litmus-demo: ${{ steps.filter.outputs.litmus-demo }}
|
||||
dex-server: ${{ steps.filter.outputs.dex-server }}
|
||||
steps:
|
||||
# For pull requests it's not necessary to checkout the code
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
frontend:
|
||||
- 'litmus-portal/frontend/**'
|
||||
graphql-server:
|
||||
- 'litmus-portal/graphql-server/**'
|
||||
authentication:
|
||||
- 'litmus-portal/authentication/**'
|
||||
event-tracker:
|
||||
- 'litmus-portal/cluster-agents/event-tracker/**'
|
||||
upgrade-agent-cp:
|
||||
- 'litmus-portal/upgrade-agents/control-plane/**'
|
||||
subscriber:
|
||||
- 'litmus-portal/cluster-agents/subscriber/**'
|
||||
litmus-demo:
|
||||
- 'demo/1.x/**'
|
||||
dex-server:
|
||||
- 'litmus-portal/dex-server/**'
|
||||
|
||||
backend-checks:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.graphql-server == 'true' || needs.changes.outputs.dex-server == 'true' || needs.changes.outputs.upgrade-agent-cp == 'true' || needs.changes.outputs.authentication == 'true' || needs.changes.outputs.event-tracker == 'true' || needs.changes.outputs.subscriber == 'true'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "1.16" # By default, the go version is v1.15 in runner.
|
||||
- name: Check Golang imports order
|
||||
uses: Jerome1337/goimports-action@v1.0.3
|
||||
with:
|
||||
goimports-path: ./litmus-portal
|
||||
- name: Backend checks
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal
|
||||
make backend-services-checks
|
||||
|
||||
frontend-checks:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.frontend == 'true' }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.14.2
|
||||
- name: Frontend checks
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal
|
||||
make frontend-services-checks
|
||||
|
||||
backend-unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- changes
|
||||
- backend-checks
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "1.16" # By default, the go version is v1.15 in runner.
|
||||
- name: Backend unit tests
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal
|
||||
make unit-tests
|
||||
|
||||
docker-build-graphql-server:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
if: ${{ needs.changes.outputs.graphql-server == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build graphql server docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/graphql-server
|
||||
docker build . -f Dockerfile -t docker.io/litmuschaos/litmusportal-server:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/litmuschaos/litmusportal-server:${{ github.sha }}'
|
||||
format: 'table'
|
||||
exit-code: '0'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
docker-build-authentication-server:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
if: ${{ needs.changes.outputs.authentication == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build auth server docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/authentication
|
||||
docker build . -f Dockerfile -t docker.io/litmuschaos/litmusportal-auth-server:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/litmuschaos/litmusportal-auth-server:${{ github.sha }}'
|
||||
format: 'table'
|
||||
exit-code: '1'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
docker-build-subscriber:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
if: ${{ needs.changes.outputs.subscriber == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build subscriber docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/cluster-agents/subscriber
|
||||
docker build . -f Dockerfile -t docker.io/litmuschaos/litmusportal-subscriber:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/litmuschaos/litmusportal-subscriber:${{ github.sha }}'
|
||||
format: 'table'
|
||||
exit-code: '0'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
docker-build-event-tracker:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
if: ${{ needs.changes.outputs.event-tracker == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build event tracker docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/cluster-agents/event-tracker
|
||||
docker build . -f Dockerfile -t docker.io/litmuschaos/litmusportal-event-tracker:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/litmuschaos/litmusportal-event-tracker:${{ github.sha }}'
|
||||
format: 'table'
|
||||
exit-code: '1'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
docker-build-upgrade-agent-cp:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
if: ${{ needs.changes.outputs.upgrade-agent-cp == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build control plane upgrade agent docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/upgrade-agents/control-plane
|
||||
docker build . -f Dockerfile -t docker.io/litmuschaos/upgrade-agent-cp:${{ github.sha }} --build-arg TARGETARCH=amd64
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/litmuschaos/upgrade-agent-cp:${{ github.sha }}'
|
||||
format: 'table'
|
||||
exit-code: '1'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
docker-build-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- frontend-checks
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.frontend == 'true' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build frontend docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/frontend
|
||||
docker build . -f Dockerfile --build-arg TARGETARCH=amd64
|
||||
|
||||
docker-build-dex-server:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- backend-checks
|
||||
- changes
|
||||
- backend-unit-tests
|
||||
if: needs.changes.outputs.dex-server == 'true'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build dex-server docker image
|
||||
shell: bash
|
||||
run: |
|
||||
cd litmus-portal/dex-server
|
||||
docker images && docker build . -f Dockerfile --build-arg TARGETARCH=amd64
|
|
@ -0,0 +1,350 @@
|
|||
# name: push-pipeline
|
||||
# on:
|
||||
# push:
|
||||
# branches:
|
||||
# - master
|
||||
# - ^v[0-9]*.[0-9]*.x$
|
||||
# tags:
|
||||
# - "*"
|
||||
# defaults:
|
||||
# run:
|
||||
# working-directory: litmus-portal
|
||||
# shell: bash
|
||||
|
||||
# jobs:
|
||||
# backend-checks:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout repository
|
||||
# uses: actions/checkout@v2
|
||||
# - uses: actions/setup-go@v2
|
||||
# with:
|
||||
# go-version: "1.16" # By default, the go version is v1.15 in runner.
|
||||
# - run: |
|
||||
# make backend-services-checks
|
||||
|
||||
# frontend-checks:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout repository
|
||||
# uses: actions/checkout@v2
|
||||
# - uses: actions/setup-node@v3
|
||||
# with:
|
||||
# node-version: 16.14.2
|
||||
# - run: |
|
||||
# make frontend-services-checks
|
||||
|
||||
# get-envs:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout repository
|
||||
# uses: actions/checkout@v2
|
||||
# - run: |
|
||||
# img_tag=""
|
||||
# array=(`echo ${GITHUB_REF} | sed 's/\//\n/g'`)
|
||||
# if [ ${array[1]} == "tags" ]
|
||||
# then
|
||||
# echo "tag build"
|
||||
# img_tag=${GITHUB_REF#refs/*/}
|
||||
# else
|
||||
# echo "non tag build"
|
||||
# img_tag="ci"
|
||||
# fi
|
||||
# # This is a condition where image tag looks like "pull/<pullrequest-name>" during pull request build
|
||||
# NEW_IMG_TAG=`echo $img_tag | sed "s/\//-/g"`
|
||||
# echo $NEW_IMG_TAG
|
||||
# echo export IMG_TAG=$NEW_IMG_TAG >> env-vars
|
||||
# echo export GRAPHQL_SERVER_IMAGE="litmusportal-server" >> env-vars
|
||||
# echo export AUTHENTICATION_SERVER_IMAGE="litmusportal-auth-server" >> env-vars
|
||||
# echo export FRONTEND_IMAGE="litmusportal-frontend" >> env-vars
|
||||
# echo export SUBSCRIBER_IMAGE="litmusportal-subscriber" >> env-vars
|
||||
# echo export EVENT_TRACKER="litmusportal-event-tracker" >> env-vars
|
||||
# echo export UPGRADE_AGENT_CP="upgrade-agent-cp" >> env-vars
|
||||
# echo export DEX_SERVER="litmusportal-dex-server" >> env-vars
|
||||
|
||||
# - name: Uploading envs
|
||||
# uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: env_artifact
|
||||
# path: litmus-portal/env-vars
|
||||
|
||||
# docker-build-and-push-graphql-server:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs:
|
||||
# - get-envs
|
||||
# - backend-checks
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
|
||||
# - name: Downloading image artficate
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: env_artifact
|
||||
# path: litmus-portal
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# id: 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: Push graphql server docker image
|
||||
# env:
|
||||
# IMAGE_NAME: ${GRAPHQL_SERVER_IMAGE}
|
||||
# IMG_TAG: ${IMG_TAG}
|
||||
# PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
# REPONAME: ${{ secrets.REPONAME }}
|
||||
# DIRECTORY: "graphql-server"
|
||||
# run: |
|
||||
# source env-vars
|
||||
# make push-portal-component
|
||||
|
||||
# docker-build-and-push-authentication-server:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs:
|
||||
# - get-envs
|
||||
# - backend-checks
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
|
||||
# - name: Downloading image artficate
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: env_artifact
|
||||
# path: litmus-portal
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# id: 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: Push auth server docker image
|
||||
# env:
|
||||
# IMAGE_NAME: ${AUTHENTICATION_SERVER_IMAGE}
|
||||
# IMG_TAG: ${IMG_TAG}
|
||||
# PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
# REPONAME: ${{ secrets.REPONAME }}
|
||||
# DIRECTORY: "authentication"
|
||||
# run: |
|
||||
# source env-vars
|
||||
# make push-portal-component
|
||||
|
||||
# docker-build-and-push-subscriber:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs:
|
||||
# - get-envs
|
||||
# - backend-checks
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
|
||||
# - name: Downloading image artficate
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: env_artifact
|
||||
# path: litmus-portal
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# id: 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: Push subscriber docker image
|
||||
# env:
|
||||
# IMAGE_NAME: ${SUBSCRIBER_IMAGE}
|
||||
# IMG_TAG: ${IMG_TAG}
|
||||
# PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
# REPONAME: ${{ secrets.REPONAME }}
|
||||
# DIRECTORY: "cluster-agents/subscriber/"
|
||||
# run: |
|
||||
# source env-vars
|
||||
# make push-portal-component
|
||||
|
||||
# docker-build-and-push-event-tracker:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs:
|
||||
# - get-envs
|
||||
# - backend-checks
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
|
||||
# - name: Downloading image artficate
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: env_artifact
|
||||
# path: litmus-portal
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# id: 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: Push event tracker docker image
|
||||
# env:
|
||||
# IMAGE_NAME: ${EVENT_TRACKER}
|
||||
# IMG_TAG: ${IMG_TAG}
|
||||
# PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
# REPONAME: ${{ secrets.REPONAME }}
|
||||
# DIRECTORY: "cluster-agents/event-tracker/"
|
||||
# run: |
|
||||
# source env-vars
|
||||
# make push-portal-component
|
||||
|
||||
# docker-build-and-push-upgrade-agent-cp:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs:
|
||||
# - get-envs
|
||||
# - backend-checks
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
|
||||
# - name: Downloading image artficate
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: env_artifact
|
||||
# path: litmus-portal
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# id: 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: Push control plane upgrade agent docker image
|
||||
# env:
|
||||
# IMAGE_NAME: ${UPGRADE_AGENT_CP}
|
||||
# IMG_TAG: ${IMG_TAG}
|
||||
# PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
# REPONAME: ${{ secrets.REPONAME }}
|
||||
# DIRECTORY: "upgrade-agents/control-plane/"
|
||||
# run: |
|
||||
# source env-vars
|
||||
# make push-portal-component
|
||||
|
||||
# ## TODO: the build time for multiarch frontend image is higher so it is used in the release
|
||||
# ## builds only need to optimize the build duration and also add it with ci tag
|
||||
# ## Build and push / base path
|
||||
# docker-build-and-push-frontend:
|
||||
# runs-on: ubuntu-latest
|
||||
# strategy:
|
||||
# matrix:
|
||||
# frontend:
|
||||
# [
|
||||
# { "image_name": "litmusportal-frontend", "path": "" },
|
||||
# {
|
||||
# "image_name": "litmusportal-frontend-path-litmuschaos",
|
||||
# "path": "/litmuschaos",
|
||||
# },
|
||||
# ]
|
||||
# needs:
|
||||
# - get-envs
|
||||
# - frontend-checks
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
|
||||
# - name: Downloading image artficate
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: env_artifact
|
||||
# path: litmus-portal
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# id: 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: Push frontend docker image ( ${{ matrix.frontend.image_name }} )
|
||||
# env:
|
||||
# IMG_TAG: ${IMG_TAG}
|
||||
# PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
# REPONAME: ${{ secrets.REPONAME }}
|
||||
# timestamp: ${timestamp}
|
||||
# PUBLIC_URL: ${{ matrix.frontend.path }}
|
||||
# run: |
|
||||
# source env-vars
|
||||
# FRONTEND_IMAGE=${{ matrix.frontend.image_name }}
|
||||
# timestamp=`date "+%s"`
|
||||
# make push-frontend
|
||||
|
||||
# docker-build-and-push-dex-server:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs:
|
||||
# - get-envs
|
||||
# - backend-checks
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
|
||||
# - name: Downloading image artficate
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: env_artifact
|
||||
# path: litmus-portal
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# id: 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: Push dex server docker image
|
||||
# env:
|
||||
# IMAGE_NAME: ${DEX_SERVER}
|
||||
# IMG_TAG: ${IMG_TAG}
|
||||
# PLATFORMS: ${{ secrets.PLATFORMS }}
|
||||
# REPONAME: ${{ secrets.REPONAME }}
|
||||
# DIRECTORY: "dex-server"
|
||||
# run: |
|
||||
# source env-vars
|
||||
# make push-portal-component
|
Loading…
Reference in New Issue