forked from lucaslorentz/caddy-docker-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-images-windows.sh
executable file
·52 lines (40 loc) · 2.44 KB
/
build-images-windows.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -e
docker build -f Dockerfile-nanoserver . \
--build-arg TARGETPLATFORM=windows/amd64 \
--build-arg SERVERCORE_VERSION=1809 \
--build-arg NANOSERVER_VERSION=1809 \
-t lucaslorentz/caddy-docker-proxy:ci-nanoserver-1809
docker build -f Dockerfile-nanoserver . \
--build-arg TARGETPLATFORM=windows/amd64 \
--build-arg SERVERCORE_VERSION=ltsc2022 \
--build-arg NANOSERVER_VERSION=ltsc2022 \
-t lucaslorentz/caddy-docker-proxy:ci-nanoserver-ltsc2022
if [[ "${BUILD_SOURCEBRANCH}" == "refs/heads/master" ]]; then
echo "Pushing CI images"
docker login -u lucaslorentz -p "$DOCKER_PASSWORD"
docker push lucaslorentz/caddy-docker-proxy:ci-nanoserver-1809
docker push lucaslorentz/caddy-docker-proxy:ci-nanoserver-ltsc2022
fi
if [[ "${BUILD_SOURCEBRANCH}" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$ ]]; then
RELEASE_VERSION=$(echo $BUILD_SOURCEBRANCH | cut -c11-)
echo "Releasing version ${RELEASE_VERSION}..."
docker login -u lucaslorentz -p "$DOCKER_PASSWORD"
PATCH_VERSION=$(echo $RELEASE_VERSION | cut -c2-)
MINOR_VERSION=$(echo $PATCH_VERSION | cut -d. -f-2)
docker login -u lucaslorentz -p "$DOCKER_PASSWORD"
# nanoserver-1809
docker tag lucaslorentz/caddy-docker-proxy:ci-nanoserver-1809 lucaslorentz/caddy-docker-proxy:nanoserver-1809
docker tag lucaslorentz/caddy-docker-proxy:ci-nanoserver-1809 lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}-nanoserver-1809
docker tag lucaslorentz/caddy-docker-proxy:ci-nanoserver-1809 lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}-nanoserver-1809
docker push lucaslorentz/caddy-docker-proxy:nanoserver-1809
docker push lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}-nanoserver-1809
docker push lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}-nanoserver-1809
# nanoserver-ltsc2022
docker tag lucaslorentz/caddy-docker-proxy:ci-nanoserver-ltsc2022 lucaslorentz/caddy-docker-proxy:nanoserver-ltsc2022
docker tag lucaslorentz/caddy-docker-proxy:ci-nanoserver-ltsc2022 lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}-nanoserver-ltsc2022
docker tag lucaslorentz/caddy-docker-proxy:ci-nanoserver-ltsc2022 lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}-nanoserver-ltsc2022
docker push lucaslorentz/caddy-docker-proxy:nanoserver-ltsc2022
docker push lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}-nanoserver-ltsc2022
docker push lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}-nanoserver-ltsc2022
fi