...
This section describes the commands that are used to build, publish, run tests and examples for the images.
Prerequisites
Build images
Set repository and tag as variables:
Code Block |
---|
language | bash |
---|
title | For snapshot |
---|
linenumbers | true |
---|
|
export REPOSITORY=gcr.io/apache-beam-testing/beam/sdk/snapshot/`date +"%Y/%m/%d"`
export TAG=`date +"%Y%m%d"` |
...
Code Block |
---|
language | bash |
---|
title | For release |
---|
linenumbers | true |
---|
|
export REPOSITORY=gcr.io/apache-beam-testing/beam/sdk/release
export TAG=2.15.0 |
To build docker images run:
Code Block |
---|
language | bash |
---|
title | Python |
---|
linenumbers | true |
---|
|
$ pwd
[...]/beam/
$ ./gradlew :sdks:python:container:py2:docker -Pdocker-repository-root=$REPOSITORY -Pdocker-tag=$TAG --info
$ ./gradlew :sdks:python:container:py35:docker -Pdocker-repository-root=$REPOSITORY -Pdocker-tag=$TAG --info
$ ./gradlew :sdks:python:container:py36:docker -Pdocker-repository-root=$REPOSITORY -Pdocker-tag=$TAG --info
$ ./gradlew :sdks:python:container:py37:docker -Pdocker-repository-root=$REPOSITORY -Pdocker-tag=$TAG --info
|
...
Please note all following tests create new images each time, so they don't use the images we created above, however, since they are created from the same code, so we assume images are exactly same and if all tests passed with the new created images then assume images created above also pass the tests.
Running precommit tests at local
...
Code Block |
---|
language | bash |
---|
title | Python |
---|
linenumbers | true |
---|
|
$ ./gradlew :sdks:python:test-suites:portable:py2:preCommitPy2
$ ./gradlew :sdks:python:test-suites:portable:py35:preCommitPy35
$ ./gradlew :sdks:python:test-suites:portable:py35:preCommitPy36
$ ./gradlew :sdks:python:test-suites:portable:py35:preCommitPy37 |
...
Code Block |
---|
language | bash |
---|
title | Go |
---|
linenumbers | true |
---|
|
$ ./gradlew :goPreCommit |
Run postcommit tests at local
...
Code Block |
---|
language | bash |
---|
title | Python |
---|
linenumbers | true |
---|
|
$ ./gradlew :python2PostCommit
$ ./gradlew :python35PostCommit
$ ./gradlew :python36PostCommit
$ ./gradlew :python37PostCommit |
...