From a5a9c9ec4335e52c171e625cfef08cf0b5a663f5 Mon Sep 17 00:00:00 2001 From: Marcin-Ramotowski Date: Sat, 2 Aug 2025 14:06:57 +0200 Subject: [PATCH] Removed unused files and not needed subdirs --- Jenkinsfile | 72 ------------------- .../{webhook => }/eventbus-default.yaml | 0 .../old-account/argo-serviceAccount.yaml | 5 -- .../argo-workflow-manager-role.yaml | 12 ---- argo-workflows/old-account/role-binding.yaml | 13 ---- argo-workflows/{webhook => }/permissions.yaml | 0 argo-workflows/{webhook => }/sensor.yaml | 0 argo-workflows/{webhook => }/source.yaml | 0 .../{webhook => }/webhook-ingress.yaml | 0 .../{webhook => }/webhook-service.yaml | 0 goss.yaml | 8 --- 11 files changed, 110 deletions(-) delete mode 100644 Jenkinsfile rename argo-workflows/{webhook => }/eventbus-default.yaml (100%) delete mode 100644 argo-workflows/old-account/argo-serviceAccount.yaml delete mode 100644 argo-workflows/old-account/argo-workflow-manager-role.yaml delete mode 100644 argo-workflows/old-account/role-binding.yaml rename argo-workflows/{webhook => }/permissions.yaml (100%) rename argo-workflows/{webhook => }/sensor.yaml (100%) rename argo-workflows/{webhook => }/source.yaml (100%) rename argo-workflows/{webhook => }/webhook-ingress.yaml (100%) rename argo-workflows/{webhook => }/webhook-service.yaml (100%) delete mode 100644 goss.yaml diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 2aa9b93..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,72 +0,0 @@ -pipeline { - agent any - environment { - DOCKER_REGISTRY_URL = 'marcin00.azurecr.io' - DOCKER_IMAGE = "${DOCKER_REGISTRY_URL}/user-microservice:${GIT_COMMIT}" - ACR_NAME = 'marcin00' - } - stages { - stage('Checkout') { - steps { - checkout scm - } - } - stage('Test python app') { - steps { - script { - dir('api') { - sh ''' - python3 -m venv env - source env/bin/activate - pip install -r requirements.txt pytest - python3 -m pytest --junit-xml=pytest_junit.xml - ''' - } - } - } - post { - always { - junit testResults: '**/*pytest_junit.xml' - } - } - } - stage('Build & test docker image') { - steps { - script { - appImage = docker.build("${DOCKER_IMAGE}") - - sh label: 'Install dgoss', script: ''' - curl -s -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o goss - curl -s -L https://github.com/aelsabbahy/goss/releases/latest/download/dgoss -o dgoss - chmod +rx *goss - ''' - - withEnv(['GOSS_OPTS=-f junit', 'GOSS_PATH=./goss', 'GOSS_SLEEP=3', 'SQLALCHEMY_DATABASE_URI=sqlite:///:memory:']) { - sh label: 'run image tests', script: './dgoss run -e SQLALCHEMY_DATABASE_URI=sqlite:///:memory: ${DOCKER_IMAGE} > goss_junit.xml' - } - } - } - post { - always { - junit testResults: '**/*goss_junit.xml' - } - } - } - stage('Deploy') { - steps { - script { - sh ''' - az login --identity - az acr login --name ${ACR_NAME} - docker push ${DOCKER_IMAGE} - ''' - } - } - } - } - post { - cleanup { - script { cleanWs() } - } - } -} diff --git a/argo-workflows/webhook/eventbus-default.yaml b/argo-workflows/eventbus-default.yaml similarity index 100% rename from argo-workflows/webhook/eventbus-default.yaml rename to argo-workflows/eventbus-default.yaml diff --git a/argo-workflows/old-account/argo-serviceAccount.yaml b/argo-workflows/old-account/argo-serviceAccount.yaml deleted file mode 100644 index a68cb2a..0000000 --- a/argo-workflows/old-account/argo-serviceAccount.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: argo-workflows-user - namespace: argo diff --git a/argo-workflows/old-account/argo-workflow-manager-role.yaml b/argo-workflows/old-account/argo-workflow-manager-role.yaml deleted file mode 100644 index 1a264d2..0000000 --- a/argo-workflows/old-account/argo-workflow-manager-role.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - namespace: argo - name: argo-workflow-manager -rules: - - apiGroups: ["argoproj.io"] - resources: ["workflowtaskresults"] - verbs: ["create", "get", "list", "update", "patch", "delete"] - - apiGroups: ["argoproj.io"] - resources: ["workflows"] - verbs: ["create", "get", "list", "update", "patch", "delete"] diff --git a/argo-workflows/old-account/role-binding.yaml b/argo-workflows/old-account/role-binding.yaml deleted file mode 100644 index f1adf80..0000000 --- a/argo-workflows/old-account/role-binding.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: argo-workflows-role-binding - namespace: argo -subjects: - - kind: ServiceAccount - name: argo-workflows-user - namespace: argo -roleRef: - kind: Role - name: argo-workflow-manager - apiGroup: rbac.authorization.k8s.io diff --git a/argo-workflows/webhook/permissions.yaml b/argo-workflows/permissions.yaml similarity index 100% rename from argo-workflows/webhook/permissions.yaml rename to argo-workflows/permissions.yaml diff --git a/argo-workflows/webhook/sensor.yaml b/argo-workflows/sensor.yaml similarity index 100% rename from argo-workflows/webhook/sensor.yaml rename to argo-workflows/sensor.yaml diff --git a/argo-workflows/webhook/source.yaml b/argo-workflows/source.yaml similarity index 100% rename from argo-workflows/webhook/source.yaml rename to argo-workflows/source.yaml diff --git a/argo-workflows/webhook/webhook-ingress.yaml b/argo-workflows/webhook-ingress.yaml similarity index 100% rename from argo-workflows/webhook/webhook-ingress.yaml rename to argo-workflows/webhook-ingress.yaml diff --git a/argo-workflows/webhook/webhook-service.yaml b/argo-workflows/webhook-service.yaml similarity index 100% rename from argo-workflows/webhook/webhook-service.yaml rename to argo-workflows/webhook-service.yaml diff --git a/goss.yaml b/goss.yaml deleted file mode 100644 index b59e9af..0000000 --- a/goss.yaml +++ /dev/null @@ -1,8 +0,0 @@ -port: - tcp:80: - listening: true - ip: - - 0.0.0.0 -process: - python3: - running: true