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

chore: automate the creation of a release #776

Merged
merged 34 commits into from
Feb 16, 2023

Conversation

mdelapenya
Copy link
Collaborator

@mdelapenya mdelapenya commented Jan 25, 2023

What does this PR do?

It adds a script to generate a release:

  1. git tag for the root package (testcontainers-go)
  2. git tag for each Go module (examples and modules). The value of the tag will be the module type (examples or modules), slash, module name, slash, version
  3. bump the version files

For that, we only need to read the current version form the version.go file.

The script is fairly simple:

  • reads the version from the version.go file, keeping the responsibility to the build engineer, that has to check the version is correct.
  • lists all subdirs in the well-known locations (examples and modules), excluding the _template dir
  • removes the trailing slash in the module directory
  • removes a possibly existing git tag for the module, skipping errors if the tag does not exist
  • creates the git tag in the defined version
  • stashes git to use a clean state
  • updates the version.go file with the next development version, and mkdocs.yml file with the current version
  • creates a commit in the main branch with those two files, only
  • un-stashes git
  • it creates a request to pkg.go.dev to add the releases (see https://pkg.go.dev/about#adding-a-package)

Why is it important?

In order for Go modules to appear at pkg.go.dev, we need a valid Git tag for the module, and this script allows to release the library in the proper manner, creating a tag for the library and for each Go module, and requesting the addition in pkg.go.dev

How to test this PR

Create a release in dry-run mode:

$ ./scripts/release.sh
git tag v0.18.0
git tag examples/bigtable/v0.18.0
git tag examples/cockroachdb/v0.18.0
git tag examples/consul/v0.18.0
git tag examples/datastore/v0.18.0
git tag examples/firestore/v0.18.0
git tag examples/mongodb/v0.18.0
git tag examples/mysql/v0.18.0
git tag examples/nginx/v0.18.0
git tag examples/postgres/v0.18.0
git tag examples/pubsub/v0.18.0
git tag examples/pulsar/v0.18.0
git tag examples/redis/v0.18.0
git tag examples/spanner/v0.18.0
git tag examples/toxiproxy/v0.18.0
git tag modules/compose/v0.18.0
git tag modules/localstack/v0.18.0
git stash
git checkout main
Producing a minor bump of the version, from v0.18.0 to 0.19.0
sed "s/const Version = ".*"/const Version = "0.19.0"/g" /Users/mdelapenya/sourcecode/src/github.com/testcontainers/testcontainers-go/internal/version.go > /Users/mdelapenya/sourcecode/src/github.com/testcontainers/testcontainers-go/internal/version.go.tmp
mv /Users/mdelapenya/sourcecode/src/github.com/testcontainers/testcontainers-go/internal/version.go.tmp /Users/mdelapenya/sourcecode/src/github.com/testcontainers/testcontainers-go/internal/version.go
sed "s/latest_version: .*/latest_version: v0.18.0/g" /Users/mdelapenya/sourcecode/src/github.com/testcontainers/testcontainers-go/mkdocs.yml > /Users/mdelapenya/sourcecode/src/github.com/testcontainers/testcontainers-go/mkdocs.yml.tmp
mv /Users/mdelapenya/sourcecode/src/github.com/testcontainers/testcontainers-go/mkdocs.yml.tmp /Users/mdelapenya/sourcecode/src/github.com/testcontainers/testcontainers-go/mkdocs.yml
git add /Users/mdelapenya/sourcecode/src/github.com/testcontainers/testcontainers-go/internal/version.go
git add /Users/mdelapenya/sourcecode/src/github.com/testcontainers/testcontainers-go/mkdocs.yml
git commit -m chore: prepare for next minor development cycle (0.19.0)
git push origin main --tags
git unstash
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/bigtable/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/cockroachdb/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/consul/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/datastore/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/firestore/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/mongodb/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/mysql/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/nginx/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/postgres/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/pubsub/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/pulsar/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/redis/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/spanner/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/examples/toxiproxy/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/modules/compose/@v/v0.18.0
curl https://proxy.golang.org/github.com/testcontainers/testcontainers-go/modules/localstack/@v/v0.18.0

Expected outcomes:

  • a git tag for the library is created, and the same semver version for each Go module is created
    • v0.18.0 for root module
    • modules/compose/v0.18.0 for compose module
    • examples/modgodb/v0.18.0 for example modules
  • the internal/version.go file is modified to the next bump
  • the mkdocs.yml file is modified to the current version

Follow-ups

Let's add here anything related to the release, to automate it as much as possible

@mdelapenya mdelapenya requested a review from a team as a code owner January 25, 2023 00:39
@mdelapenya mdelapenya self-assigned this Jan 25, 2023
@netlify
Copy link

netlify bot commented Jan 25, 2023

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit ef265a0
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/63edd67ff9c2ce00084f3293
😎 Deploy Preview https://deploy-preview-776--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@mdelapenya mdelapenya requested a review from a team January 25, 2023 00:40
@mdelapenya
Copy link
Collaborator Author

Mmm we probably need to follow https://pkg.go.dev/about#adding-a-package:

Adding a package

Data for the site is downloaded from proxy.golang.org. We monitor the Go Module Index regularly for new packages to add to pkg.go.dev. If you don’t see a package on pkg.go.dev, you can add it by doing one of the following:

Also we need to handle removing modules:

Removing a package

If you would like to hide versions of a module on pkg.go.dev, as well as from the go command, you should retract them. Retracting a module version involves adding a retract directive to your go.mod file and publishing a new version. See the Go blog post New module changes in Go 1.16 and the modules reference for details.

Note that it is possible to retract the latest version of a module; the modules reference link above includes an example. Also note that published versions cannot be reused or modified, and this includes retracted versions.

If you cannot publish a new version with retractions because the source code repository or domain name is no longer accessible, or if you want to hide documentation for all current and future versions, you can file a request for the pkgsite team to hide your package documentation from pkg.go.dev. Note that the package will continue to be available via go get or go install unless its module is retracted.

@mdelapenya mdelapenya marked this pull request as draft January 25, 2023 16:28
* main:
  chore: update Docker labels for containers (testcontainers#813)
  fix: nil pointer dereference in HealthStrategy (testcontainers#802)
  fix: Synchronise writes to containers map (testcontainers#812)
  chore(deps): bump google.golang.org/api from 0.108.0 to 0.109.0 in /examples (testcontainers#810)
  chore(deps): bump cloud.google.com/go/spanner in /examples/spanner (testcontainers#806)
  chore: restructure Docker helper methods (testcontainers#799)
  Verify Reaper state to create new or return existing instance (testcontainers#782)
  docs: add intel as user (testcontainers#798)
  chore: bump containerd in examples (testcontainers#797)
  chore(deps): bump github.com/containerd/containerd from 1.6.15 to 1.6.16 (testcontainers#793)
  chore: extract docker host calculation to an internal package (testcontainers#796)
  chore: run "go mod tidy" automatically when creating examples (testcontainers#794)
  chore: build images with backoff retries (testcontainers#792)
  fix: use right import package for compose in docs (testcontainers#791)
  chore(deps): bump google.golang.org/grpc from 1.52.1 to 1.52.3 in /examples (testcontainers#790)
  Add devcontainer file (testcontainers#765)
  chore: check dependabot dependencies weekly (testcontainers#789)
  chore(deps): bump google.golang.org/grpc from 1.52.0 to 1.52.1 in /examples (testcontainers#783)
  chore: support for titles in examples (testcontainers#775)
@mdelapenya mdelapenya marked this pull request as ready for review February 10, 2023 10:29
HofmeisterAn
HofmeisterAn previously approved these changes Feb 14, 2023
scripts/release.sh Outdated Show resolved Hide resolved
mdelapenya and others added 4 commits February 16, 2023 08:03
* chore: add localstack basic example

Run "go run . --name localstack --image "localstack/localstack:0.11.2" --title LocalStack"

* chore: add wait for log

* chore: add Docker socket binding

* chore: support defining legacy mode

* chore: support passing services and configuring them

* chore: simplify the creation of a localstack container request

It will allow users not to pass the legacy mode everywhere. Instead,
it's defined in the initial request, and consumed downstream

* chore: support configuring the AWS region

* chore: expose localstack container

* chore: support for retrieving the endpoint of a given service

* chore: store enabled services in the localstack container

* chore: store the region in the localstack container

* chore: apply default region when needed

* chore: support passing version and legacyMode as functional options

* chore: support for overriding the container request with a functional option

* chore: remove useless method for retrieving the internal endpoint of a service

* chore: simplify unit tests

* chore: create aws session using v1

* chore: add S3 tests

* chore: rename start localstack function

* chore: define default functions as vars

* chore: add tests for legacy mode

* chore: move the Session code to the tests

We want to et the user define how to get the Session

* docs: use S3 in the docs

* fix: read the expected daemon host from the provider

* chore: move v1 tests to its own test package

* feat: add example test for S3 using v2

* chore: store localstack credentials in a struct

* feat: create a functional opt for passing the AWS credentials

* chore: define defaults for the AWS credentials

* chore: include a test for overriding the image

* chore: remove withCredentials

Set them up using the override, as it's as simple as adding the right env vars

* chore: remove withRegion

Set it up using the override, as it's as simple as adding the right env var

* chore: remove withVersion

Set them up using the override, as it's as simple as setting the req.Image

* chore: rename configure method

* chore: reorder container configuration

1. merge the override request
2. set up the functional opts
3. configure Docker host

* chore: move to types

* chor: export structs

* docs: document exported functions

* docs: document how to create localstack container

* docs: reorder

* docs: document containerRequest override

* docs: document the container functional opts

* chore: be more explicit in comment

Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>

* chore: convert into real module

* chore: remove support for legacy mode

* chore: move tests

* fix: update module paths

* fix: update tests after moving an example to modules

* chore: bump default version to 1.3.1

* chore: remove Port from the Service struct

If the user wants to use the legacy mode, then they should build the
environment accordingly (e.g. SERVICES env var)

* fix: wrong relative path to the docs

* chore: remove any code to Services

We'll delegate it to the user, using the localstack env vars

* chore: adjust unit tests

* docs: include tests

* chore: use waitFor HTTP health

* chore: bump to latest version

* chore: go mod examples

* chore: rename GH action workflow file

---------

Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>
…estcontainers#831)

Bumps [go.mongodb.org/mongo-driver](https://github.com/mongodb/mongo-go-driver) from 1.11.1 to 1.11.2.
- [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
- [Commits](mongodb/mongo-go-driver@v1.11.1...v1.11.2)

---
updated-dependencies:
- dependency-name: go.mongodb.org/mongo-driver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…xamples (testcontainers#836)

* chore(deps): bump google.golang.org/api in /examples/bigtable

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.109.0 to 0.110.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.109.0...v0.110.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/api in /examples/spanner

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.109.0 to 0.110.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.109.0...v0.110.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/api in /examples/pubsub

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.109.0 to 0.110.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.109.0...v0.110.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/api in /examples/firestore

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.109.0 to 0.110.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.109.0...v0.110.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/api in /examples/datastore

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.109.0 to 0.110.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.109.0...v0.110.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…s#826)

* chore: create a separate module for the generator

* chore: get the root directory in the new layout

* feat: support for creating modules or examples

* fix: update dependabot and mkdocs

* chore: extract example parent dir calculation to a function

* chore: define entrypoint and container name methods

* chore: rename setupTech to startContainer

* chore: rename setup function in example modules

* chor: include modulegen in dependabot

* chore: add build script for modulegen

* chore: include modulegen tests in CI

* fix: update tests

* docs: add missing dependabot entry

* chore: update GH workflow example type

* fix: do not depend on hardcoded lengths

* chore: generate modules in its own directory in docs

* chore: add build script for modules

* docs: reuse
dependabot bot and others added 11 commits February 16, 2023 08:03
…stcontainers#828)

Bumps [github.com/imdario/mergo](https://github.com/imdario/mergo) from 0.3.12 to 0.3.13.
- [Release notes](https://github.com/imdario/mergo/releases)
- [Commits](darccio/mergo@0.3.12...v0.3.13)

---
updated-dependencies:
- dependency-name: github.com/imdario/mergo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…estcontainers#835)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.192 to 1.44.200.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.44.192...v1.44.200)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…estcontainers#814)

* chore: extract to variable to avoid double calculation

* chore: add tests including absolute paths

* chore: merge tests using a test table

* fix: keep parent directory as the root of the TAR file

* docs: document the change

* chore: make the path OS-agnostic

* chore: simplify

* fix: use filepath to be OS-independent

* chore(deps): bump github.com/jackc/pgx/v4 in /examples/cockroachdb (testcontainers#819)

Bumps [github.com/jackc/pgx/v4](https://github.com/jackc/pgx) from 4.17.2 to 4.18.0.
- [Release notes](https://github.com/jackc/pgx/releases)
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](jackc/pgx@v4.17.2...v4.18.0)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump golang.org/x/sys from 0.4.0 to 0.5.0 (testcontainers#816)

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](golang/sys@v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump golang.org/x/text from 0.6.0 to 0.7.0 (testcontainers#818)

Bumps [golang.org/x/text](https://github.com/golang/text) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](golang/text@v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/containerd/containerd from 1.6.16 to 1.6.17 (testcontainers#817)

Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.16 to 1.6.17.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](containerd/containerd@v1.6.16...v1.6.17)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump google.golang.org/grpc from 1.52.3 to 1.53.0 in /examples (testcontainers#827)

* chore(deps): bump google.golang.org/grpc in /examples/pubsub

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.52.3 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.52.3...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/grpc in /examples/spanner

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.52.3 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.52.3...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/grpc in /examples/bigtable

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.52.3 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.52.3...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/grpc in /examples/datastore

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.52.3 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.52.3...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/grpc in /examples/firestore

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.52.3 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.52.3...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add localstack module (testcontainers#800)

* chore: add localstack basic example

Run "go run . --name localstack --image "localstack/localstack:0.11.2" --title LocalStack"

* chore: add wait for log

* chore: add Docker socket binding

* chore: support defining legacy mode

* chore: support passing services and configuring them

* chore: simplify the creation of a localstack container request

It will allow users not to pass the legacy mode everywhere. Instead,
it's defined in the initial request, and consumed downstream

* chore: support configuring the AWS region

* chore: expose localstack container

* chore: support for retrieving the endpoint of a given service

* chore: store enabled services in the localstack container

* chore: store the region in the localstack container

* chore: apply default region when needed

* chore: support passing version and legacyMode as functional options

* chore: support for overriding the container request with a functional option

* chore: remove useless method for retrieving the internal endpoint of a service

* chore: simplify unit tests

* chore: create aws session using v1

* chore: add S3 tests

* chore: rename start localstack function

* chore: define default functions as vars

* chore: add tests for legacy mode

* chore: move the Session code to the tests

We want to et the user define how to get the Session

* docs: use S3 in the docs

* fix: read the expected daemon host from the provider

* chore: move v1 tests to its own test package

* feat: add example test for S3 using v2

* chore: store localstack credentials in a struct

* feat: create a functional opt for passing the AWS credentials

* chore: define defaults for the AWS credentials

* chore: include a test for overriding the image

* chore: remove withCredentials

Set them up using the override, as it's as simple as adding the right env vars

* chore: remove withRegion

Set it up using the override, as it's as simple as adding the right env var

* chore: remove withVersion

Set them up using the override, as it's as simple as setting the req.Image

* chore: rename configure method

* chore: reorder container configuration

1. merge the override request
2. set up the functional opts
3. configure Docker host

* chore: move to types

* chor: export structs

* docs: document exported functions

* docs: document how to create localstack container

* docs: reorder

* docs: document containerRequest override

* docs: document the container functional opts

* chore: be more explicit in comment

Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>

* chore: convert into real module

* chore: remove support for legacy mode

* chore: move tests

* fix: update module paths

* fix: update tests after moving an example to modules

* chore: bump default version to 1.3.1

* chore: remove Port from the Service struct

If the user wants to use the legacy mode, then they should build the
environment accordingly (e.g. SERVICES env var)

* fix: wrong relative path to the docs

* chore: remove any code to Services

We'll delegate it to the user, using the localstack env vars

* chore: adjust unit tests

* docs: include tests

* chore: use waitFor HTTP health

* chore: bump to latest version

* chore: go mod examples

* chore: rename GH action workflow file

---------

Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>

* chore(deps): bump go.mongodb.org/mongo-driver in /examples/mongodb (testcontainers#831)

Bumps [go.mongodb.org/mongo-driver](https://github.com/mongodb/mongo-go-driver) from 1.11.1 to 1.11.2.
- [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
- [Commits](mongodb/mongo-go-driver@v1.11.1...v1.11.2)

---
updated-dependencies:
- dependency-name: go.mongodb.org/mongo-driver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump google.golang.org/api from 0.109.0 to 0.110.0 in /examples (testcontainers#836)

* chore(deps): bump google.golang.org/api in /examples/bigtable

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.109.0 to 0.110.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.109.0...v0.110.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/api in /examples/spanner

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.109.0 to 0.110.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.109.0...v0.110.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/api in /examples/pubsub

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.109.0 to 0.110.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.109.0...v0.110.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/api in /examples/firestore

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.109.0 to 0.110.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.109.0...v0.110.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump google.golang.org/api in /examples/datastore

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.109.0 to 0.110.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.109.0...v0.110.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: support generating Go modules or example modules (testcontainers#826)

* chore: create a separate module for the generator

* chore: get the root directory in the new layout

* feat: support for creating modules or examples

* fix: update dependabot and mkdocs

* chore: extract example parent dir calculation to a function

* chore: define entrypoint and container name methods

* chore: rename setupTech to startContainer

* chore: rename setup function in example modules

* chor: include modulegen in dependabot

* chore: add build script for modulegen

* chore: include modulegen tests in CI

* fix: update tests

* docs: add missing dependabot entry

* chore: update GH workflow example type

* fix: do not depend on hardcoded lengths

* chore: generate modules in its own directory in docs

* chore: add build script for modules

* docs: reuse

* fix: always pass the absolute path to the tar code

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>
…in /modules/compose (testcontainers#824)

* chore(deps): bump github.com/docker/compose/v2 in /modules/compose

Bumps [github.com/docker/compose/v2](https://github.com/docker/compose) from 2.15.1 to 2.16.0.
- [Release notes](https://github.com/docker/compose/releases)
- [Commits](docker/compose@v2.15.1...v2.16.0)

---
updated-dependencies:
- dependency-name: github.com/docker/compose/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: remove replace directives

* chore: bump Docker dependencies to v23.0.0+incompatible

* chore: use proper docker APIs

* chore: use proper docker APIs

* fix: use non-deprecated API

* chore: remove replace directives for Docker in the docs

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
* main:
  chore(deps): bump github.com/docker/compose/v2 from 2.15.1 to 2.16.0 in /modules/compose (testcontainers#824)
  fix: always absolute paths when tarring files to a Docker container (testcontainers#814)
  chore(deps): bump github.com/aws/aws-sdk-go in /modules/localstack (testcontainers#835)
  chore(deps): bump github.com/imdario/mergo in /modules/localstack (testcontainers#828)
  feat: support generating Go modules or example modules (testcontainers#826)
  chore(deps): bump google.golang.org/api from 0.109.0 to 0.110.0 in /examples (testcontainers#836)
  chore(deps): bump go.mongodb.org/mongo-driver in /examples/mongodb (testcontainers#831)
  feat: add localstack module (testcontainers#800)
@mdelapenya mdelapenya changed the title chore: automate the creation of tags for all modules chore: automate the creation of a release Feb 16, 2023
@mdelapenya mdelapenya added documentation Docs, docs, docs. chore Changes that do not impact the existing functionality labels Feb 16, 2023
RELEASING.md Show resolved Hide resolved
@mdelapenya mdelapenya merged commit a92f198 into testcontainers:main Feb 16, 2023
@mdelapenya mdelapenya deleted the automate-tag-creation branch February 21, 2023 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes that do not impact the existing functionality documentation Docs, docs, docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants