Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use better "ps" format #527

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ sudo: required
language: go

go:
- "1.18.9"
- "1.19.6"

services:
- docker

env:
global:
- MAIN_BRANCH=private-master
- MAIN_BRANCH=v9.3.2
- TAGCACHE_FILE=tagcache
- RELEASE=r1
- RELEASE=r2

go_import_path: "github.com/ibm-messaging/mq-container"

Expand All @@ -38,7 +38,7 @@ go_import_path: "github.com/ibm-messaging/mq-container"
jobs:
include:
- stage: basic-build
if: branch != private-master AND tag IS blank
if: branch != v9.3.2 AND tag IS blank
name: "Basic AMD64 build"
os: linux
env:
Expand All @@ -48,12 +48,12 @@ jobs:
# CD Build

- stage: global-tag
if: branch = private-master AND type != pull_request OR tag =~ ^release-candidate*
if: branch = v9.3.2 AND type != pull_request OR tag =~ ^release-candidate*
name: "Generate Global Tag"
os: linux
script: bash -e travis-build-scripts/global-tag.sh
- stage: build
if: branch = private-master OR tag =~ ^release-candidate*
if: branch = v9.3.2 OR tag =~ ^release-candidate*
name: "Multi-Arch AMD64 build"
os: linux
env:
Expand All @@ -62,7 +62,7 @@ jobs:
- MQ_ARCHIVE_REPOSITORY_DEV=$MQ_932_ARCHIVE_REPOSITORY_DEV_AMD64
script: bash -e travis-build-scripts/run.sh
- stage: build
if: branch = private-master OR tag =~ ^release-candidate*
if: branch = v9.3.2 OR tag =~ ^release-candidate*
name: "Multi-Arch S390X build"
os: linux-s390
env:
Expand All @@ -72,7 +72,7 @@ jobs:
- MQ_ARCHIVE_REPOSITORY_DEV=$MQ_932_ARCHIVE_REPOSITORY_DEV_S390X
script: bash -e travis-build-scripts/run.sh
- stage: build
if: branch = private-master OR tag =~ ^release-candidate*
if: branch = v9.3.2 OR tag =~ ^release-candidate*
name: "Multi-Arch PPC64LE build"
os: linux-ppc64le
env:
Expand All @@ -82,7 +82,7 @@ jobs:
- MQ_ARCHIVE_REPOSITORY_DEV=$MQ_932_ARCHIVE_REPOSITORY_DEV_PPC64LE
script: bash -e travis-build-scripts/run.sh
- stage: push-manifest
if: branch = private-master AND type != pull_request OR tag =~ ^release-candidate*
if: branch = v9.3.2 AND type != pull_request OR tag =~ ^release-candidate*
name: "Push Manifest-list to registry"
env:
- PUSH_MANIFEST_ONLY=true
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change log

## 9.3.2.1 (2023-04)

* Updated to MQ version 9.3.2.1

## 9.3.2.0 (2023-02)

* Updated to MQ version 9.3.2.0
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile-server
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# limitations under the License.

ARG BASE_IMAGE=registry.access.redhat.com/ubi8/ubi-minimal
ARG BASE_TAG=8.7-1049.1675784874
ARG BASE_TAG=8.8-860
ARG BUILDER_IMAGE=registry.access.redhat.com/ubi8/go-toolset
ARG BUILDER_TAG=1.18.9-8.1675807488
ARG BUILDER_TAG=1.19.6-4
ARG GO_WORKDIR=/opt/app-root/src/go/src/github.com/ibm-messaging/mq-container
ARG MQ_ARCHIVE="downloads/9.3.2.0-IBM-MQ-Advanced-for-Developers-Non-Install-LinuxX64.tar.gz"
ARG MQ_ARCHIVE="downloads/9.3.2.1-IBM-MQ-Advanced-for-Developers-Non-Install-LinuxX64.tar.gz"

###############################################################################
# Build stage to build Go code
Expand Down
2 changes: 1 addition & 1 deletion cmd/runmqserver/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func verifySingleProcess() error {
// Verifies that there is only one instance running of the given program name.
func verifyOnlyOne(programName string) (int, error) {
// #nosec G104
out, _, _ := command.Run("ps", "-e", "--format", "cmd")
out, _, _ := command.Run("ps", "-e", "--format", "comm")
//if this goes wrong then assume we are the only one
numOfProg := strings.Count(out, programName)
if numOfProg != 1 {
Expand Down
2 changes: 1 addition & 1 deletion config.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
###########################################################################################################################################################

# MQ_VERSION is the fully qualified MQ version number to build
MQ_VERSION ?= 9.3.2.0
MQ_VERSION ?= 9.3.2.1

###########################################################################################################################################################
2 changes: 1 addition & 1 deletion docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ docker run \
--env LICENSE=accept \
--env MQ_QMGR_NAME=QM1 \
--detach \
ibm-mqadvanced-server:9.3.2.0-amd64
ibm-mqadvanced-server:9.3.2.1-amd64
```
2 changes: 1 addition & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ make test-advancedserver
You can specify the image to use directly by using the `MQ_IMAGE_ADVANCEDSERVER` or `MQ_IMAGE_DEVSERVER` variables, for example:

```
MQ_IMAGE_ADVANCEDSERVER=ibm-mqadvanced-server:9.3.2.0-amd64 make test-advancedserver
MQ_IMAGE_ADVANCEDSERVER=ibm-mqadvanced-server:9.3.2.1-amd64 make test-advancedserver
```

You can pass parameters to `go test` with an environment variable. For example, to run the "TestGoldenPath" test, run the following command:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ibm-messaging/mq-container

go 1.18
go 1.19

require (
github.com/genuinetools/amicontained v0.4.3
Expand Down
2 changes: 1 addition & 1 deletion source-branch.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# SOURCE_BRANCH is the repository branch name for this release stream.
# It should be updated when a new release fork is created but not for testing of personal builds or pre-fork updates.
SOURCE_BRANCH ?= private-master
SOURCE_BRANCH ?= v9.3.2

###########################################################################################################################################################
2 changes: 1 addition & 1 deletion test/docker/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ibm-messaging/mq-container/test/docker

go 1.18
go 1.19

require (
// Note: This is not actually Docker v17.12!
Expand Down