Skip to content

Commit 5ba7a63

Browse files
committed
fix(woodpecker): secrets is deprecated
1 parent cb857b7 commit 5ba7a63

4 files changed

Lines changed: 40 additions & 20 deletions

File tree

.woodpecker/build-linux.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,22 @@ steps:
1414
- export VERSION=$([ -z $CI_COMMIT_TAG ] && echo latest || echo $CI_COMMIT_TAG)-$(sed 's#/#-#g' <<< $CI_SYSTEM_PLATFORM)
1515
- echo $CONTAINER_PASSWORD | podman login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
1616
- make podman-build podman-immutable-push
17-
secrets:
18-
- codename
19-
- dev_registry
20-
- drycc_registry
21-
- container_username
22-
- container_password
17+
environment:
18+
CODENAME:
19+
from_secret: codename
20+
DEV_REGISTRY:
21+
from_secret: dev_registry
22+
DRYCC_REGISTRY:
23+
from_secret: drycc_registry
24+
CONTAINER_USERNAME:
25+
from_secret: container_username
26+
CONTAINER_PASSWORD:
27+
from_secret: container_password
2328
when:
2429
event:
2530
- push
2631
- tag
32+
- cron
2733

2834
depends_on:
2935
- test-linux

.woodpecker/chart.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,20 @@ steps:
1414
- helm package -u charts/$${CI_REPO_NAME} --version $CHART_VERSION --app-version $APP_VERSION
1515
- echo $CONTAINER_PASSWORD | helm registry login $DRYCC_REGISTRY -u $CONTAINER_USERNAME --password-stdin
1616
- helm push $${CI_REPO_NAME}-$CHART_VERSION.tgz oci://$DRYCC_REGISTRY/$([ -z $CI_COMMIT_TAG ] && echo charts-testing || echo charts)
17-
secrets:
18-
- dev_registry
19-
- drycc_registry
20-
- container_username
21-
- container_password
17+
environment:
18+
DEV_REGISTRY:
19+
from_secret: dev_registry
20+
DRYCC_REGISTRY:
21+
from_secret: drycc_registry
22+
CONTAINER_USERNAME:
23+
from_secret: container_username
24+
CONTAINER_PASSWORD:
25+
from_secret: container_password
2226
when:
2327
event:
2428
- push
2529
- tag
30+
- cron
2631

2732
depends_on:
2833
- manifest

.woodpecker/manifest.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ steps:
88
commands:
99
- sed -i "s/{{project}}/$${CI_REPO_NAME}/g" .woodpecker/manifest.tmpl
1010
- sed -i "s/registry.drycc.cc/$${DRYCC_REGISTRY}/g" .woodpecker/manifest.tmpl
11-
secrets:
12-
- drycc_registry
11+
environment:
12+
DRYCC_REGISTRY:
13+
from_secret: drycc_registry
1314
when:
1415
event:
1516
- tag
1617
- push
18+
- cron
1719

1820
- name: publish-manifest
1921
image: bash
@@ -26,13 +28,16 @@ steps:
2628
-v $(pwd):$(pwd)
2729
-w $(pwd)
2830
plugins/manifest
29-
secrets:
30-
- container_username
31-
- container_password
31+
environment:
32+
CONTAINER_USERNAME:
33+
from_secret: container_username
34+
CONTAINER_PASSWORD:
35+
from_secret: container_password
3236
when:
3337
event:
3438
- tag
3539
- push
40+
- cron
3641

3742
depends_on:
3843
- build-linux

.woodpecker/test-linux.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ steps:
1212
image: bash
1313
commands:
1414
- make test
15-
secrets:
16-
- codename
17-
- dev_registry
18-
- codecov_token
15+
environment:
16+
CODENAME:
17+
from_secret: codename
18+
DEV_REGISTRY:
19+
from_secret: dev_registry
20+
CODECOV_TOKEN:
21+
from_secret: codecov_token
1922
when:
2023
event:
2124
- push
2225
- tag
26+
- cron

0 commit comments

Comments
 (0)