Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.5 test #1

Merged
merged 57 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
f3963c7
Image version 1.4.1
mrsabath Aug 8, 2023
75e104b
Bump actions/setup-go from 4.0.1 to 4.1.0 (#296)
dependabot[bot] Aug 15, 2023
5d92892
Bump golangci/golangci-lint-action from 3.6.0 to 3.7.0 (#297)
dependabot[bot] Aug 15, 2023
8afeed1
Bump actions/setup-node from 3.7.0 to 3.8.0 (#298)
dependabot[bot] Aug 16, 2023
644a593
Bump actions/checkout from 3.5.3 to 3.6.0 (#300)
dependabot[bot] Aug 29, 2023
615beac
Bump actions/setup-node from 3.8.0 to 3.8.1 (#299)
dependabot[bot] Sep 8, 2023
1ed5196
Introduce Docker files for running Tornjak on Openshift (#304)
mrsabath Sep 21, 2023
390aa15
Bump actions/checkout from 3.6.0 to 4.0.0 (#301)
dependabot[bot] Sep 22, 2023
dbe13bb
Bump docker/login-action from 2.2.0 to 3.0.0 (#302)
dependabot[bot] Sep 25, 2023
3f4772c
Bump actions/checkout from 4.0.0 to 4.1.0 (#305)
dependabot[bot] Sep 25, 2023
22c7c3e
Added workflows for ubi image (#306)
maia-iyer Sep 25, 2023
1ade029
workflow hotfix
maia-iyer Sep 25, 2023
1f647a4
Fixed image labels for UBI image (#308)
maia-iyer Sep 28, 2023
386bd0e
Bump golang.org/x/net from 0.9.0 to 0.17.0 (#309)
dependabot[bot] Oct 12, 2023
0b16023
Add UBI description (#310)
maia-iyer Oct 12, 2023
0aa93e3
Change version to v1.4.2
maia-iyer Oct 12, 2023
113ec1a
Bump actions/checkout from 4.1.0 to 4.1.1 (#312)
dependabot[bot] Oct 18, 2023
e85c152
Bump @babel/traverse from 7.22.5 to 7.23.2 in /tornjak-frontend (#313)
dependabot[bot] Oct 20, 2023
9f59337
Bump actions/setup-node from 3.8.1 to 4.0.0 (#314)
dependabot[bot] Oct 24, 2023
8389d74
Bump google.golang.org/grpc from 1.55.0 to 1.56.3 (#316)
dependabot[bot] Oct 26, 2023
5503380
add support for nextjs (#317)
mamy-CS Nov 2, 2023
a3aee4f
Reorganize Root Directory (#315)
maia-iyer Nov 3, 2023
e56429a
Bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1 (#320)
dependabot[bot] Nov 22, 2023
0e01c87
Update Quickstart Readme (#318)
kidus0214 Nov 27, 2023
1b8438a
Bump @adobe/css-tools from 4.3.1 to 4.3.2 in /frontend (#321)
dependabot[bot] Dec 3, 2023
077f5dc
Bump actions/setup-go from 4.1.0 to 5.0.0 (#322)
dependabot[bot] Dec 7, 2023
bdc1b62
Fix type for upgraded Axios library (#323)
maia-iyer Dec 13, 2023
2af0183
Bump axios from 0.21.4 to 1.6.0 in /frontend (#319)
dependabot[bot] Dec 13, 2023
4cf979e
Update version.txt
maia-iyer Dec 13, 2023
b78d645
Update Push Action Branch to v1.5 (#324)
maia-iyer Dec 13, 2023
4752ed4
Bump actions/setup-node from 4.0.0 to 4.0.1 (#325)
dependabot[bot] Dec 20, 2023
0bac1bf
Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#326)
dependabot[bot] Dec 20, 2023
80e4a46
Bump follow-redirects from 1.15.3 to 1.15.4 in /frontend (#330)
dependabot[bot] Jan 11, 2024
b1e4e4b
fixed carbon react version change bug on cluster management page (#332)
mamy-CS Jan 24, 2024
912d76d
added cluster delete functionality under cluster edit tab (#333)
mamy-CS Jan 31, 2024
7b4f8b3
Update tutorial (#334)
maia-iyer Jan 31, 2024
d094d69
Bump actions/setup-node from 4.0.1 to 4.0.2 (#336)
dependabot[bot] Feb 8, 2024
849d4d0
Bump golangci/golangci-lint-action from 3.7.0 to 3.7.1 (#337)
dependabot[bot] Feb 9, 2024
bfad80e
Add mkdir for file not found error (#329)
maia-iyer Feb 9, 2024
e7a9ffd
Bump golangci/golangci-lint-action from 3.7.1 to 4.0.0 (#338)
dependabot[bot] Feb 12, 2024
f66d9e9
updated version (#350)
Benak961 Feb 20, 2024
69106f1
Bump ip from 1.1.8 to 1.1.9 in /frontend (#351)
dependabot[bot] Feb 21, 2024
e10d1a6
Fix the Minikube link in /docs/quickstart/README.md (#352)
kljude Feb 23, 2024
f6cf3b7
Remove spire dependency (#348)
maia-iyer Feb 23, 2024
ca20578
Add support for Multi arch image (Frontend) (#347)
mamy-CS Feb 23, 2024
7302c16
Bump docker/setup-buildx-action from 2 to 3 (#355)
dependabot[bot] Feb 26, 2024
a14d716
Bump docker/setup-qemu-action from 1 to 3 (#354)
dependabot[bot] Feb 26, 2024
9ef4d98
Fix multi-arch frontend build (#353)
maia-iyer Feb 26, 2024
7eb1645
Release Multiarch backend (#358)
maia-iyer Mar 5, 2024
a19b5c1
Add make vendor to backend build (#359)
maia-iyer Mar 6, 2024
026ae7c
Bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.3 (#360)
dependabot[bot] Mar 8, 2024
94ac585
Update frontend ubi image (#362)
mamy-CS Mar 12, 2024
b6730a1
Bump actions/checkout from 4.1.1 to 4.1.2 (#365)
dependabot[bot] Mar 13, 2024
0f1c835
Bump google.golang.org/protobuf from 1.30.0 to 1.33.0 (#366)
dependabot[bot] Mar 13, 2024
3d8c362
Bump docker/login-action from 3.0.0 to 3.1.0 (#367)
dependabot[bot] Mar 14, 2024
fa60bfb
Bump follow-redirects from 1.15.5 to 1.15.6 in /frontend (#369)
dependabot[bot] Mar 19, 2024
8f20744
modified error code for returned errors from SPIRE (#368)
maia-iyer Mar 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,31 @@ jobs:
EOF

- name: Check out repository code
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.2

- name: Install Golang
uses: actions/setup-go@v4.0.1
uses: actions/setup-go@v5.0.0
with:
go-version-file: go.mod
check-latest: true
cache: true

- uses: actions/setup-node@v3.7.0
- uses: actions/setup-node@v4.0.2
with:
node-version: '18'

# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Download modules
run: go mod download

- name: golangci-lint
uses: golangci/golangci-lint-action@v3.6.0
uses: golangci/golangci-lint-action@v4.0.0
with:
version: v1.53
args: --timeout 7m
Expand Down
41 changes: 25 additions & 16 deletions .github/workflows/master-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- main
- v1.4
- v1.5
jobs:
tornjak-build:
runs-on: ubuntu-latest
Expand All @@ -19,10 +19,10 @@ jobs:
EOF

- name: Check out repository code
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.2

- name: Install Golang
uses: actions/setup-go@v4.0.1
uses: actions/setup-go@v5.0.0
with:
go-version-file: go.mod
check-latest: true
Expand All @@ -31,21 +31,28 @@ jobs:
- name: Download modules
run: go mod download

- uses: actions/setup-node@v3.7.0
- uses: actions/setup-node@v4.0.2
with:
node-version: '18'

# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Download modules
run: go mod download

- name: golangci-lint
uses: golangci/golangci-lint-action@v3.6.0
uses: golangci/golangci-lint-action@v4.0.0
with:
version: v1.53
args: --timeout 7m

- name: Log in to GHCR.io
uses: docker/login-action@v2.2.0
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -58,18 +65,20 @@ jobs:
- name: Set release repo
run: echo "REPO=ghcr.io/${{ github.repository_owner }}" >> $GITHUB_ENV

# build and push images tagged with GITHUB_SHA, version, and latest
- name: Build and push tornjak backend image
run: make release-tornjak-backend

- name: Build and push tornjak frontend image
run: make release-tornjak-frontend
# build and push images tagged with GITHUB_SHA, version
- name: Build and push tornjak images
run: make release-images

- name: Build and push tornjak image (frontend+backend)
run: make release-tornjak
# build and push UBI images
- name: Add ubi prefix
run: echo "IMAGE_TAG_PREFIX=ubi-" >> $GITHUB_ENV
- name: Set frontend Dockerfile
run: echo "DOCKERFILE_FRONTEND=frontend/Dockerfile.frontend-container.ubi" >> $GITHUB_ENV
- name: Set backend Dockerfile
run: echo "DOCKERFILE_BACKEND=Dockerfile.backend-container.ubi" >> $GITHUB_ENV

- name: Build and push tornjak manager image
run: make release-tornjak-manager
- name: Build and push UBI images
run: make release-images

- name: Print job result
run: |
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
vendor

# dependencies
tornjak-frontend/node_modules
tornjak-frontend/.pnp
tornjak-frontend/.pnp.js
frontend/node_modules
frontend/.pnp
frontend/.pnp.js

# testing
tornjak-frontend/coverage
frontend/coverage

# production
tornjak-frontend/build
frontend/build

# misc
.DS_Store
Expand Down
46 changes: 41 additions & 5 deletions Dockerfile.backend-container
Original file line number Diff line number Diff line change
@@ -1,19 +1,55 @@
FROM alpine
# xx is helper for cross-compilation
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.3.0 AS xx

FROM --platform=$BUILDPLATFORM golang:1.20-alpine3.18 AS builder
RUN apk add build-base
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
COPY --link --from=xx / /
ARG TARGETOS
ARG TARGETARCH
ENV CGO_ENABLED=1

RUN apk add clang lld
RUN make vendor
RUN xx-go --wrap
RUN xx-apk add musl-dev gcc
RUN if [ "$TARGETARCH" = "arm64" ]; then CC=aarch64-alpine-linux-musl; fi && \
go build --tags 'sqlite_json' -mod=vendor -ldflags '-s -w -linkmode external -extldflags "-static"' -o bin/tornjak-backend ./cmd/agent/main.go

FROM alpine AS runtime
RUN mkdir -p /opt/spire

WORKDIR /opt/spire
ENTRYPOINT ["/opt/spire/run_backend.sh"]

# Add init
COPY run_backend.sh run_backend.sh
COPY bin/tornjak-backend tornjak-backend
COPY scripts/run_backend.sh run_backend.sh
COPY --from=builder /usr/src/myapp/bin/tornjak-backend tornjak-backend

# add a version link to the image description
ARG version
ARG github_sha
LABEL org.opencontainers.image.description="Tornjak backend ($version): https://github.com/spiffe/tornjak/releases/tag/$version" \
LABEL org.opencontainers.image.description="Tornjak backend ($version) Alpine based image: https://github.com/spiffe/tornjak/releases/tag/$version" \
org.opencontainers.image.source="https://github.com/spiffe/tornjak" \
org.opencontainers.image.documentation="https://github.com/spiffe/tornjak/tree/main/docs"
org.opencontainers.image.documentation="https://github.com/spiffe/tornjak/tree/main/docs"

# Additional labels
LABEL architecture="amd64" \
build-date="" \
description="Tornjak Backend" \
io.k8s.description="Tornjak Backend" \
io.k8s.display-name="tornjak-backend" \
maintainer="" \
name="spiffe/tornjak-backend" \
release="$version" \
summary="Tornjak backend image" \
url="" \
vcs-ref="" \
vcs-type="" \
vendor="" \
version="$version"

# create env. variables with the build details
ENV VERSION=$version
ENV GITHUB_SHA=$github_sha
54 changes: 54 additions & 0 deletions Dockerfile.backend-container.ubi
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# xx is helper for cross-compilation
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.3.0 AS xx

FROM --platform=$BUILDPLATFORM golang:1.20-alpine3.18 AS builder
RUN apk add build-base
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
COPY --link --from=xx / /
ARG TARGETOS
ARG TARGETARCH
ENV CGO_ENABLED=1

RUN apk add clang lld
RUN make vendor
RUN xx-go --wrap
RUN xx-apk add musl-dev gcc
RUN if [ "$TARGETARCH" = "arm64" ]; then CC=aarch64-alpine-linux-musl; fi && \
go build --tags 'sqlite_json' -mod=vendor -ldflags '-s -w -linkmode external -extldflags "-static"' -o bin/tornjak-backend ./cmd/agent/main.go

FROM registry.access.redhat.com/ubi8-micro:latest AS runtime
RUN mkdir -p /opt/spire

WORKDIR /opt/spire
ENTRYPOINT ["/opt/spire/run_backend.sh"]

# Add init
COPY scripts/run_backend.sh run_backend.sh
COPY --from=builder /usr/src/myapp/bin/tornjak-backend tornjak-backend

# add a version link to the image description
ARG version
ARG github_sha
LABEL org.opencontainers.image.description="Tornjak backend ($version) UBI based image: https://github.com/spiffe/tornjak/releases/tag/$version" \
org.opencontainers.image.source="https://github.com/spiffe/tornjak" \
org.opencontainers.image.documentation="https://github.com/spiffe/tornjak/tree/main/docs"
# replace UBI labels
LABEL architecture="amd64" \
build-date="" \
description="Tornjak Backend" \
io.k8s.description="Tornjak Backend" \
io.k8s.display-name="tornjak-backend" \
maintainer="" \
name="spiffe/tornjak-backend" \
release="$version" \
summary="Tornjak backend UBI image" \
url="" \
vcs-ref="" \
vcs-type="" \
vendor="" \
version="$version"

# create env. variables with the build details
ENV VERSION=$version
ENV GITHUB_SHA=$github_sha
35 changes: 0 additions & 35 deletions Dockerfile.tornjak-container

This file was deleted.

Loading
Loading