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

162 dockter 2 #166

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ When issues are opened,
this action adds appropriate labels to the issue.
(e.g. "triage", "customer-submission")

- [Add Labels Standardized GitHub action]
- [Add Labels Standardized GitHub Action]
- Uses: [senzing-factory/build-resources/.../add-labels-to-issue.yaml]

## add-to-project-garage-dependabot.yaml

When a Dependabot Pull Request (PR) is made against `main` branch,
this action adds the PR to the "Garage" project board as "In Progress".

- [Add to Project Garage Dependabot GitHub action]
- [Add to Project Garage Dependabot GitHub Action]
- Uses: [senzing-factory/build-resources/.../add-to-project-dependabot.yaml]

## add-to-project-garage.yaml

When an issue is created,
this action adds the issue to the "Garage" board as "Backlog".

- [Add to Project Garage GitHub action]
- [Add to Project Garage GitHub Action]
- Uses: [senzing-factory/build-resources/.../add-to-project.yaml]

## dependabot-approve-and-merge.yaml
Expand All @@ -31,33 +31,33 @@ When a Dependabot Pull Request (PR) is made against the `main` branch,
this action determines if it should be automatically approved and merged into the `main` branch.
Once this action occurs [move-pr-to-done-dependabot.yaml] moves the PR on the "Garage" project board to "Done".

- [Dependabot Approve and Merge GitHub action]
- [Dependabot Approve and Merge GitHub Action]
- Uses: [senzing-factory/build-resources/.../dependabot-approve-and-merge.yaml]

## docker-build-container.yaml

When a Pull Request is made against the `main` branch,
this action verifies that the `Dockerfile` can be successfully built.

*Note:* The Docker image is **not** pushed to [DockerHub].
_Note:_ The Docker image is **not** pushed to [DockerHub].

- [Docker Build Container GitHub action]
- [Docker Build Container GitHub Action]
- Uses: [senzing-factory/github-action-docker-buildx-build]

## docker-push-containers-to-dockerhub.yaml

After a [Semantic Version] release is created,
this action builds Docker images on multiple architectures and pushes the Docker images to [DockerHub].

- [Docker Push Containers to DockerHub GitHub action]
- [Docker Push Containers to DockerHub GitHub Action]
- Uses: [senzing-factory/github-action-docker-buildx-build]

## golangci-lint.yaml

When a change is committed to GitHub or a Pull Request is made against the `main` branch,
this action runs [golangci-lint] to run multiple linters against the code.

- [Golangci Lint GitHub action]
- [Golangci Lint GitHub Action]
- Configuration:
- [.golangci.yaml]
- Uses:
Expand All @@ -71,15 +71,15 @@ this action runs [golangci-lint] to run multiple linters against the code.
After a [Semantic Version] release is created,
this action expedites the Go publishing process.

- [Go Proxy Pull GitHub action]
- [Go Proxy Pull GitHub Action]
- Uses: [andrewslotin/go-proxy-pull-action]

## go-test-darwin.yaml

When a Pull Request is made against the `main` branch,
this action runs `go test` with coverage testing on macOS.

- [Go Test Darwin GitHub action]
- [Go Test Darwin GitHub Action]
- Configuration: [testcoverage.yaml]
- Uses:
- [actions/checkout]
Expand All @@ -94,7 +94,7 @@ this action runs `go test` with coverage testing on macOS.
When a change is committed to GitHub or a Pull Request is made against the `main` branch,
this action runs `go test` with coverage testing on Linux.

- [Go Test Linux GitHub action]
- [Go Test Linux GitHub Action]
- Configuration: [testcoverage.yaml]
- Uses:
- [actions/checkout]
Expand All @@ -109,7 +109,7 @@ this action runs `go test` with coverage testing on Linux.
When a Pull Request is made against the `main` branch,
this action runs `go test` with coverage testing on Windows.

- [Go Test Windows GitHub action]
- [Go Test Windows GitHub Action]
- Configuration: [testcoverage.yaml]
- Uses:
- [actions/checkout]
Expand All @@ -124,7 +124,7 @@ this action runs `go test` with coverage testing on Windows.
When a change is committed to GitHub or a Pull Request is made against the `main` branch,
this action runs [super-linter] to run multiple linters against the code.

- [Lint Workflows GitHub action]
- [Lint Workflows GitHub Action]
- Configuration:
- [.checkov.yaml]
- [.jscpd.json]
Expand All @@ -137,7 +137,7 @@ After a [Semantic Version] release is created,
this action creates a Pull Request for an updated [github.go] file
for the **next** Semantic Version release by increasing the Semantic Version's Patch value.

- [Make Go GitHub File GitHub action]
- [Make Go GitHub File GitHub Action]
- Uses: [senzing-factory/build-resources/.../make-go-github-file.yaml]

## make-go-tag.yaml
Expand All @@ -146,7 +146,7 @@ After a [Semantic Version] release is created,
this action creates a tag in the form `vM.m.P` using the SHA of the `M.m.P` release.
The `v` prefix is standard usage in [Go].

- [Make Go Tag GitHub action]
- [Make Go Tag GitHub Action]
- Uses:
- [actions/checkout]
- [senzing-factory/github-action-make-go-tag]
Expand All @@ -156,38 +156,38 @@ The `v` prefix is standard usage in [Go].
When a Pull Request is merged into the `main` branch,
this action moves the PR on the "Garage" project board to "Done".

- [Move PR to Done Dependabot GitHub action]
- [Move PR to Done Dependabot GitHub Action]
- Uses: [senzing-factory/build-resources/.../move-pr-to-done-dependabot.yaml]

[.checkov.yaml]: ../linters/README.md#checkovyaml
[.checkov.yaml]: ../linters/README.md#checkovyaml
[.golangci.yaml]: ../linters/README.md#golangciyaml
[.jscpd.json]: ../linters/README.md#jscpdjson
[.yaml-lint.yml]: ../linters/README.md#yaml-lintyml
[actions/checkout]: https://github.com/actions/checkout
[actions/setup-go]: https://github.com/actions/setup-go
[actions/upload-artifact]: https://github.com/actions/upload-artifact
[Add Labels Standardized GitHub action]: add-labels-standardized.yaml
[Add to Project Garage Dependabot GitHub action]: add-to-project-garage-dependabot.yaml
[Add to Project Garage GitHub action]: add-to-project-garage.yaml
[Add Labels Standardized GitHub Action]: add-labels-standardized.yaml
[Add to Project Garage Dependabot GitHub Action]: add-to-project-garage-dependabot.yaml
[Add to Project Garage GitHub Action]: add-to-project-garage.yaml
[andrewslotin/go-proxy-pull-action]: https://github.com/andrewslotin/go-proxy-pull-action
[Dependabot Approve and Merge GitHub action]: dependabot-approve-and-merge.yaml
[Docker Build Container GitHub action]: docker-build-container.yaml
[Docker Push Containers to DockerHub GitHub action]: docker-push-containers-to-dockerhub.yaml
[Dependabot Approve and Merge GitHub Action]: dependabot-approve-and-merge.yaml
[Docker Build Container GitHub Action]: docker-build-container.yaml
[Docker Push Containers to DockerHub GitHub Action]: docker-push-containers-to-dockerhub.yaml
[DockerHub]: https://hub.docker.com/
[github.go]: ../../cmd/github.go
[Go Proxy Pull GitHub action]: go-proxy-pull.yaml
[Go Test Darwin GitHub action]: go-test-darwin.yaml
[Go Test Linux GitHub action]: go-test-linux.yaml
[Go Test Windows GitHub action]: go-test-windows.yaml
[Go Proxy Pull GitHub Action]: go-proxy-pull.yaml
[Go Test Darwin GitHub Action]: go-test-darwin.yaml
[Go Test Linux GitHub Action]: go-test-linux.yaml
[Go Test Windows GitHub Action]: go-test-windows.yaml
[Go]: https://go.dev/
[Golangci Lint GitHub action]: golangci-lint.yaml
[Golangci Lint GitHub Action]: golangci-lint.yaml
[golangci-lint]: https://github.com/golangci/golangci-lint
[golangci/golangci-lint-action]: https://github.com/golangci/golangci-lint-action
[gotesttools/gotestfmt-action]: https://github.com/gotesttools/gotestfmt-action
[Lint Workflows GitHub action]: lint-workflows.yaml
[Make Go GitHub File GitHub action]: make-go-github-file.yaml
[Make Go Tag GitHub action]: make-go-tag.yaml
[Move PR to Done Dependabot GitHub action]: move-pr-to-done-dependabot.yaml
[Lint Workflows GitHub Action]: lint-workflows.yaml
[Make Go GitHub File GitHub Action]: make-go-github-file.yaml
[Make Go Tag GitHub Action]: make-go-tag.yaml
[Move PR to Done Dependabot GitHub Action]: move-pr-to-done-dependabot.yaml
[move-pr-to-done-dependabot.yaml]: move-pr-to-done-dependabotyaml
[Semantic Version]: https://semver.org/
[senzing-factory/build-resources/.../add-labels-to-issue.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/add-labels-to-issue.yaml
Expand All @@ -202,4 +202,4 @@ this action moves the PR on the "Garage" project board to "Done".
[senzing-factory/github-action-install-senzing-api]: https://github.com/senzing-factory/github-action-install-senzing-api
[senzing-factory/github-action-make-go-tag]: https://github.com/senzing-factory/github-action-make-go-tag
[super-linter]: https://github.com/super-linter/super-linter
[testcoverage.yaml]: ../coverage/README.md#testcoverageyaml
[testcoverage.yaml]: ../coverage/README.md#testcoverageyaml
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Create a code coverage map.

1. If a web page doesn't appear, visit [localhost:6060].
1. Senzing documentation will be in the "Third party" section.
`github.com` > `senzing` > `template-go`
`github.com` > `senzing-garage` > `template-go`

1. When a versioned release is published with a `v0.0.0` format tag,
the reference can be found by clicking on the following badge at the top of the README.md page.
Expand Down
18 changes: 9 additions & 9 deletions package.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# -----------------------------------------------------------------------------

ARG IMAGE_SENZINGAPI_RUNTIME=senzing/senzingapi-runtime-staging:latest
ARG IMAGE_GO_BUILDER=golang:1.22.3-bullseye
ARG IMAGE_FPM_BUILDER=dockter/fpm:latest
ARG IMAGE_BUILDER=golang:1.22.3-bullseye
ARG IMAGE_FPM=dockter/fpm:latest
ARG IMAGE_FINAL=alpine

# -----------------------------------------------------------------------------
Expand All @@ -14,10 +14,10 @@ ARG IMAGE_FINAL=alpine
FROM ${IMAGE_SENZINGAPI_RUNTIME} AS senzingapi_runtime

# -----------------------------------------------------------------------------
# Stage: go_builder
# Stage: builder
# -----------------------------------------------------------------------------

FROM ${IMAGE_GO_BUILDER} AS go_builder
FROM ${IMAGE_BUILDER} AS builder
ENV REFRESHED_AT=2024-07-01
LABEL Name="senzing/go-builder" \
Maintainer="support@senzing.com" \
Expand Down Expand Up @@ -51,12 +51,12 @@ RUN mkdir -p /output \
&& cp -R ${GOPATH}/src/${GO_PACKAGE_NAME}/target/* /output/

# -----------------------------------------------------------------------------
# Stage: fpm_builder
# Stage: fpm
# - Reference: https://github.com/jordansissel/fpm/blob/master/Dockerfile
# - FPM: https://fpm.readthedocs.io/en/latest/cli-reference.html
# -----------------------------------------------------------------------------

FROM ${IMAGE_FPM_BUILDER} AS fpm_builder
FROM ${IMAGE_FPM} AS fpm
ENV REFRESHED_AT=2024-07-01
LABEL Name="senzing/fpm-builder" \
Maintainer="support@senzing.com" \
Expand All @@ -71,7 +71,7 @@ ARG GO_PACKAGE_NAME

# Copy files from prior stage.

COPY --from=go_builder "/output/linux-amd64/*" "/output/linux-amd64/"
COPY --from=builder "/output/linux-amd64/*" "/output/linux-amd64/"

# Create Linux RPM package.

Expand Down Expand Up @@ -117,8 +117,8 @@ ARG PROGRAM_NAME

# Copy files from prior step.

COPY --from=fpm_builder "/output/*" "/output/"
COPY --from=fpm_builder "/output/linux-amd64/${PROGRAM_NAME}" "/output/linux-amd64/${PROGRAM_NAME}"
COPY --from=fpm "/output/*" "/output/"
COPY --from=fpm "/output/linux-amd64/${PROGRAM_NAME}" "/output/linux-amd64/${PROGRAM_NAME}"

USER 1001
CMD ["/bin/bash"]
Empty file added testdata/sqlite/G2C-empty.db
Empty file.
Binary file added testdata/sqlite/G2C-with-config.db
Binary file not shown.
Binary file added testdata/sqlite/G2C-with-schema.db
Binary file not shown.
Binary file modified testdata/sqlite/G2C.db
Binary file not shown.
Loading