Compare commits

...

4 Commits

Author SHA1 Message Date
Steven Kang
b46bdac85b chore: bump 2.27.1 - rel 227 (#469) 2025-02-27 11:26:22 +13:00
Oscar Zhou
52afa6cf67 fix(libstack): miss to read default .env file [BE-11638] (#460) 2025-02-26 13:00:36 +13:00
Steven Kang
1abb77aea5 fix: cve-2024-50338 - release 2.27 (#462) 2025-02-25 12:55:52 +13:00
Steven Kang
ab824da5d7 chore: bump version to 2.27.0 - release 2.27 (#446) 2025-02-20 09:42:54 +13:00
7 changed files with 27 additions and 9 deletions

View File

@@ -95,6 +95,8 @@ body:
description: We only provide support for current versions of Portainer as per the lifecycle policy linked above. If you are on an older version of Portainer we recommend [upgrading first](https://docs.portainer.io/start/upgrade) in case your bug has already been fixed.
multiple: false
options:
- '2.27.1'
- '2.27.0'
- '2.26.1'
- '2.26.0'
- '2.25.1'

View File

@@ -610,7 +610,7 @@
"RequiredPasswordLength": 12
},
"KubeconfigExpiry": "0",
"KubectlShellImage": "portainer/kubectl-shell:2.27.0-rc3",
"KubectlShellImage": "portainer/kubectl-shell:2.27.1",
"LDAPSettings": {
"AnonymousMode": true,
"AutoCreateUsers": true,
@@ -943,7 +943,7 @@
}
],
"version": {
"VERSION": "{\"SchemaVersion\":\"2.27.0-rc3\",\"MigratorCount\":0,\"Edition\":1,\"InstanceID\":\"463d5c47-0ea5-4aca-85b1-405ceefee254\"}"
"VERSION": "{\"SchemaVersion\":\"2.27.1\",\"MigratorCount\":0,\"Edition\":1,\"InstanceID\":\"463d5c47-0ea5-4aca-85b1-405ceefee254\"}"
},
"webhooks": null
}

View File

@@ -81,7 +81,7 @@ type Handler struct {
}
// @title PortainerCE API
// @version 2.26.0
// @version 2.27.1
// @description.markdown api-description.md
// @termsOfService

View File

@@ -1637,7 +1637,7 @@ type (
const (
// APIVersion is the version number of the Portainer API
APIVersion = "2.27.0-rc3"
APIVersion = "2.27.1"
// Support annotation for the API version ("STS" for Short-Term Support or "LTS" for Long-Term Support)
APIVersionSupport = "LTS"
// Edition is what this edition of Portainer is called

View File

@@ -2,5 +2,5 @@
"docker": "v27.5.1",
"helm": "v3.17.0",
"kubectl": "v1.32.1",
"mingit": "2.47.0.1"
"mingit": "2.48.1.1"
}

View File

@@ -2,7 +2,7 @@
"author": "Portainer.io",
"name": "portainer",
"homepage": "http://portainer.io",
"version": "2.26.0",
"version": "2.27.1",
"repository": {
"type": "git",
"url": "git@github.com:portainer/portainer.git"

View File

@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"maps"
"os"
"path/filepath"
"slices"
"strconv"
@@ -87,7 +88,7 @@ func withComposeService(
return composeFn(composeService, nil)
}
env, err := parseEnvironment(options)
env, err := parseEnvironment(options, filePaths)
if err != nil {
return err
}
@@ -326,7 +327,7 @@ func addServiceLabels(project *types.Project, oneOff bool, edgeStackID portainer
}
}
func parseEnvironment(options libstack.Options) (map[string]string, error) {
func parseEnvironment(options libstack.Options, filePaths []string) (map[string]string, error) {
env := make(map[string]string)
for _, envLine := range options.Env {
@@ -339,7 +340,22 @@ func parseEnvironment(options libstack.Options) (map[string]string, error) {
}
if options.EnvFilePath == "" {
return env, nil
if len(filePaths) == 0 {
return env, nil
}
defaultDotEnv := filepath.Join(filepath.Dir(filePaths[0]), ".env")
s, err := os.Stat(defaultDotEnv)
if os.IsNotExist(err) {
return env, nil
}
if err != nil {
return env, err
}
if s.IsDir() {
return env, nil
}
options.EnvFilePath = defaultDotEnv
}
e, err := dotenv.GetEnvFromFile(make(map[string]string), []string{options.EnvFilePath})