Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Push docker images on each master build
Browse files Browse the repository at this point in the history
Signed-off-by: Yevhen Vydolob <[email protected]>
  • Loading branch information
evidolob committed Feb 12, 2019
1 parent c7f619d commit cbcc814
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
before_script: skip
script:
- yarn
- export BUILD_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- travis_retry ./build_and_push_docker_images.sh;
- ./che-plugins/build.sh
- stage: deploy
Expand Down
4 changes: 2 additions & 2 deletions build_and_push_docker_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ for image_dir in "${DOCKER_FILES_LOCATIONS[@]}"
fi
done

#Push images only if build task scheduled by cron
if [ "$TRAVIS_EVENT_TYPE" == "cron" ]; then

if [ "$BUILD_BRANCH" == "master" ]; then
#PUSH IMAGES
#docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
Expand Down
2 changes: 1 addition & 1 deletion che-plugins/che-editor-theia/etc/che-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endpoints:
discoverable: false
containers:
- name: theia-ide
image: eclipse/che-theia:0.3.18-nightly
image: eclipse/che-theia:0.3.19-nightly
env:
- name: THEIA_PLUGINS
value: local-dir:///plugins
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/theia/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ -n "${LABEL_CONTENT}" ]; then
BUILD_ARGS+="--label che-plugin.cdn.artifacts=$(echo ${LABEL_CONTENT} | sed 's/ //g') "
echo "Rebuilding with CDN label..."
build
if [ "${TRAVIS_EVENT_TYPE:-}" == "cron" ]; then
if [ "${BUILD_BRANCH:-}" == "master" ]; then
"${base_dir}"/push-cdn-files-to-akamai.sh
fi
fi

0 comments on commit cbcc814

Please sign in to comment.