diff --git a/first-class-pipeline/src/com/freeleaps/devops/DependenciesResolver.groovy b/first-class-pipeline/src/com/freeleaps/devops/DependenciesResolver.groovy index 578a2ec3..8abf32ac 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/DependenciesResolver.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/DependenciesResolver.groovy @@ -52,7 +52,24 @@ class DependenciesResolver { switch (mgr) { case DependenciesManager.PIP: - steps.log.warn("Dependencies Resolver","Python project no need to resolving dependencies, skipping...") + if (configurations.requirementsFile == null || configurations.requirementsFile.isEmpty()) { + steps.error("requirementsFile is required when using PIP as dependencies manager") + } + + def requirementsFile = configurations.requirementsFile + + if (cachingEnabled) { + steps.dir(this.workspace) { + steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', cacheName: "${component.name}-pip-cache", includes: '**/*', path: '.pip-cache', cacheValidityDecidingFile: 'requirements.txt']]) { + steps.sh "pip install --cache-dir .pip-cache -r ${requirementsFile}" + } + } + } else { + steps.dir(this.workspace) { + steps.sh "pip install -r ${requirementsFile}" + } + } + break case DependenciesManager.NPM: if (configurations.npmPackageJsonFile == null || configurations.npmPackageJsonFile.isEmpty()) { @@ -65,7 +82,7 @@ class DependenciesResolver { if (cachingEnabled) { steps.dir(this.workspace) { - steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', includes: '**/*', path: '.npm-cache', cacheValidityDecidingFile: 'package-lock.json']]) { + steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', cacheName: "${component.name}-npm-cache", includes: '**/*', path: '.npm-cache', cacheValidityDecidingFile: 'package-lock.json']]) { steps.sh "npm install --cache .npm-cache --prefer-offline --no-audit" } } @@ -87,7 +104,7 @@ class DependenciesResolver { if (cachingEnabled) { steps.dir(this.workspace) { - steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', includes: '**/*', path: '.yarn-cache', cacheValidityDecidingFile: 'yarn.lock']]) { + steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', includes: '**/*', cacheName: "${component.name}-pnpm-cache", path: '.yarn-cache', cacheValidityDecidingFile: 'yarn.lock']]) { steps.sh "yarn install --cache-folder .yarn-cache --prefer-offline" } } diff --git a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy index 5558bf4b..0548386f 100644 --- a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy +++ b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy @@ -633,7 +633,7 @@ def call(Closure closure) { agent any options { buildDiscarder(logRotator(numToKeepStr: '25')) - timeout(time: 30, unit: 'MINUTES') + timeout(time: 120, unit: 'MINUTES') parallelsAlwaysFailFast() } diff --git a/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile b/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile index 19018ff7..fa687fee 100644 --- a/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile +++ b/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile @@ -15,6 +15,7 @@ executeFreeleapsPipeline { root: 'apps/authentication', language: 'python', dependenciesManager: 'pip', + requirementsFile: 'requirements.txt', buildCacheEnabled: true, buildAgentImage: 'python:3.10-slim-buster', buildArtifacts: ['.'], @@ -35,6 +36,7 @@ executeFreeleapsPipeline { root: 'apps/central_storage', language: 'python', dependenciesManager: 'pip', + requirementsFile: 'requirements.txt', buildAgentImage: 'python:3.10-slim-buster', buildArtifacts: ['.'], buildCacheEnabled: true, @@ -55,6 +57,7 @@ executeFreeleapsPipeline { root: 'apps/content', language: 'python', dependenciesManager: 'pip', + requirementsFile: 'requirements.txt', buildAgentImage: 'python:3.10-slim-buster', buildArtifacts: ['.'], buildCacheEnabled: true, @@ -75,6 +78,7 @@ executeFreeleapsPipeline { root: 'apps/notification', language: 'python', dependenciesManager: 'pip', + requirementsFile: 'requirements.txt', buildAgentImage: 'python:3.10-slim-buster', buildArtifacts: ['.'], buildCacheEnabled: true, @@ -95,6 +99,7 @@ executeFreeleapsPipeline { root: 'apps/payment', language: 'python', dependenciesManager: 'pip', + requirementsFile: 'requirements.txt', buildAgentImage: 'python:3.10-slim-buster', buildArtifacts: ['.'], buildCacheEnabled: true, diff --git a/freeleaps/helm-pkg/central-storage/values.alpha.yaml b/freeleaps/helm-pkg/central-storage/values.alpha.yaml index 162055ed..d321de72 100644 --- a/freeleaps/helm-pkg/central-storage/values.alpha.yaml +++ b/freeleaps/helm-pkg/central-storage/values.alpha.yaml @@ -8,7 +8,7 @@ central-storage: registry: docker.io repository: null name: central_storage - tag: snapshot-da584b8 + tag: 0.0.0 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/content/values.alpha.yaml b/freeleaps/helm-pkg/content/values.alpha.yaml index 288bdae1..93b6d097 100644 --- a/freeleaps/helm-pkg/content/values.alpha.yaml +++ b/freeleaps/helm-pkg/content/values.alpha.yaml @@ -8,7 +8,7 @@ content: registry: docker.io repository: null name: content - tag: snapshot-da584b8 + tag: 0.0.0 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/notification/values.alpha.yaml b/freeleaps/helm-pkg/notification/values.alpha.yaml index 20f7fafe..7a19c8cb 100644 --- a/freeleaps/helm-pkg/notification/values.alpha.yaml +++ b/freeleaps/helm-pkg/notification/values.alpha.yaml @@ -8,7 +8,7 @@ notification: registry: docker.io repository: null name: notification - tag: snapshot-da584b8 + tag: 0.0.0 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/payment/values.alpha.yaml b/freeleaps/helm-pkg/payment/values.alpha.yaml index 696f5461..ef9affc1 100644 --- a/freeleaps/helm-pkg/payment/values.alpha.yaml +++ b/freeleaps/helm-pkg/payment/values.alpha.yaml @@ -27,7 +27,24 @@ payment: type: ClusterIP port: 8006 targetPort: 8006 - ingresses: {} + ingresses: + - name: payment-ingress + host: alpha.payment.freeleaps.mathmast.com + class: nginx + rules: + - path: /* + pathType: ImplementationSpecific + backend: + service: + name: payment-service + port: + number: 8006 + tls: + exists: false + issuerRef: + name: mathmast-dot-com + kind: ClusterIssuer + name: alpha.payment.freeleaps.mathmast.com-cert configs: tz: America/Settle appName: payment