Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzhuojie committed Aug 26, 2022
1 parent 38867dc commit 931cd21
Show file tree
Hide file tree
Showing 9 changed files with 16,603 additions and 41 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Expand Up @@ -26,3 +26,4 @@ _data/
flagr.sqlite
./browser/flagr-ui/node_modules
Dockerfile
integration_tests/
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.17
go-version: 1.19
- name: Check out source code
uses: actions/checkout@v1
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
Expand All @@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
- name: Check out source code
uses: actions/checkout@v1
- run: cd browser/flagr-ui && npm install
Expand Down
12 changes: 3 additions & 9 deletions Dockerfile
Expand Up @@ -11,27 +11,21 @@ RUN make build_ui
######################################
# Prepare go_builder
######################################
FROM golang:1.17 as go_builder
FROM golang:1.19.0-alpine3.16 as go_builder
WORKDIR /go/src/github.com/openflagr/flagr

RUN apk add --no-cache git make build-base
ADD . .
RUN make build

######################################
# Copy from builder to alpine image
######################################
FROM frolvlad/alpine-glibc:alpine-3.15
RUN apk add --no-cache curl
WORKDIR /go/src/github.com/openflagr/flagr
VOLUME ["/data"]
ENV HOST=0.0.0.0
ENV PORT=18000
ENV FLAGR_DB_DBDRIVER=sqlite3
ENV FLAGR_DB_DBCONNECTIONSTR=/data/demo_sqlite3.db
ENV FLAGR_RECORDER_ENABLED=false

COPY --from=go_builder /go/src/github.com/openflagr/flagr/flagr ./flagr
COPY --from=npm_builder /go/src/github.com/openflagr/flagr/browser/flagr-ui/dist ./browser/flagr-ui/dist
ADD ./buildscripts ./buildscripts
ADD ./buildscripts/demo_sqlite3.db /data/demo_sqlite3.db

RUN addgroup -S appgroup && adduser -S appuser -G appgroup
Expand Down

0 comments on commit 931cd21

Please sign in to comment.