Compare commits

...

15 Commits
0.0.2 ... main

Author SHA1 Message Date
8eeea51f71 Merge pull request 'Specifying namespace in deployment' (#9) from release/0.0.3 into main
Reviewed-on: #9
2024-06-22 13:35:24 +00:00
dc897a5464 Specifying namespace in deployment
Some checks failed
package-builder / build (push) Failing after 2s
go-builder / build (push) Failing after 2s
2024-06-22 09:32:18 -04:00
5c91325772 Merge pull request 'Testing multi-stage build and single file docker image' (#8) from release/0.0.3 into main
Reviewed-on: #8
2024-06-22 00:14:51 +00:00
c7250311cf Testing multi-stage build and single file docker image
All checks were successful
package-builder / build (push) Successful in 1m59s
go-builder / build (push) Successful in 35s
2024-06-21 17:38:01 -04:00
6a21114ffb Merge pull request 'Updating key variable' (#7) from release/0.0.2 into main
Reviewed-on: #7
2024-04-11 23:39:50 +00:00
f34b6512ad Updating key variable
Some checks failed
package-builder / build (push) Successful in 1m58s
go-builder / build (push) Failing after 2s
2024-04-11 19:39:32 -04:00
cfa483a011 Merge pull request 'release/0.0.2' (#6) from release/0.0.2 into main
Reviewed-on: #6
2024-04-11 22:44:41 +00:00
f9f1dd6264 noop change
Some checks failed
package-builder / build (push) Successful in 2m1s
go-builder / build (push) Failing after 2s
2024-04-11 18:43:54 -04:00
98d38b94b2 noop change
Some checks failed
package-builder / build (push) Failing after 26s
go-builder / build (push) Failing after 8s
2024-04-11 18:37:58 -04:00
cacddb9037 Removing debug statement
Some checks failed
go-builder / build (push) Failing after 10s
package-builder / build (push) Successful in 2m1s
2024-04-06 21:10:29 -04:00
d5c73e8df6 Merge pull request 'release/0.0.2' (#5) from release/0.0.2 into main
Reviewed-on: #5
2024-04-05 23:41:07 +00:00
3bbfbdcc92 Version bump
Some checks failed
go-builder / build (push) Failing after 4s
package-builder / build (push) Failing after 4m27s
2024-04-05 19:40:42 -04:00
56d18e9dae Adding a wait state
Some checks failed
go-builder / build (push) Failing after 5s
package-builder / build (push) Has been cancelled
2024-04-05 19:35:48 -04:00
410e8b09f6 Updating runner to use correct image
Some checks failed
go-builder / build (push) Successful in 1m6s
package-builder / build (push) Failing after 37s
2024-04-05 19:29:42 -04:00
730813261b Updating README 2024-04-05 19:28:43 -04:00
5 changed files with 20 additions and 16 deletions

View File

@ -9,12 +9,12 @@ jobs:
build:
runs-on: kcrawford/dind
container:
image: kcrawford/dind:0.0.1
image: kcrawford/dind:0.0.2
steps:
- name: Clone
run: |
mkdir -p ~/.ssh
echo "${{ secrets.PI_GIT_KEY }}" | tr -d '\r' > ~/.ssh/id_ed25519
echo "${{ secrets.LOCAL_SSH_KEY }}" | tr -d '\r' > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan git.kcrawford.net >> ~/.ssh/known_hosts
git clone --branch ${GITHUB_REF_NAME} git@git.kcrawford.net:${{env.GITHUB_REPOSITORY}}.git .
@ -28,5 +28,6 @@ jobs:
- name: Build
run: |
#while true; do sleep 180; done
docker buildx create --use
docker buildx build --no-cache --platform linux/amd64,linux/arm64 --output type=registry -t git.kcrawford.net/kcrawford/$(basename $(pwd)):${GITHUB_REF##*/} .

View File

@ -7,14 +7,14 @@ on:
jobs:
build:
runs-on: gobuilder
runs-on: kcrawford/gobuilder
container:
image: gobuilder:0.0.5
image: kcrawford/gobuilder:0.0.5
steps:
- name: Clone
run: |
mkdir -p ~/.ssh
echo "${{ secrets.PI_GIT_KEY }}" | tr -d '\r' > ~/.ssh/id_ed25519
echo "${{ secrets.LOCAL_SSH_KEY }}" | tr -d '\r' > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan git.kcrawford.net >> ~/.ssh/known_hosts
git clone --branch ${GITHUB_REF_NAME} git@git.kcrawford.net:${{env.GITHUB_REPOSITORY}}.git .

View File

@ -1,10 +1,8 @@
# specify the base image to be used for the application
FROM golang:1.21.4-alpine
# Build stage
FROM golang:1.21.4-alpine AS builder
# create the working directory in the image
WORKDIR /app
# copy Go modules and dependencies to image
COPY go.mod ./
# download Go modules and dependencies
@ -13,11 +11,14 @@ RUN go mod download
# copy all the Go files ending with .go extension
COPY *.go ./
# compile application
RUN go build -o /golang-http-header
RUN go build -o golang-http-header
# Final stage
FROM scratch
COPY --from=builder /app/golang-http-header /
# network port at runtime
EXPOSE 8000
# execute when the container starts
CMD [ "/golang-http-header" ]
CMD ["/golang-http-header"]

View File

@ -1 +1,2 @@
noop
# Intro
Creates a Pod that listens on port 8000/tcp and responds to GET requests with the hostname of the machine running the Pod.

View File

@ -8,6 +8,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: http-header
namespace: golang
labels:
app: golang
spec:
@ -22,7 +23,7 @@ spec:
spec:
containers:
- name: http-header
image: git.kcrawford.net/kcrawford/golang-http-header:0.0.5
image: git.kcrawford.net/kcrawford/golang-http-header:0.0.3
ports:
- containerPort: 8000