Skip to content

Commit b364a9d

Browse files
committed
chre(helmbroker): add codename build-arg
1 parent f95a774 commit b364a9d

7 files changed

Lines changed: 23 additions & 22 deletions

File tree

.woodpecker/build-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pipeline:
1616
- echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
1717
- make docker-build docker-immutable-push
1818
secrets:
19+
- codename
1920
- dev_registry
2021
- drycc_registry
2122
- container_username

.woodpecker/test-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pipeline:
1414
commands:
1515
- make test
1616
secrets:
17+
- codename
1718
- dev_registry
1819
when:
1920
event:

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ check-docker:
2828
build: docker-build
2929

3030
docker-build: check-docker
31-
docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} rootfs
31+
docker build ${DOCKER_BUILD_FLAGS} --build-arg CODENAME=${CODENAME} -t ${IMAGE} rootfs
3232
docker tag ${IMAGE} ${MUTABLE_IMAGE}
3333

3434
docker-buildx: check-docker
35-
docker buildx build --platform ${PLATFORM} -t ${IMAGE} rootfs --push
35+
docker buildx build --build-arg CODENAME=${CODENAME} --platform ${PLATFORM} -t ${IMAGE} rootfs --push
3636

3737
docker-build-test: check-docker
38-
docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE}.test -f rootfs/Dockerfile.test rootfs
38+
docker build ${DOCKER_BUILD_FLAGS} --build-arg CODENAME=${CODENAME} -t ${IMAGE}.test -f rootfs/Dockerfile.test rootfs
3939

4040
deploy: check-kubectl docker-build docker-push
4141
kubectl --namespace=drycc patch deployment drycc-$(COMPONENT) --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"$(IMAGE)"}]'

rootfs/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
FROM registry.drycc.cc/drycc/base:bullseye
1+
ARG CODENAME
2+
FROM registry.drycc.cc/drycc/base:${CODENAME}
23

34
ENV DRYCC_UID=1001 \
45
DRYCC_GID=1001 \
56
DRYCC_HOME_DIR=/workspace \
6-
PYTHON_VERSION="3.10.6" \
7-
HELM_VERSION="3.9.4" \
8-
KUBECTL_VERSION="1.25.0"
7+
PYTHON_VERSION="3.11" \
8+
HELM_VERSION="3.12.1" \
9+
KUBECTL_VERSION="1.27.3"
910

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

rootfs/Dockerfile.test

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
FROM registry.drycc.cc/drycc/base:bullseye
1+
ARG CODENAME
2+
FROM registry.drycc.cc/drycc/base:${CODENAME}
23

34
ENV DRYCC_UID=1001 \
45
DRYCC_GID=1001 \
56
DRYCC_HOME_DIR=/workspace \
6-
PYTHON_VERSION="3.10.6" \
7-
HELM_VERSION="3.9.4" \
8-
KUBECTL_VERSION="1.25.0"
7+
PYTHON_VERSION="3.11" \
8+
HELM_VERSION="3.12.1" \
9+
KUBECTL_VERSION="1.27.3"
910

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

rootfs/dev_requirements.txt

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

66
# Run "make test-style" to check python syntax and style
7-
flake8==3.8.3
7+
flake8==6.0.0
88

99
# code coverage report at https://codecov.io/github/drycc/controller
10-
codecov==2.1.9
10+
codecov==2.1.13
1111

1212
# mock out python-requests, mostly k8s
13-
requests-mock==1.8.0
14-
15-
# tail a log and pipe into tbgrep to find all tracebacks
16-
tbgrep==0.3.0
13+
requests-mock==1.11.0

rootfs/requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PyYAML==6.0
22
gunicorn==20.1.0
3-
openbrokerapi==4.1.2
4-
requests==2.28.1
5-
celery==5.2.7
6-
jsonschema==4.14.0
3+
openbrokerapi==4.5.5
4+
requests==2.31.0
5+
celery==5.3.1
6+
jsonschema==4.17.3

0 commit comments

Comments
 (0)