Skip to content

Commit 7876de0

Browse files
authored
Add docker compose based tests per PR (#294)
1 parent a44ed43 commit 7876de0

File tree

4 files changed

+52
-54
lines changed

4 files changed

+52
-54
lines changed

.github/workflows/build-push.yaml

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
name: Parseable Docker build and push
1+
name: Integration tests
22

33
on:
4-
push:
5-
branches: ['main']
4+
pull_request:
65
paths-ignore:
76
- 'docs/**'
87
- 'helm/**'
@@ -15,17 +14,17 @@ env:
1514

1615
jobs:
1716

18-
# docker-compose-test:
19-
# name: Docker Compose integration tests
20-
# runs-on: ubuntu-latest
21-
# steps:
22-
# - name: Checkout
23-
# uses: actions/checkout@v3
24-
# - name: Start compose
25-
# run: docker-compose -f "docker-compose.yaml" up --build
26-
# - name: Stop compose
27-
# if: always()
28-
# run: docker-compose -f "docker-compose.yaml" down
17+
docker-compose-test:
18+
name: Docker Compose integration tests
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
- name: Start compose
24+
run: docker-compose -f "docker-compose.yaml" up --build
25+
- name: Stop compose
26+
if: always()
27+
run: docker-compose -f "docker-compose.yaml" down
2928

3029
# docker-build:
3130
# name: Docker build
@@ -36,30 +35,30 @@ jobs:
3635
# - name: Build Docker image
3736
# run: docker build .
3837

39-
build-and-push-image:
40-
name: Build and push Docker image to GitHub Container Registry
41-
runs-on: ubuntu-latest
42-
permissions:
43-
contents: read
44-
packages: write
45-
steps:
46-
- name: Checkout repository
47-
uses: actions/checkout@v3
48-
- name: Log in to the Container registry
49-
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
50-
with:
51-
registry: ${{ env.REGISTRY }}
52-
username: ${{ github.actor }}
53-
password: ${{ secrets.GITHUB_TOKEN }}
54-
- name: Extract metadata (tags, labels) for Docker
55-
id: meta
56-
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
57-
with:
58-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
59-
- name: Build and push Docker image
60-
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
61-
with:
62-
context: .
63-
push: true
64-
tags: ${{ steps.meta.outputs.tags }}
65-
labels: ${{ steps.meta.outputs.labels }}
38+
# build-and-push-image:
39+
# name: Build and push Docker image to GitHub Container Registry
40+
# runs-on: ubuntu-latest
41+
# permissions:
42+
# contents: read
43+
# packages: write
44+
# steps:
45+
# - name: Checkout repository
46+
# uses: actions/checkout@v3
47+
# - name: Log in to the Container registry
48+
# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
49+
# with:
50+
# registry: ${{ env.REGISTRY }}
51+
# username: ${{ github.actor }}
52+
# password: ${{ secrets.GITHUB_TOKEN }}
53+
# - name: Extract metadata (tags, labels) for Docker
54+
# id: meta
55+
# uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
56+
# with:
57+
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
58+
# - name: Build and push Docker image
59+
# uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
60+
# with:
61+
# context: .
62+
# push: true
63+
# tags: ${{ steps.meta.outputs.tags }}
64+
# labels: ${{ steps.meta.outputs.labels }}

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Parseable CI Workflow
1+
name: Linter
22

33
on:
44
pull_request:

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
# You should have received a copy of the GNU Affero General Public License
1414
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1515

16-
17-
FROM rust:slim-bullseye as builder
16+
# build stage
17+
FROM rust:1.67.0-bullseye as builder
1818

1919
LABEL org.opencontainers.image.title="Parseable"
2020
LABEL maintainer="Parseable Team <[email protected]>"
2121
LABEL org.opencontainers.image.vendor="Cloudnatively Pvt Ltd"
2222
LABEL org.opencontainers.image.licenses="AGPL-3.0"
2323

2424
WORKDIR /parseable
25-
2625
COPY . .
2726
RUN cargo build --release
2827

28+
# final stage
2929
FROM gcr.io/distroless/cc-debian11:nonroot
3030

3131
WORKDIR /parseable

docker-compose.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ networks:
55
driver: bridge
66

77
services:
8-
98
minio:
109
image: minio/minio:RELEASE.2023-02-10T18-48-39Z
1110
entrypoint:
@@ -31,11 +30,10 @@ services:
3130
- parseable-internal
3231

3332
parseable:
34-
image: parseablehq/parseable:v0.2.1
35-
# build:
36-
# context: .
37-
# dockerfile: Dockerfile
38-
# command: ["parseable", "s3-store"]
33+
build:
34+
context: .
35+
dockerfile: Dockerfile
36+
command: ["parseable", "s3-store"]
3937
ports:
4038
- 8000
4139
environment:
@@ -45,8 +43,9 @@ services:
4543
- P_S3_REGION=us-east-1
4644
- P_S3_BUCKET=parseable
4745
- P_STAGING_DIR=/tmp/data
48-
- P_USERNAME=admin
49-
- P_PASSWORD=admin
46+
- P_USERNAME=parseableadmin
47+
- P_PASSWORD=parseableadmin
48+
- P_CHECK_UPDATE=false
5049
networks:
5150
- parseable-internal
5251
healthcheck:
@@ -59,7 +58,7 @@ services:
5958

6059
quest:
6160
image: ghcr.io/parseablehq/quest:main
62-
command: ["smoke", "http://parseable:8000", "admin", "admin"]
61+
command: ["smoke", "http://parseable:8000", "parseableadmin", "parseableadmin"]
6362
networks:
6463
- parseable-internal
6564
depends_on:

0 commit comments

Comments
 (0)