-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
136 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
concurrency: | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.event.ref }}-${{ github.event_name }} | ||
jobs: | ||
build: | ||
uses: ./.github/workflows/workflow.build.yaml | ||
secrets: inherit | ||
with: | ||
name: greenmask | ||
|
||
version_test: | ||
container: "docker://ghcr.io/socialgouv/docker/s3-client:sha-${{ github.sha }}" | ||
name: Test Version | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: greenmask --version | ||
|
||
name: "s3-client" | ||
on: | ||
push: | ||
tags: | ||
- "greenmask@**" |
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,31 @@ | ||
concurrency: | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.event.ref }}-${{ github.event_name }} | ||
jobs: | ||
build: | ||
uses: ./.github/workflows/workflow.build.yaml | ||
secrets: inherit | ||
with: | ||
name: s3-client | ||
|
||
version_test: | ||
container: "docker://ghcr.io/socialgouv/docker/greenmask:sha-${{ github.sha }}" | ||
name: Test Version | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: greenmask --version | ||
|
||
name: "s3-client" | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
- "!master" | ||
- "!alpha" | ||
- "!beta" | ||
paths: | ||
- "greenmask/**" | ||
- ".github/workflows/greenmask.yaml" | ||
- ".github/workflows/greenmask.tag.yaml" | ||
- ".github/workflows/workflow.build.yaml" |
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,10 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
[*.{js,json,yml}] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 |
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,11 @@ | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
# Swap the comments on the following lines if you don't wish to use zero-installs | ||
# Documentation here: https://yarnpkg.com/features/zero-installs | ||
!.yarn/cache | ||
#.pnp.* |
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,22 @@ | ||
ARG NODE_VERSION=20.14-slim@sha256:a16301294ba66d2ad22d3beded4a52720f96ab208c1db0973c034d0127a4ccb0 | ||
FROM node:$NODE_VERSION | ||
|
||
# hadolint ignore=DL3008 | ||
RUN apt-get update && \ | ||
apt-get install -yq --no-install-recommends wget ca-certificates postgresql-common \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y | ||
|
||
# hadolint ignore=DL3008,DL3059 | ||
RUN apt-get update \ | ||
&& apt-get install -yq --no-install-recommends postgresql-client-15 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# install greenmask cli | ||
RUN wget https://github.com/GreenmaskIO/greenmask/releases/download/v0.1.14/greenmask-linux-amd64.tar.gz \ | ||
&& tar -xvf greenmask-linux-amd64.tar.gz \ | ||
&& mv greenmask /usr/local/bin/greenmask | ||
|
||
USER 1000 | ||
|
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,9 @@ | ||
# greenmask | ||
|
||
https://greenmask.io/ | ||
|
||
Image with: | ||
|
||
- `greenmask` | ||
- `node` | ||
- `pg_dump` |
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,12 @@ | ||
{ | ||
"name": "s3-client", | ||
"version": "1.2.0", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"build": "docker build -t ${SG_DOCKER_IMAGE:-'socialgouv_docker_psql'} .", | ||
"test": "yarn test:e2e && yarn test:structure", | ||
"test:e2e": "$(yarn bin:bats) tests/*", | ||
"test:structure": "$(yarn bin:container-structure-test) test --image ${SG_DOCKER_IMAGE:-'socialgouv_docker_psql'} --config tests/container-structure-test.yml -v debug" | ||
}, | ||
"private": true | ||
} |
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,15 @@ | ||
schemaVersion: "2.0.0" | ||
|
||
commandTests: | ||
- name: "greenmask --version" | ||
command: "greenmask" | ||
args: ["--version"] | ||
expectedOutput: ["greenmask version v\\d+\\d+\\d+ .*"] | ||
- name: "pg_dump --version" | ||
command: "pg_dump" | ||
args: ["--version"] | ||
expectedOutput: ["psql \\(PostgreSQL\\) \\d+\\.\\d+"] | ||
- name: "node --version" | ||
command: "node" | ||
args: ["--version"] | ||
expectedOutput: ["v\\d+\\.\\d+\\.\\d+"] |
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 |
---|---|---|
|
@@ -29,7 +29,8 @@ | |
"datasette", | ||
"git", | ||
"check-cluster-images", | ||
"s3-client" | ||
"s3-client", | ||
"greenmask" | ||
], | ||
"packageManager": "[email protected]", | ||
"private": true | ||
|