-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into composev2
- Loading branch information
Showing
11 changed files
with
183 additions
and
20 deletions.
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
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
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
18 changes: 18 additions & 0 deletions
18
docs/supported_docker_environment/continuous_integration/aws_codebuild.md
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,18 @@ | ||
# AWS CodeBuild | ||
|
||
To enable access to Docker in AWS CodeBuild, go to `Privileged` section and check | ||
`Enable this flag if you want to build Docker images or want your builds to get elevated privileges`. | ||
|
||
This is a sample `buildspec.yml` config: | ||
|
||
```yaml | ||
version: 0.2 | ||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
java: corretto17 | ||
build: | ||
commands: | ||
- ./mvnw test | ||
``` |
15 changes: 6 additions & 9 deletions
15
docs/supported_docker_environment/continuous_integration/circle_ci.md
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 |
---|---|---|
@@ -1,19 +1,16 @@ | ||
# CircleCI 2.0 | ||
# CircleCI (Cloud, Server v2.x, and Server v3.x) | ||
|
||
Your CircleCI configuration should use a dedicated VM for testcontainers to work. You can achieve this by specifying the | ||
executor type in your `.circleci/config.yml` to be `machine` instead of the default `docker` executor ( see [Choosing an Executor Type](https://circleci.com/docs/2.0/executor-types/) for more info ). | ||
Your CircleCI configuration should use a dedicated VM for Testcontainers to work. You can achieve this by specifying the | ||
executor type in your `.circleci/config.yml` to be `machine` instead of the default `docker` executor (see [Choosing an Executor Type](https://circleci.com/docs/2.0/executor-types/) for more info). | ||
|
||
Here is a sample CircleCI configuration that does a checkout of a project and runs maven: | ||
Here is a sample CircleCI configuration that does a checkout of a project and runs Maven: | ||
|
||
```yml | ||
# Check https://circleci.com/docs/2.0/language-java/ for more details | ||
# | ||
version: 2 | ||
machine: true | ||
jobs: | ||
build: | ||
# Check https://circleci.com/docs/executor-intro#linux-vm for more details | ||
machine: true | ||
steps: | ||
- checkout | ||
|
||
- run: mvn -B clean install | ||
``` |
94 changes: 94 additions & 0 deletions
94
docs/supported_docker_environment/continuous_integration/tekton.md
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,94 @@ | ||
# Tekton | ||
|
||
o enable access to Docker in Tekton, a dind sidecar needs to be added. An example of it can be found | ||
[here](https://github.com/tektoncd/pipeline/blob/main/examples/v1beta1/taskruns/dind-sidecar.yaml) | ||
|
||
This is an example | ||
|
||
```yaml | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: run-tests | ||
description: Run Tests | ||
spec: | ||
workspaces: | ||
- name: source | ||
steps: | ||
- name: read | ||
image: eclipse-temurin:17.0.3_7-jdk-alpine | ||
workingDir: $(workspaces.source.path) | ||
script: ./mvnw test | ||
volumeMounts: | ||
- mountPath: /var/run/ | ||
name: dind-socket | ||
sidecars: | ||
- image: docker:20.10-dind | ||
name: docker | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- mountPath: /var/lib/docker | ||
name: dind-storage | ||
- mountPath: /var/run/ | ||
name: dind-socket | ||
volumes: | ||
- name: dind-storage | ||
emptyDir: { } | ||
- name: dind-socket | ||
emptyDir: { } | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Pipeline | ||
metadata: | ||
name: testcontainers-demo | ||
spec: | ||
description: | | ||
This pipeline clones a git repo, run testcontainers. | ||
params: | ||
- name: repo-url | ||
type: string | ||
description: The git repo URL to clone from. | ||
workspaces: | ||
- name: shared-data | ||
description: | | ||
This workspace contains the cloned repo files, so they can be read by the | ||
next task. | ||
tasks: | ||
- name: fetch-source | ||
taskRef: | ||
name: git-clone | ||
workspaces: | ||
- name: output | ||
workspace: shared-data | ||
params: | ||
- name: url | ||
value: $(params.repo-url) | ||
- name: run-tests | ||
runAfter: ["fetch-source"] | ||
taskRef: | ||
name: run-tests | ||
workspaces: | ||
- name: source | ||
workspace: shared-data | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: testcontainers-demo-run | ||
spec: | ||
pipelineRef: | ||
name: testcontainers-demo | ||
workspaces: | ||
- name: shared-data | ||
volumeClaimTemplate: | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
params: | ||
- name: repo-url | ||
value: https://github.com/testcontainers/testcontainers-java-repro.git | ||
``` |
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
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