* Enable running container as mqm * Fix merge problem * Don't force root usage * RHEL image runs as mqm instead of root * Build on host with SELinux enabled * Enable building on node in an OpenShift cluster * Enable running container as mqm * Fix merge problem * Don't force root usage * Merge lastest changes from master * RHEL image runs as mqm instead of root * Fix merge issues * Test changes for non-root * Make timeout properly, and more non-root test fixes * Run tests with fewer/no capabilities * Correct usage docs for non-root * Add security docs * Add temporary debug output * Remove debug code * Fixes for termination-log * Allow init container to run as root * Fixes for CentOS build * Fixes for RHEL build * Logging improvements * Fix Dockerfile RHEL/CentOS build * Fix bash error * Make all builds specify UID * Use redist client for Go SDK * Inspect image before running tests * New test for init container * Log container runtime in runmqdevserver * Add extra capabilities if using a RHEL image
80 lines
2.5 KiB
YAML
80 lines
2.5 KiB
YAML
# © Copyright IBM Corporation 2018, 2019
|
|
#
|
|
# 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.
|
|
|
|
dist: xenial
|
|
|
|
sudo: required
|
|
language: go
|
|
|
|
go:
|
|
- "1.10"
|
|
|
|
services:
|
|
- docker
|
|
|
|
go_import_path: "github.com/ibm-messaging/mq-container"
|
|
|
|
cache:
|
|
directories:
|
|
- downloads
|
|
|
|
jobs:
|
|
include:
|
|
- stage: build and test
|
|
env:
|
|
- BASE_IMAGE=ubuntu:16.04
|
|
- DOCKER_DOWNGRADE="echo nothing to be done"
|
|
- env:
|
|
- BASE_IMAGE=centos:7
|
|
- DOCKER_DOWNGRADE="echo nothing to be done"
|
|
- if: type IN (pull_request) OR tag IS present
|
|
env:
|
|
- BASE_IMAGE=ubuntu:16.04
|
|
- DOCKER_DOWNGRADE="docker save -o images.tar mqadvanced-server-dev mq-dev-jms-test &&
|
|
sudo apt-get autoremove -y docker-ce &&
|
|
curl -fsSL \"https://apt.dockerproject.org/gpg\" | sudo apt-key add - &&
|
|
sudo apt-add-repository \"deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main\" &&
|
|
sudo apt-get update &&
|
|
sudo apt-get install docker-engine=1.12.6-0~ubuntu-$(lsb_release -cs) &&
|
|
docker load -q -i images.tar &&
|
|
export DOCKER_API_VERSION=\"1.24\""
|
|
|
|
before_install:
|
|
- ./install-build-deps-ubuntu.sh
|
|
|
|
install:
|
|
- echo nothing
|
|
|
|
before_script:
|
|
- echo 'Downloading Go dependencies...' && echo -en 'travis_fold:start:deps\\r'
|
|
- make deps
|
|
- echo -en 'travis_fold:end:deps\\r'
|
|
- echo 'Building Developer image...' && echo -en 'travis_fold:start:build-devserver\\r'
|
|
- make build-devserver
|
|
- echo -en 'travis_fold:end:build-devserver\\r'
|
|
- echo 'Building Developer JMS test image...' && echo -en 'travis_fold:start:build-devjmstest\\r'
|
|
- make build-devjmstest
|
|
- echo -en 'travis_fold:end:build-devjmstest\\r'
|
|
|
|
script:
|
|
- echo 'Downgrading Docker (if necessary)...' && echo -en 'travis_fold:start:docker-downgrade\\r'
|
|
- eval "$DOCKER_DOWNGRADE"
|
|
- echo -en 'travis_fold:end:docker-downgrade\\r'
|
|
- echo 'Testing Developer image...' && echo -en 'travis_fold:start:test-devserver\\r'
|
|
- make test-devserver
|
|
- echo -en 'travis_fold:end:test-devserver\\r'
|
|
|
|
after_success:
|
|
- make lint
|