fix(wp): changes
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
nyyu 2023-12-27 10:28:40 +01:00
parent 366a72b7da
commit a17504136a
3 changed files with 0 additions and 69 deletions

View File

@ -10,13 +10,11 @@ pkgbase = woodpecker
makedepends = pnpm
options = !lto
source = git+https://github.com/woodpecker-ci/woodpecker.git#tag=v2.1.0
source = fix-encryption.patch
source = woodpecker-server.service
source = woodpecker-agent.service
source = agent.conf
source = server.conf
sha256sums = SKIP
sha256sums = 51ef81bb925ca4fa5db4ecacaa9377baf673454632aecd0485e3dac801d72647
sha256sums = 6e22e6939222aaad07311e37a086935ca32dd149c3688b2809db5f55df816516
sha256sums = 1081a646cf645bc09ddda8472cf9a341e545bf03f5738d56ae427b33806e538c
sha256sums = a6c2bdfc934e40a9636e7447ecd5bf7b200444116085cd7c69d304dfb822eba9

View File

@ -15,13 +15,11 @@ license=('Apache')
makedepends=('go' 'git' 'pnpm')
options=('!lto')
source=(git+https://github.com/woodpecker-ci/woodpecker.git#tag=v$pkgver
'fix-encryption.patch'
'woodpecker-server.service'
'woodpecker-agent.service'
'agent.conf'
'server.conf')
sha256sums=('SKIP'
'51ef81bb925ca4fa5db4ecacaa9377baf673454632aecd0485e3dac801d72647'
'6e22e6939222aaad07311e37a086935ca32dd149c3688b2809db5f55df816516'
'1081a646cf645bc09ddda8472cf9a341e545bf03f5738d56ae427b33806e538c'
'a6c2bdfc934e40a9636e7447ecd5bf7b200444116085cd7c69d304dfb822eba9'
@ -30,8 +28,6 @@ sha256sums=('SKIP'
prepare() {
cd "$pkgbase"
git am ../fix-encryption.patch
find web/src/assets/locales ! -name 'en.json' -type f -exec rm -f {} +
mkdir -p build-server build-agent build-cli

View File

@ -1,63 +0,0 @@
From e231fe4739b06e2cb4a4973d77ea7ca1c64b51db Mon Sep 17 00:00:00 2001
From: nyyu <mail@nyyu.dev>
Date: Sat, 25 Nov 2023 10:51:33 +0100
Subject: [PATCH] fix: encryption
---
cmd/server/server.go | 18 +++++++++---------
server/plugins/encryption/encryption.go | 2 ++
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/cmd/server/server.go b/cmd/server/server.go
index fae4f9b21..541544907 100644
--- a/cmd/server/server.go
+++ b/cmd/server/server.go
@@ -51,8 +51,8 @@ import (
"go.woodpecker-ci.org/woodpecker/server/web"
"go.woodpecker-ci.org/woodpecker/shared/constant"
"go.woodpecker-ci.org/woodpecker/version"
- // "go.woodpecker-ci.org/woodpecker/server/plugins/encryption"
- // encryptedStore "go.woodpecker-ci.org/woodpecker/server/plugins/encryption/wrapper/store"
+ "go.woodpecker-ci.org/woodpecker/server/plugins/encryption"
+ encryptedStore "go.woodpecker-ci.org/woodpecker/server/plugins/encryption/wrapper/store"
)
func run(c *cli.Context) error {
@@ -279,13 +279,13 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) {
// TODO(1544): fix encrypted store
// // encryption
- // encryptedSecretStore := encryptedStore.NewSecretStore(v)
- // err := encryption.Encryption(c, v).WithClient(encryptedSecretStore).Build()
- // if err != nil {
- // log.Fatal().Err(err).Msg("could not create encryption service")
- // }
- // server.Config.Services.Secrets = setupSecretService(c, encryptedSecretStore)
- server.Config.Services.Secrets = setupSecretService(c, v)
+ encryptedSecretStore := encryptedStore.NewSecretStore(v)
+ err := encryption.Encryption(c, v).WithClient(encryptedSecretStore).Build()
+ if err != nil {
+ log.Fatal().Err(err).Msg("could not create encryption service")
+ }
+ server.Config.Services.Secrets = setupSecretService(c, encryptedSecretStore)
+ //server.Config.Services.Secrets = setupSecretService(c, v)
server.Config.Services.Environ = setupEnvironService(c, v)
server.Config.Services.Membership = setupMembershipService(c, f)
diff --git a/server/plugins/encryption/encryption.go b/server/plugins/encryption/encryption.go
index f0e30db5c..8d9a1462c 100644
--- a/server/plugins/encryption/encryption.go
+++ b/server/plugins/encryption/encryption.go
@@ -56,7 +56,9 @@ func (b builder) Build() error {
if err != nil {
return fmt.Errorf(errTemplateFailedInitializingUnencrypted, err)
}
+ return nil
}
+
svc, err := b.getService(keyType)
if err != nil {
return fmt.Errorf(errTemplateFailedInitializing, err)
--
2.43.0