-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add different tags for testing rolling updates
- Loading branch information
Showing
8 changed files
with
115 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh -xe | ||
|
||
target=${1:-out} | ||
name=${NAME:-hello} | ||
|
||
rm -rf $target | ||
mkdir -p $target | ||
cp index.html index.txt SourceSans3.ttf $target | ||
|
||
sed -i "s/build_version_note/${VERSION_NOTE:0:11}/" $target/index.* | ||
sed -i "s/build_emoji/${EMOJI:-👋}/" $target/index.* | ||
sed -i "s/build_hello/${HELLO:-Hello}/" $target/index.* | ||
|
||
tar -czvf hello-$name.tar.gz -C $target . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Temporary test files | ||
out.txt | ||
|
||
# Build outputs | ||
hello-*.tar.gz | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
FROM nginx:stable-alpine | ||
FROM alpine:latest as build | ||
|
||
# Should be set to "at $COMMIT_SHA" | ||
ARG VERSION_NOTE="" | ||
|
||
COPY index.html index.txt SourceSans3.ttf /usr/share/nginx/html/ | ||
RUN sed -i "s/docker_version_note/${VERSION_NOTE:0:11}/" /usr/share/nginx/html/index.* | ||
ARG EMOJI="👋" | ||
ARG HELLO="Hello" | ||
|
||
WORKDIR /work | ||
COPY .ci/build-index-files.sh index.* SourceSans3.ttf ./ | ||
RUN ./build-index-files.sh | ||
|
||
FROM nginx:stable-alpine | ||
|
||
RUN rm /etc/nginx/conf.d/* | ||
COPY index.conf /etc/nginx/conf.d/ | ||
|
||
COPY --from=build /work/out/* /usr/share/nginx/html/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Hello! 👋 | ||
build_hello! build_emoji | ||
|
||
Hostname: nginx_hostname | ||
Address: nginx_address | ||
|
||
UpCloudLtd / hello-container docker_version_note | ||
UpCloudLtd / hello-container build_version_note |