Skip to content

Commit

Permalink
remove runtime-ds
Browse files Browse the repository at this point in the history
  • Loading branch information
tharindu1st committed Jul 12, 2023
1 parent 9ea7a2a commit 1763522
Show file tree
Hide file tree
Showing 172 changed files with 26 additions and 49,626 deletions.
212 changes: 2 additions & 210 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ jobs:
# DOCKER_ORGANIZATION: ${{ secrets.AZURE_ACR_NAME }}.azurecr.io
# AZURE_ACR_NAME: ${{ secrets.AZURE_ACR_NAME }}
# AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
build_runtime:
if: github.event_name == 'pull_request_target' && github.event.action == 'opened' || github.event.action == 'synchronize'
uses: ./.github/workflows/runtime-release.yml
with:
aks_deployment: true
secrets:
WSO2_BOT_TOKEN: ${{ secrets.WSO2_BOT_TOKEN }}
WSO2_BOT_USER: ${{ secrets.WSO2_BOT_USER }}
WSO2_BOT_EMAIL: ${{ secrets.WSO2_BOT_EMAIL }}
DOCKER_ORGANIZATION: ${{ secrets.AZURE_ACR_NAME }}.azurecr.io
AZURE_ACR_NAME: ${{ secrets.AZURE_ACR_NAME }}
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
build_config:
if: github.event_name == 'pull_request_target' && github.event.action == 'opened' || github.event.action == 'synchronize'
uses: ./.github/workflows/config-deployer-release.yml
Expand Down Expand Up @@ -94,118 +82,9 @@ jobs:
AZURE_ACR_NAME: ${{ secrets.AZURE_ACR_NAME }}
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}

runs_integration_tests_on_pull_request_target:
if: github.event_name == 'pull_request_target' && github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened'
needs: [build_adapter, build_enforcer, build_runtime, build_idpds, build_idpui,build_config]
runs-on: ubuntu-latest
steps:
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Create AKS Cluster and set context
uses: azure/CLI@v1
with:
azcliversion: 2.44.1
inlineScript: |
az aks create --resource-group "${{ secrets.AZURE_RESOURCE_GROUP }}" --name "${{ secrets.AKS_CLUSTER_NAME }}-${{ github.event.number || github.run_id }}" --enable-cluster-autoscaler --min-count 1 --max-count 3 --location "southeastasia" --generate-ssh-keys --verbose
- uses: azure/aks-set-context@v3
with:
resource-group: '${{ secrets.AZURE_RESOURCE_GROUP }}'
cluster-name: '${{ secrets.AKS_CLUSTER_NAME }}-${{ github.event.number || github.run_id }}'
- name: Create Namespace apk-release
shell: sh
run: |
kubectl create namespace apk-release
kubectl get ns
- name: Create Image pull secret.
shell: sh
run: |
kubectl create secret docker-registry azure-registry --docker-server=${{ secrets.AZURE_ACR_NAME }}.azurecr.io --docker-username=${{ secrets.AZURE_ACR_USER }} --docker-password=${{ secrets.AZURE_ACR_PASSWORD }} --docker-email=${{ secrets.WSO2_BOT_EMAIL }} -n apk-release
- name: Checkout apk-repo.
uses: actions/checkout@v3
with:
fetch-depth: "0"
path: apk-repo
token: ${{ secrets.WSO2_BOT_TOKEN }}
- name: Set release username and email
shell: sh
run: |
git config --global user.name ${{ secrets.WSO2_BOT_USER }}
git config --global user.email ${{ secrets.WSO2_BOT_EMAIL }}
- name: checkout pull request and merge.
shell: sh
if: github.event_name == 'pull_request_target' && github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened'
run: |
cd apk-repo
gh pr checkout ${{ github.event.number }} -b pr-${{ github.event.number }}
git checkout pr-${{ github.event.number }}
git merge origin/main
- name: Helm release deploy
if: github.event_name == 'pull_request_target' && github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened'
shell: sh
run: |
cd apk-repo/helm-charts
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add jetstack https://charts.jetstack.io
helm dependency build
helm install release-1 -n apk-release . --debug --wait --timeout 10m0s \
--set wso2.subscription.imagePullSecrets=azure-registry \
--set wso2.apk.dp.runtime.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/runtime-domain-service:${{ github.sha }} \
--set wso2.apk.dp.configdeployer.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/config-deployer-service:${{ github.sha }} \
--set wso2.apk.dp.adapter.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/adapter:${{ github.sha }} \
--set wso2.apk.dp.gatewayRuntime.deployment.enforcer.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/enforcer:${{ github.sha }} \
--set idp.idpds.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/idp-domain-service:${{ github.sha }} \
--set idp.idpui.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/idp-ui:${{ github.sha }}
kubectl get pods -n apk-release
kubectl get svc -n apk-release
- name: Apply test resources
shell: sh
run: |
cd apk-repo/test/k8s-resources
kubectl apply -f .
- name: Retrieve Router IP
id: retrieveIp
run: |
echo "router_ip=`kubectl get svc release-1-wso2-apk-router-service -n apk-release --output jsonpath='{.status.loadBalancer.ingress[0].ip}'`">> $GITHUB_OUTPUT
- name: Run test cases
shell: sh
run: |
cd apk-repo/test/postman-tests
./gradlew test -PgwHost=${{ steps.retrieveIp.outputs.router_ip }}
- name: Helm release undeploy
if: always()
shell: sh
run: |
cd apk-repo/helm-charts
helm uninstall release-1 -n apk-release
kubectl get pods -n apk-release
kubectl get svc -n apk-release
- name: Delete AKS cluster
if: always()
uses: azure/CLI@v1
with:
azcliversion: 2.44.1
inlineScript: |
az aks delete --resource-group ${{ secrets.AZURE_RESOURCE_GROUP }} --name ${{ secrets.AKS_CLUSTER_NAME }}-${{ github.event.number || github.run_id }} --yes
- name: Logout from azure
if: always()
uses: azure/CLI@v1
with:
azcliversion: 2.44.1
inlineScript: |
az logout
- name: Publish Test Report
if: always()
uses: malinthaprasan/action-surefire-report@v1
with:
report_paths: 'apk-repo/test/postman-tests/build/*.xml'
fail_on_test_failures: true

runs_go_integration_tests_on_pull_request_target:
if: github.event_name == 'pull_request_target' && github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened'
needs: [build_adapter, build_enforcer]
needs: [build_adapter, build_enforcer,build_config,build_idpds,build_idpui]
runs-on: ubuntu-latest
steps:
- uses: azure/login@v1
Expand Down Expand Up @@ -261,7 +140,6 @@ jobs:
helm dependency build
helm install apk-test-setup -n apk-integration-test . --debug --wait --timeout 10m0s \
--set wso2.subscription.imagePullSecrets=azure-registry \
--set wso2.apk.dp.runtime.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/runtime-domain-service:${{ github.sha }} \
--set wso2.apk.dp.configdeployer.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/config-deployer-service:${{ github.sha }} \
--set wso2.apk.dp.adapter.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/adapter:${{ github.sha }} \
--set wso2.apk.dp.gatewayRuntime.deployment.enforcer.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/enforcer:${{ github.sha }} \
Expand Down Expand Up @@ -303,90 +181,4 @@ jobs:
uses: malinthaprasan/action-surefire-report@v1
with:
report_paths: 'apk-repo/test/postman-tests/build/*.xml'
fail_on_test_failures: true

runs_integration_on_workflow_dispatch:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Create AKS Cluster and set context
uses: azure/CLI@v1
with:
azcliversion: 2.44.1
inlineScript: |
az aks create --resource-group "${{ secrets.AZURE_RESOURCE_GROUP }}" --name "${{ secrets.AKS_CLUSTER_NAME }}-${{ github.event.number || github.run_id }}" --enable-cluster-autoscaler --min-count 1 --max-count 3 --location "southeastasia" --generate-ssh-keys --verbose
- uses: azure/aks-set-context@v3
with:
resource-group: '${{ secrets.AZURE_RESOURCE_GROUP }}'
cluster-name: '${{ secrets.AKS_CLUSTER_NAME }}-${{ github.event.number || github.run_id }}'
- name: Create Namespace apk-release
shell: sh
run: |
kubectl create namespace apk-release
kubectl get ns
- name: Create Image pull secret.
shell: sh
run: |
kubectl create secret docker-registry azure-registry --docker-server=${{ secrets.AZURE_ACR_NAME }}.azurecr.io --docker-username=${{ secrets.AZURE_ACR_USER }} --docker-password=${{ secrets.AZURE_ACR_PASSWORD }} --docker-email=${{ secrets.WSO2_BOT_EMAIL }} -n apk-release
- name: Checkout apk-repo.
uses: actions/checkout@v3
with:
fetch-depth: "0"
path: apk-repo
token: ${{ secrets.WSO2_BOT_TOKEN }}
- name: Helm release deploy
if: github.event_name == 'workflow_dispatch'
shell: sh
run: |
cd apk-repo/helm-charts
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add jetstack https://charts.jetstack.io
helm dependency build
helm install release-1 -n apk-release . --debug --wait --timeout 10m0s
kubectl get pods -n apk-release
kubectl get svc -n apk-release
- name: Apply test resources
shell: sh
run: |
cd apk-repo/test/k8s-resources
kubectl apply -f .
- name: Retrieve Router IP
id: retrieveIp
run: |
echo "router_ip=`kubectl get svc release-1-wso2-apk-router-service -n apk-release --output jsonpath='{.status.loadBalancer.ingress[0].ip}'`">> $GITHUB_OUTPUT
- name: Run test cases
shell: sh
run: |
cd apk-repo/test/postman-tests
./gradlew test -PgwHost=${{ steps.retrieveIp.outputs.router_ip }}
- name: Helm release undeploy
if: always()
shell: sh
run: |
cd apk-repo/helm-charts
helm uninstall release-1 -n apk-release
kubectl get pods -n apk-release
kubectl get svc -n apk-release
- name: Delete AKS cluster
if: always()
uses: azure/CLI@v1
with:
azcliversion: 2.44.1
inlineScript: |
az aks delete --resource-group ${{ secrets.AZURE_RESOURCE_GROUP }} --name ${{ secrets.AKS_CLUSTER_NAME }}-${{ github.event.number || github.run_id }} --yes
- name: Logout from azure
if: always()
uses: azure/CLI@v1
with:
azcliversion: 2.44.1
inlineScript: |
az logout
- name: Publish Test Report
if: always()
uses: malinthaprasan/action-surefire-report@v1
with:
report_paths: 'apk-repo/test/postman-tests/build/*.xml'
fail_on_test_failures: true
fail_on_test_failures: true
4 changes: 2 additions & 2 deletions .github/workflows/trivy-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
schedule:
- cron: "0 20 * * *"
jobs:
scan-runtime-domain-service:
scan-config-deployer-service:
runs-on: ubuntu-latest
steps:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'wso2/runtime-domain-service:latest'
image-ref: 'wso2/config-deployer-service:latest'
format: 'table'
ignore-unfixed: true
vuln-type: 'os,library'
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ WSO2 API Kubernetes Platform has released following docker images in the WSO2 pu
* Adapter: [wso2/adapter:0.0.1-m12](https://hub.docker.com/r/wso2/adapter)
* Gateway Enforcer: [wso2/enforcer:0.0.1-m12](https://hub.docker.com/r/wso2/enforcer/tags)
* Gatewary Router: [wso2/router:0.0.1-m12](https://hub.docker.com/r/wso2/router)
* Runtime DS: [wso2/runtime-domain-service:0.0.1-m12](https://hub.docker.com/r/wso2/runtime-domain-service)
* IDP DS: [wso2/idp-domain-service:0.0.1-m12](https://hub.docker.com/r/wso2/devportal-domain-service)
* IDP UI: [wso2/idp-ui:0.0.1-m12](https://hub.docker.com/r/wso2/devportal-domain-service)
* Ratelimiter: [wso2/ratelimiter:0.0.1-m12](https://hub.docker.com/r/wso2/ratelimiter)
Expand Down
2 changes: 0 additions & 2 deletions build-apk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ current_dir=$PWD;
cd $current_dir;
cd common-bal-libs;./gradlew build;
cd $current_dir;
cd runtime/runtime-domain-service;./gradlew build;
cd $current_dir;
cd runtime/config-deployer-service;./gradlew build;
cd $current_dir;
cd adapter;./gradlew build;
Expand Down
3 changes: 0 additions & 3 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ flag_management:
- name: adapter
paths:
- '**/adapter/**'
- name: runtime-domain-service
paths:
- '**/runtime-domain-service/**'
- name: config-deployer-service
paths:
- '**/config-deployer-service/**'
Expand Down
Loading

0 comments on commit 1763522

Please sign in to comment.