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

Introduce new Command in Dhall to run job along with postgres docker #15664

Merged
merged 20 commits into from
Jun 21, 2024

Conversation

dkijania
Copy link
Member

@dkijania dkijania commented May 19, 2024

Added new dhall Command definition which can simplify running tests which requires postgres database running along with some initial script.

Usage:

in Dhall test definition

 RunWithPostgres.runInDockerWithPostgresConn
          ([] : List Text)
           "./src/test/archive/sample_db/archive_db.sql"
           Artifacts.Type.Archive 
           "./buildkite/scripts/replayer-test.sh"

where

  • first argument extends environment variables passed to docker
  • second argument defines init script which will be run against schema before script
  • third defines which debians will be installed
  • fourth argument defines which script will be run against database

There are 4 env variables passed to the docker, so script can use them for connection:

"PG_PORT","POSTGRES_USER,"POSTGRES_PASSWORD","POSTGRES_DB","PG_CONN"

@dkijania
Copy link
Member Author

!ci-build-me

6 similar comments
@dkijania
Copy link
Member Author

!ci-build-me

@dkijania
Copy link
Member Author

!ci-build-me

@dkijania
Copy link
Member Author

!ci-build-me

@dkijania
Copy link
Member Author

!ci-build-me

@dkijania
Copy link
Member Author

!ci-build-me

@dkijania
Copy link
Member Author

!ci-build-me

@dkijania dkijania force-pushed the dkijania/introduce_postgres_side_docker_job branch from 8170241 to c4ebea2 Compare May 30, 2024 20:17
@dkijania
Copy link
Member Author

!ci-build-me

@dkijania
Copy link
Member Author

!ci-build-me

@dkijania dkijania marked this pull request as ready for review June 12, 2024 16:17
@dkijania dkijania requested review from a team as code owners June 12, 2024 16:17
@dkijania
Copy link
Member Author

!ci-build-me

@dkijania
Copy link
Member Author

!ci-build-me

@dkijania
Copy link
Member Author

!ci-build-me

@dkijania dkijania merged commit 2d510ec into develop Jun 21, 2024
68 checks passed
@dkijania dkijania deleted the dkijania/introduce_postgres_side_docker_job branch June 21, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants