After you push a tag to a Github repository for OpenWhisk project, it will kick off a Travis build job, which probably will push the built docker images for that project into Docker Hub.
Important! Don't forget to verify whether the Travis build succeed or not.
If the Travis job fails, we will fail to push the docker images, which lead to image inconsistency for our release.
You need to find out the reason, why it has failed. Empirically, it fails due to that you pushed a tag, not compliant with naming convention for that project.
If the Travis job succeeds, you are all set for this step.
Let's take the Go runtime as an example, if you name the tag after “email@example.com”, the Travis build will fail, like the error result here. The correct tag for Go runtime in this case is like “firstname.lastname@example.org”, and the successful build is located here.
Another reason that the Travis build fails can be there is really a bug with the Travis build. In this case, you can keep the tag you have pushed in the Github repository, but log this issue as well. One way to compensate is to run the “docker push” manually on your local machine to upload the image into Docker Hub. Here are the steps you need to follow for this situation:
Visit the private SVN repository to access the credentials for Docker Hub. If you are a PMC member, your credentials with Apache should give you the access to the private SVN repository. After you login with your credentials, open the file called
dockerhub.txt, and you will see the username and password to push your local docker images. DON'T misuse it.
On your local machine, run the command as below to login the Docker Hub:
docker login --username <openwhisk_username>
The argument <openwhisk_username> is the username you retrieve in the file dockerhub.txt. This command asks you to enter the password, we can get in the file dockerhub.txt as well.
Build the docker image locally with correct version number and push it into the Docker hub. You need to go to the home directory of the specific OpenWhisk project, and run the following command:
./gradlew :core:<runtime_kind>:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=<tag>
The argument <runtime_kind> is the folder name for each version of the runtime. You can find the name by checking what are under the folder core. For example, your want to find the runtime kind for the runtime Ruby, there are
ruby2.6ActionLoop under the core folder.
The candidates for <runtime_kind> will be
ruby2.6ActionLoop. The argument <tag> is usually <version>-<pre_release_version>, the real full version we specify for each release.