Skip to content

Commit 982c07f

Browse files
Merge pull request #17 from y-trudeau/fix_issue_16
Fix for issue #16, needed to remove deprecated parameters for go buil…
2 parents e662e87 + 7440efb commit 982c07f

File tree

9 files changed

+18
-15
lines changed

9 files changed

+18
-15
lines changed

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function precheck() {
8484
ok=1
8585
fi
8686

87-
if ! go version | egrep -q 'go(1\.1[6789])' ; then
87+
if ! go version | egrep -q 'go(1\.1[6789])|go(1\.2[0])' ; then
8888
echo "go version must be 1.16 or above"
8989
ok=1
9090
fi
@@ -115,7 +115,7 @@ build_binary() {
115115
debug "Building via $(go version)"
116116
mkdir -p "$binary_build_path/bin"
117117
rm -f $binary_artifact
118-
gobuild="go build -i ${opt_race} -ldflags \"$ldflags\" -o $binary_artifact go/cmd/orchestrator/main.go"
118+
gobuild="go build ${opt_race} -ldflags \"$ldflags\" -o $binary_artifact go/cmd/orchestrator/main.go"
119119

120120
case $os in
121121
'linux')

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# ORC_USER (default: orc_server_user): username used to login to orchestrator backend MySQL server
1515
# ORC_PASSWORD (default: orc_server_password): password used to login to orchestrator backend MySQL server
1616

17-
FROM golang:1.16.6-alpine3.14 as build
17+
FROM golang:1.20.3-alpine3.17 as build
1818

1919
ENV GOPATH=/tmp/go
2020

@@ -28,7 +28,7 @@ RUN rsync -av $(find /tmp/orchestrator-release -type d -name orchestrator -maxde
2828
RUN rsync -av $(find /tmp/orchestrator-release -type d -name orchestrator-client -maxdepth 2)/ /
2929
RUN cp conf/orchestrator-sample-sqlite.conf.json /etc/orchestrator.conf.json
3030

31-
FROM alpine:3.14
31+
FROM alpine:3.17
3232

3333
RUN apk --no-cache add bash curl jq
3434

docker/Dockerfile.packaging

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
# ORC_USER (default: orc_server_user): username used to login to orchestrator backend MySQL server
1515
# ORC_PASSWORD (default: orc_server_password): password used to login to orchestrator backend MySQL server
1616

17-
FROM golang:1.16.6-stretch
17+
FROM golang:1.20.3-bullseye
1818

1919
RUN apt-get update
2020
RUN apt-get install -y ruby ruby-dev rubygems build-essential
21-
RUN gem install --no-ri --no-rdoc fpm
21+
RUN gem install --no-document fpm
2222
ENV GOPATH=/tmp/go
2323

2424
RUN apt-get install -y curl rsync gcc g++ bash git tar rpm

docker/Dockerfile.raft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16.6-stretch
1+
FROM golang:1.20.3-bullseye
22
LABEL maintainer="[email protected]"
33

44
RUN apt-get update -q -y

docker/Dockerfile.system

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16.6-stretch
1+
FROM golang:1.20.3-bullseye
22
LABEL maintainer="[email protected]"
33

44
ARG ci_env_repo="https://github.com/percona/orchestrator-ci-env.git"
@@ -8,7 +8,7 @@ RUN echo "ci_env_repo: $ci_env_repo"
88
RUN echo "ci_env_branch: $ci_env_branch"
99

1010
RUN apt-get update -q -y
11-
RUN apt-get install -y sudo haproxy python git jq rsync libaio1 libnuma1 mysql-client bsdmainutils less vim
11+
RUN apt-get install -y sudo haproxy python git jq rsync libaio1 libnuma1 default-mysql-client bsdmainutils less vim
1212

1313
RUN mkdir /orchestrator
1414
WORKDIR /orchestrator

docker/Dockerfile.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16.6-stretch
1+
FROM golang:1.20.3-bullseye
22
LABEL maintainer="[email protected]"
33

44
RUN apt-get update

docker/docker-entry-raft

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ done
3434
echo "export PS1=\"\\[\\e[0;33m\\]\\h \\[\\e[0;97m\\]\\w\\[\\e[0;37m\\]\\\$ \"" >> /etc/bash.bashrc
3535
echo 'export ORCHESTRATOR_API="http://127.0.0.1:3007/api http://127.0.0.1:3008/api http://127.0.0.1:3009/api"' | sudo tee /etc/profile.d/orchestrator-client.sh
3636

37+
# wait for registration and election
38+
sleep 10
39+
3740
echo ""
3841
echo "Here's how to invoke orchestrator-client:"
3942
echo "---"

script/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ export GOPATH="$PWD/.gopath"
2727
cd .gopath/src/github.com/openark/orchestrator
2828

2929
# We put the binaries directly into the bindir, because we have no need for shim wrappers
30-
go build -i -o "$bindir/orchestrator" -ldflags "-X main.AppVersion=${version} -X main.BuildDescribe=${describe}" ./go/cmd/orchestrator/main.go
30+
go build -o "$bindir/orchestrator" -ldflags "-X main.AppVersion=${version} -X main.BuildDescribe=${describe}" ./go/cmd/orchestrator/main.go
3131

3232
rsync -qa ./resources $bindir/

script/ensure-go-installed

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

3-
PREFERRED_GO_VERSION=go1.16.6
4-
SUPPORTED_GO_VERSIONS='go1.1[6789]'
3+
PREFERRED_GO_VERSION=go1.20.3
4+
SUPPORTED_GO_VERSIONS='go1.1[6789]|go1.2[0]'
55

66
export ROOTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
77
cd $ROOTDIR
88

99
# If Go isn't installed globally, setup environment variables for local install.
10-
if [ -z "$(which go)" ] || [ -z "$(go version | grep "$SUPPORTED_GO_VERSIONS")" ]; then
10+
if [ -z "$(which go)" ] || [ -z "$(go version | egrep "$SUPPORTED_GO_VERSIONS")" ]; then
1111
GODIR="$ROOTDIR/.vendor/golocal"
1212

1313
if [ $(uname -s) = "Darwin" ]; then
@@ -20,7 +20,7 @@ if [ -z "$(which go)" ] || [ -z "$(go version | grep "$SUPPORTED_GO_VERSIONS")"
2020
fi
2121

2222
# Fail if correct go version still unfound
23-
if [ -z "$(which go)" ] || [ -z "$(go version | grep "$SUPPORTED_GO_VERSIONS")" ]; then
23+
if [ -z "$(which go)" ] || [ -z "$(go version | egrep "$SUPPORTED_GO_VERSIONS")" ]; then
2424
exit 1
2525
fi
2626

0 commit comments

Comments
 (0)