Skip to content

Commit

Permalink
Merge pull request #466 from mq-cloudpak/ahp-travis-migration-lts
Browse files Browse the repository at this point in the history
Added a keep alive script to stop travis timing out
  • Loading branch information
Alec-Painter authored and GitHub Enterprise committed Jun 19, 2023
2 parents 59230b6 + cc2a5cb commit 9f28429
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ jobs:
- BUILD_ALL=true
- MQ_ARCHIVE_REPOSITORY=$MQ_930_ARCHIVE_REPOSITORY_AMD64
- MQ_ARCHIVE_REPOSITORY_DEV=$MQ_930_ARCHIVE_REPOSITORY_DEV_AMD64
script: bash -e travis-build-scripts/run.sh
script:
- bash travis-build-scripts/travis-log-keepalive.sh &
- bash -e travis-build-scripts/run.sh
- stage: build
if: branch = v9.3.0.x OR tag =~ ^release-candidate*
name: "Multi-Arch S390X build"
Expand All @@ -72,7 +74,9 @@ jobs:
- TEST_OPTS_DOCKER="-run TestGoldenPathWithMetrics"
- MQ_ARCHIVE_REPOSITORY=$MQ_930_ARCHIVE_REPOSITORY_S390X
- MQ_ARCHIVE_REPOSITORY_DEV=$MQ_930_ARCHIVE_REPOSITORY_DEV_S390X
script: bash -e travis-build-scripts/run.sh
script:
- bash travis-build-scripts/travis-log-keepalive.sh &
- bash -e travis-build-scripts/run.sh
- stage: build
if: branch = v9.3.0.x OR tag =~ ^release-candidate*
name: "Multi-Arch PPC64LE build"
Expand All @@ -84,7 +88,9 @@ jobs:
- TEST_OPTS_DOCKER="-run TestGoldenPathWithMetrics"
- MQ_ARCHIVE_REPOSITORY=$MQ_930_ARCHIVE_REPOSITORY_PPC64LE
- MQ_ARCHIVE_REPOSITORY_DEV=$MQ_930_ARCHIVE_REPOSITORY_DEV_PPC64LE
script: bash -e travis-build-scripts/run.sh
script:
- bash travis-build-scripts/travis-log-keepalive.sh &
- bash -e travis-build-scripts/run.sh
- stage: push-manifest
if: branch = v9.3.0.x AND type != pull_request OR tag =~ ^release-candidate*
name: "Push Manifest-list to registry"
Expand Down
30 changes: 30 additions & 0 deletions travis-build-scripts/travis-log-keepalive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# © Copyright IBM Corporation 2020
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

k=0
dd=$(date)

# Output 200 lines of dummy output to force the logs to flush if they have broken, happens every 8 mins
while true; do
echo -e "travis_fold:start:build_heartbeat.$k\033[33;1mDumping heartbeat logs to keep build alive - $dd\033[0m"
for i in {1..200}; do
echo "Keepalive $i"
done
echo -e "\ntravis_fold:end:build_heartbeat.$k\r"
sleep 480
k=$((k+1))
dd=$(date)
done

0 comments on commit 9f28429

Please sign in to comment.