Skip to content

Conversation

@art-frela
Copy link
Contributor

@art-frela art-frela commented Jun 6, 2021

Hi guys,

thank you for your amazing work!

Last time very popular if your program containerizing and it can be run through docker-image, without installation on your pc/laptop.
My PR about it.

  • Add dockefile to ./build/Dockerfile
  • Add github actions: test and ci, see to ./.github/workflows/
    • for build and push your docker-image to github package registry you must make four things:
      • enable container registry doc for settings
      • generate personal access token with package:write access rights
      • add token to repository's secrets CR_PAT (example ./.github/workflows/ci.yml#L61)
      • change docker image name in ./.github/workflows/ci.yml#L68: ghcr.io/art-frela/mock-data:latest -> ghcr.io/pivotal-gss/mock-data:latest

After that:

  • make package public
  • add to README h2 (##)

USE DOCKER

# without arguments -> prints --help
docker run -it ghcr.io/pivotal-gss/mock-data:latest
# pass arguments, fill table, and save backup scripts to current host folder 
docker run -it -v $(pwd):/home/mock ghcr.io/pivotal-gss/mock-data:latest tables -t "public.gardens" --uri="postgres://pg_user:mypassword@myhost:5432/database_name?sslmode=disable" -r=1000000
# you can make alias, for zsh example:
echo alias mock=\"docker run -it -v $(pwd):/home/mock ghcr.io/pivotal-gss/mock-data:latest\" >> ~/.zshrc
source ~/.zshrc
mock tables -t "public.gardens" --uri="postgres://pg_user:mypassword@myhost:5432/database_name?sslmode=disable"

P.S. For "go developers" suggested to use golangci, I fix some files and add one test.

Co-authored-by: Artem <32013768+art-frela@users.noreply.github.com>
@faisaltheparttimecoder
Copy link
Owner

Hello @art-frela , This is really great. Allow me some time to test this and will squash the changes to the branch ..

Once again thank you

@faisaltheparttimecoder faisaltheparttimecoder merged commit 0c99b58 into faisaltheparttimecoder:master Jun 9, 2021
@faisaltheparttimecoder
Copy link
Owner

faisaltheparttimecoder commented Jun 9, 2021

Looks good to me, thanks ...

Im not the owner of the org, will work with the org owner on enabling the container support and will fix the yml. For now I will merge this and will update the package once enabled.

@faisaltheparttimecoder
Copy link
Owner

Hello @art-frela ..

I have the v3.0 ready to be pushed to master
https://github.com/pivotal-gss/mock-data/tree/v3.0

Let me know if you find anything missing or added with the CI before making this commit

Thanks

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.

2 participants