Add linux/s390x binary to releases
Summary
Currently there is no binary for linux/s390x. But in out data center we do need s390x support.
Steps to reproduce
Go to the the release page of the release-cli. You will not find a s390x binary.
What is the current bug behavior?
No linux/s390x binary on the release page.
What is the expected correct behavior?
linux/s390x binary on the release page.
Relevant logs and/or screenshots
Gox is supporting linux/s390x, so I did a cross build for the release-cli.
[user@linux/amd64 release-cli]$ export BUILD_PLATFORMS="-osarch='linux/s390x'"
[user@linux/amd64 release-cli]$ make build-binaries
rm -rf bin/*
rm -rf out/*
mkdir -p bin/
mkdir -p out/cover/ out/junit/
go install github.com/jstemmer/go-junit-report
go: downloading github.com/jstemmer/go-junit-report v1.0.0
go install github.com/mitchellh/gox
go: downloading github.com/mitchellh/gox v1.0.1
go: downloading github.com/mitchellh/iochan v1.0.0
go: downloading github.com/hashicorp/go-version v1.4.0
# Building release-cli in version 0.14.0 for -osarch='linux/s390x'
/home/linux/amd64/Projects/release-cli/bin/gox -osarch='linux/s390x' \
-ldflags '-X "main.VERSION=0.14.0" -s -w' \
-output="bin/binaries/release-cli-{{.OS}}-{{.Arch}}" \
./cmd/release-cli
Number of parallel builds: 1
--> linux/s390x: gitlab.com/gitlab-org/release-cli/cmd/release-cli
[user@linux/amd64 release-cli]$ file bin/binaries/release-cli-linux-s390x
bin/binaries/release-cli-linux-s390x: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, Go BuildID=9UnSqib8qbYSfeuxZoZw/IbEPRLqzKDaSgilXw9Fq/vdw_JkApnR38R4MhGvdM/_dFgt2LO4dhyIixbXsTo, stripped
I tested the compiled binary on s390x architecture.
[user@linux/s390x ~]$ uname -a
Linux linux/s390x 4.18.0-425.3.1.el8.s390x #1 SMP Fri Sep 30 11:35:32 EDT 2022 s390x s390x s390x GNU/Linux
user@linux/s390x ~]$ ./release-cli-linux-s390x --version
release-cli version 0.14.0
[user@linux/s390x ~]$ ./release-cli-linux-s390x help
NAME:
release-cli - A CLI tool that interacts with GitLab's Releases API
USAGE:
help [global options] command [command options] [arguments...]
VERSION:
0.14.0
DESCRIPTION:
CLI tool that interacts with GitLab's Releases API https://docs.gitlab.com/ee/api/releases/.
All configuration flags will default to GitLab's CI predefined environment variables (https://docs.gitlab.com/ee/ci/variables/predefined_variables.html).
To override these values, use the [GLOBAL OPTIONS].
Get started with release-cli https://gitlab.com/gitlab-org/release-cli.
AUTHOR:
GitLab Inc. <support@gitlab.com>
COMMANDS:
create Create a Release using GitLab's Releases API https://docs.gitlab.com/ee/api/releases/#create-a-release
get Get a Release by tag name using GitLab's Releases API https://docs.gitlab.com/ee/api/releases/index.html#get-a-release-by-a-tag-name
update Update a release using GitLab's Releases API https://docs.gitlab.com/ee/api/releases/#update-a-release
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--server-url value The base URL of the GitLab instance, including protocol and port, for example https://gitlab.example.com:8080 [$CI_SERVER_URL]
--job-token value Job token used for authenticating with the GitLab Releases API (default: ) [$CI_JOB_TOKEN]
--project-id value The current project's unique ID; used by GitLab CI internally [$CI_PROJECT_ID]
--timeout value HTTP client's timeout in Go's duration format https://golang.org/pkg/time/#ParseDuration (default: 30s) [$RELEASE_CLI_TIMEOUT]
--private-token value Private token used for authenticating with the GitLab Releases API, requires api scope https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html, overrides job-token (default: ) [$GITLAB_PRIVATE_TOKEN]
--additional-ca-cert-bundle value Configure a custom SSL CA certificate authority, can be a path to file or the content of the certificate [$ADDITIONAL_CA_CERT_BUNDLE]
--insecure-https Set to true if you want to skip the client verifying the server's certificate chain and host name (default: false) [$INSECURE_HTTPS]
--debug Set to true if you want extra debug output when running release-cli (default: false) [$DEBUG]
--help, -h Show help (default: false)
--version, -v Print the version (default: false)
Possible fixes
I added build, publish and release of linux/s390x binary and would like to merge it.
https://gitlab.com/dmittelstaedt/release-cli/-/tree/feat-s390x-binary
~"devops::release" ~"group::release" GitLab Release CLI Category:Release Orchestration