Skip to content

Commit

Permalink
rename K8S_VERSION_FROM_DRONE to K8S_VERSION_FROM_CI
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Lamarre <[email protected]>
  • Loading branch information
alexandreLamarre committed Apr 11, 2024
1 parent f011da1 commit 25859b2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ steps:
- name: build
image: rancher/dapper:v0.6.0
commands:
- export K8S_VERSION_FROM_DRONE="v1.24"
- export K8S_VERSION_FROM_CI="v1.24"
- dapper ci
volumes:
- name: docker
Expand All @@ -21,7 +21,7 @@ steps:
- name: build_no_psp
image: rancher/dapper:v0.6.0
commands:
- export K8S_VERSION_FROM_DRONE="stable"
- export K8S_VERSION_FROM_CI="stable"
- dapper ci
volumes:
- name: docker
Expand Down Expand Up @@ -129,7 +129,7 @@ steps:
- name: build
image: rancher/dapper:v0.6.0
commands:
- export K8S_VERSION_FROM_DRONE="v1.24"
- export K8S_VERSION_FROM_CI="v1.24"
- dapper ci
volumes:
- name: docker
Expand All @@ -138,7 +138,7 @@ steps:
- name: build_no_psp
image: rancher/dapper:v0.6.0
commands:
- export K8S_VERSION_FROM_DRONE="stable"
- export K8S_VERSION_FROM_CI="stable"
- dapper ci
volumes:
- name: docker
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
runs-on : ubuntu-latest
strategy:
matrix:
K8S_VERSION_FROM_CI : ["v1.24","stable"]
include:
- platform: linux/amd64
- platform: linux/arm64
Expand All @@ -24,4 +25,4 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name : CI
run : make ci
run : make ci
6 changes: 3 additions & 3 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ ENV K3S_BINARY_amd64=k3s \
K3S_BINARY_arm64=k3s-arm64 \
K3S_BINARY=K3S_BINARY_${ARCH}

ARG K8S_VERSION_FROM_DRONE
ENV K8S_VERSION $K8S_VERSION_FROM_DRONE
ARG K8S_VERSION_FROM_CI
ENV K8S_VERSION $K8S_VERSION_FROM_CI

RUN if [ -z "${K8S_VERSION}" ]; then export K8S_VERSION="v1.24" && echo $(date +%s%N); fi
# ENV K8S_VERSION="${K8S_VERSION_FROM_DRONE:-'v1.24'}"
# ENV K8S_VERSION="${K8S_VERSION_FROM_CI:-'v1.24'}"

RUN echo "${K8S_VERSION}"

Expand Down
4 changes: 2 additions & 2 deletions scripts/package
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ if [ -e ${DOCKERFILE}.${ARCH} ]; then
fi

if [[ ${USE_DOCKER_BUILDX} -eq 1 ]]; then
docker buildx build --build-arg K8S_VERSION_FROM_DRONE="${K8S_VERSION}" --platform linux/amd64 -f ${DOCKERFILE} . -t ${IMAGE}
docker buildx build --build-arg K8S_VERSION_FROM_CI="${K8S_VERSION}" --platform linux/amd64 -f ${DOCKERFILE} . -t ${IMAGE}
else
docker build --build-arg K8S_VERSION_FROM_DRONE="${K8S_VERSION}" -f ${DOCKERFILE} -t ${IMAGE} .
docker build --build-arg K8S_VERSION_FROM_CI="${K8S_VERSION}" -f ${DOCKERFILE} -t ${IMAGE} .
fi
echo Built ${IMAGE}

Expand Down

0 comments on commit 25859b2

Please sign in to comment.