Skip to content

Commit 1b56efa

Browse files
committed
chore(helmbroker): bump new version
1 parent 658ba12 commit 1b56efa

8 files changed

Lines changed: 24 additions & 20 deletions

File tree

.woodpecker/test-linux.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ steps:
1111
- name: test-linux
1212
image: bash
1313
commands:
14-
- make test
14+
- make test upload-coverage
1515
secrets:
1616
- codename
1717
- dev_registry
18+
- codecov_token
1819
when:
1920
event:
2021
- push

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@ test-integration:
6161

6262
upload-coverage:
6363
$(eval CI_ENV := $(shell curl -s https://codecov.io/env | bash))
64-
podman run --rm ${CI_ENV} -v ${CURDIR}:/tmp/test -w /tmp/test/rootfs ${IMAGE}.test /tmp/test/rootfs/bin/upload-coverage
64+
podman run --rm ${CI_ENV} -v ${CURDIR}:/tmp/test -w /tmp/test/rootfs -e CODECOV_TOKEN=${CODECOV_TOKEN} ${IMAGE}.test /tmp/test/rootfs/bin/upload-coverage
6565

6666
.PHONY: check-kubectl check-podman build podman-build podman-build-test deploy clean commit-hook full-clean test test-style test-unit test-functional test-integration upload-coverage

rootfs/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ FROM registry.drycc.cc/drycc/base:${CODENAME}
44
ENV DRYCC_UID=1001 \
55
DRYCC_GID=1001 \
66
DRYCC_HOME_DIR=/workspace \
7-
PYTHON_VERSION="3.11" \
8-
HELM_VERSION="3.12.1" \
9-
KUBECTL_VERSION="1.27.3"
7+
PYTHON_VERSION="3.12" \
8+
HELM_VERSION="3.15.3" \
9+
KUBECTL_VERSION="1.30.3"
1010

1111
RUN groupadd drycc --gid ${DRYCC_GID} \
1212
&& useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR}

rootfs/Dockerfile.test

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ FROM registry.drycc.cc/drycc/base:${CODENAME}
44
ENV DRYCC_UID=1001 \
55
DRYCC_GID=1001 \
66
DRYCC_HOME_DIR=/workspace \
7-
PYTHON_VERSION="3.11" \
8-
HELM_VERSION="3.12.1" \
9-
KUBECTL_VERSION="1.27.3"
7+
PYTHON_VERSION="3.12" \
8+
HELM_VERSION="3.15.3" \
9+
KUBECTL_VERSION="1.30.3"
1010

1111
RUN groupadd drycc --gid ${DRYCC_GID} \
1212
&& useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR}
@@ -15,7 +15,9 @@ COPY . ${DRYCC_HOME_DIR}
1515
WORKDIR ${DRYCC_HOME_DIR}
1616

1717
RUN buildDeps='musl-dev'; \
18-
install-packages ${buildDeps} openssl ca-certificates \
18+
install-packages ${buildDeps} git openssl ca-certificates \
19+
&& curl -SsL https://cli.codecov.io/latest/$([ $(dpkg --print-architecture) == "arm64" ] && echo linux-arm64 || echo linux)/codecov -o /usr/local/bin/codecov \
20+
&& chmod +x /usr/local/bin/codecov \
1921
&& install-stack python ${PYTHON_VERSION} \
2022
&& install-stack helm ${HELM_VERSION} \
2123
&& install-stack kubectl ${KUBECTL_VERSION} && . init-stack \

rootfs/bin/test-unit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# This script is designed to be run inside the container
44
#
55

6-
python -m unittest tests/test_*.py
6+
coverage run -m unittest tests/test_*.py

rootfs/bin/upload-coverage

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@
66
# fail hard and fast even on pipelines
77
set -eou pipefail
88

9-
codecov --required
9+
coverage report -m > coverage.txt
10+
11+
if [[ -n $CODECOV_TOKEN ]]; then
12+
codecov upload-process --plugin=noop -t "$CODECOV_TOKEN"
13+
fi

rootfs/dev_requirements.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
# test module
22
# test
33
# Run "make test-unit" for the % of code exercised during tests
4-
coverage==7.2.7
4+
coverage==7.6.1
55

66
# Run "make test-style" to check python syntax and style
7-
flake8==6.0.0
8-
9-
# code coverage report at https://codecov.io/github/drycc/controller
10-
codecov==2.1.13
7+
flake8==7.1.1
118

129
# mock out python-requests, mostly k8s
13-
requests-mock==1.11.0
10+
requests-mock==1.12.1

rootfs/helmbroker/tasks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def provision(instance_id: str, details: ProvisionDetails):
6161
if addon_values_file:
6262
args.insert(9, "-f")
6363
args.insert(10, addon_values_file)
64-
logger.debug(f"helm install parameters :{details.parameters}")
64+
logger.debug(f"helm install parameters: {details.parameters}")
6565
args = format_params_to_helm_args(instance_id, details.parameters, args)
66-
logger.debug(f"helm install args:{args}")
66+
logger.debug(f"helm install args: {args}")
6767
status, output = helm(instance_id, *args)
6868
if status != 0:
6969
data["last_operation"]["state"] = OperationState.FAILED.value
@@ -118,7 +118,7 @@ def update(instance_id: str, details: UpdateDetails):
118118
params = data['details']['parameters']
119119
logger.debug(f"helm upgrade parameters: {params}")
120120
args = format_params_to_helm_args(instance_id, params, args)
121-
logger.debug(f"helm upgrade args:{args}")
121+
logger.debug(f"helm upgrade args: {args}")
122122
status, output = helm(instance_id, *args)
123123
if status != 0:
124124
data["last_operation"]["state"] = OperationState.FAILED.value

0 commit comments

Comments
 (0)