-
Notifications
You must be signed in to change notification settings - Fork 21
SERVER-216 #383
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
SERVER-216 #383
Changes from all commits
c85d7f1
9161259
0e64809
e580e4a
38c7ab3
52251c7
132e38c
3390880
3f5c0e8
c6536c1
965f2cb
48a38e1
74ddf60
cac2383
c4fe6ce
6c6080b
917dbb6
55a4aad
0354073
1825bc7
2c217d7
ec2aafb
7647e9a
33635b6
770214f
1bc80c0
5e08c6f
4e1d549
f8c9369
2d49f9b
7dce319
87160b4
e645290
232c1d6
090714d
99b5166
c9561c3
5bbd753
0e46f52
b9d2ed2
c1e8758
2879bc3
0c0c4ee
387df5d
54962d2
7f6fe42
b4fde91
6ca90fc
e5b60b5
f8a90c5
7bce621
3692ad3
378b811
e8e8d0d
45e3c36
67d0e06
91f2379
b9c05ca
a1c68d0
ef4ec11
67367d2
80d558c
8b4f67c
7fab7c1
2e6ac30
2213967
d62762e
a607bcd
2b6d832
e3481d2
4f3d18e
ee19fd2
3f7bc39
7d17c90
b8be097
665951a
666868e
6af470d
edeca78
48a6065
b58c763
23683c7
c0404c9
7a87bc5
f4f2b5d
5568455
189608b
e94ecfb
3a3a486
8c3d1dd
e91c41c
85e216a
5ee862e
97d4624
3cab2b9
672b919
d2a3e91
5332247
c967ba9
904493a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #!/usr/bin/env bash | ||
| set -xeuo pipefail | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the sake of consistency, asconfig uses should we add that here? |
||
| function build_packages(){ | ||
| if [ "$ENV_DISTRO" = "" ]; then | ||
| echo "ENV_DISTRO is not set" | ||
| return | ||
| fi | ||
| chown -R root:root . | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this chown needed? |
||
| GIT_DIR=$(git rev-parse --show-toplevel) | ||
| cd "$GIT_DIR" | ||
| make one-file | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think asadm's default make command builds targets "one-dir". Why go with "one-file" here? |
||
| cd $GIT_DIR/pkg | ||
| echo "building package for $BUILD_DISTRO" | ||
|
|
||
| if [[ $ENV_DISTRO == *"ubuntu"* ]]; then | ||
| make deb | ||
| elif [[ $ENV_DISTRO == *"debian"* ]]; then | ||
| make deb | ||
| elif [[ $ENV_DISTRO == *"el"* ]]; then | ||
| make rpm | ||
| elif [[ $ENV_DISTRO == *"amzn"* ]]; then | ||
| make rpm | ||
| else | ||
| make tar | ||
| fi | ||
|
|
||
| mkdir -p /tmp/output/$ENV_DISTRO | ||
| cp -a $GIT_DIR/pkg/target/* /tmp/output/$ENV_DISTRO | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/usr/bin/env bash | ||
| set -xeuo pipefail | ||
|
|
||
| DISTRO="$1" | ||
| env | ||
| cd local | ||
| git fetch --unshallow --tags --no-recurse-submodules | ||
| git submodule update --init | ||
| ls -laht | ||
| git branch -v | ||
| .github/packaging/common/entrypoint.sh -c -d $DISTRO | ||
| .github/packaging/common/entrypoint.sh -e -d $DISTRO | ||
| ls -laht ../dist |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,274 @@ | ||
| #!/usr/bin/env bash | ||
| set -xeuo pipefail | ||
|
|
||
| DEBIAN_12_DEPS="libreadline8 libreadline-dev ruby-rubygems make rpm git snapd curl binutils rsync libssl3 libssl-dev lzma lzma-dev libffi-dev build-essential gcc g++" | ||
| DEBIAN_13_DEPS="libreadline8 libreadline-dev ruby-rubygems make rpm git snapd curl binutils rsync libssl3 libssl-dev lzma liblzma-dev libffi-dev libsqlite3-dev build-essential gcc g++ zlib1g-dev libbz2-dev libreadline-dev libncursesw5-dev libnss3-dev uuid-dev tk-dev xz-utils" | ||
| UBUNTU_2004_DEPS="libreadline8 libreadline-dev ruby make rpm git snapd curl binutils rsync libssl1.1 libssl-dev lzma lzma-dev libffi-dev build-essential gcc g++" | ||
| UBUNTU_2204_DEPS="libreadline8 libreadline-dev ruby-rubygems make rpm git snapd curl binutils rsync libssl3 libssl-dev lzma lzma-dev libffi-dev build-essential gcc g++" | ||
| UBUNTU_2404_DEPS="libreadline8 libreadline-dev ruby-rubygems make rpm git snapd curl binutils rsync libssl3 libssl-dev lzma lzma-dev libffi-dev build-essential gcc g++" | ||
| EL8_DEPS="ruby rubygems redhat-rpm-config rpm-build make git rsync gcc gcc-c++ make automake zlib zlib-devel libffi-devel openssl-devel bzip2-devel xz-devel xz xz-libs sqlite sqlite-devel sqlite-libs" | ||
| EL9_DEPS="ruby rpmdevtools make git rsync gcc g++ make automake zlib zlib-devel libffi-devel openssl-devel bzip2-devel xz-devel xz xz-libs sqlite sqlite-devel sqlite-libs" | ||
| EL10_DEPS="ruby rpmdevtools make git rsync gcc g++ make automake zlib zlib-devel libffi-devel openssl-devel bzip2-devel xz-devel xz xz-libs sqlite sqlite-devel sqlite-libs" | ||
| AMZN2023_DEPS="readline-devel ruby rpmdevtools make git rsync gcc g++ make automake zlib zlib-devel libffi-devel openssl-devel bzip2-devel xz-devel xz xz-libs sqlite sqlite-devel sqlite-libs" | ||
|
|
||
| function install_deps_debian12() { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we have a new line here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add a new line for readable? |
||
| apt -y install $DEBIAN_12_DEPS | ||
| if [ "$(uname -m)" = "x86_64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-amd64.tar.gz -o /tmp/go1.24.6.linux-amd64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-amd64.tar.gz -C /opt/golang | ||
| elif [ "$(uname -m)" = "aarch64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-arm64.tar.gz -o /tmp/go1.24.6.linux-arm64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-arm64.tar.gz -C /opt/golang | ||
| else | ||
| echo "unknown arch $(uname -m)" | ||
| exit 1 | ||
| fi | ||
| /opt/golang/go/bin/go install github.com/asdf-vm/asdf/cmd/[email protected] | ||
| install /root/go/bin/asdf /usr/local/bin/asdf | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is the use of "asdf" coming from?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see pyenv (or nowadays uv) used for python version management more often |
||
| asdf plugin add python https://github.com/asdf-community/asdf-python.git | ||
| asdf install python 3.10.18 | ||
| asdf set python 3.10.18 | ||
| echo "python 3.10.18" > /.tool-versions | ||
| echo "python 3.10.18" > /root/.tool-versions | ||
| asdf exec python -m pip install --break-system-packages pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python3 | ||
| install /root/.asdf/installs/python/3.10.18/bin/pipenv /usr/bin/pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip /usr/bin/pip | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip3 /usr/bin/pip3 | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_debian13() { | ||
| apt -y install $DEBIAN_13_DEPS | ||
| if [ "$(uname -m)" = "x86_64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-amd64.tar.gz -o /tmp/go1.24.6.linux-amd64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-amd64.tar.gz -C /opt/golang | ||
| elif [ "$(uname -m)" = "aarch64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-arm64.tar.gz -o /tmp/go1.24.6.linux-arm64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-arm64.tar.gz -C /opt/golang | ||
| else | ||
| echo "unknown arch $(uname -m)" | ||
| exit 1 | ||
| fi | ||
| /opt/golang/go/bin/go install github.com/asdf-vm/asdf/cmd/[email protected] | ||
| install /root/go/bin/asdf /usr/local/bin/asdf | ||
| asdf plugin add python https://github.com/asdf-community/asdf-python.git | ||
| asdf install python 3.10.18 | ||
| asdf set python 3.10.18 | ||
| echo "python 3.10.18" > /.tool-versions | ||
| echo "python 3.10.18" > /root/.tool-versions | ||
| asdf exec python -m pip install --break-system-packages pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python3 | ||
| install /root/.asdf/installs/python/3.10.18/bin/pipenv /usr/bin/pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip /usr/bin/pip | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip3 /usr/bin/pip3 | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we remove extra empty lines |
||
|
|
||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_ubuntu20.04() { | ||
| apt -y install $UBUNTU_2004_DEPS | ||
| if [ "$(uname -m)" = "x86_64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-amd64.tar.gz -o /tmp/go1.24.6.linux-amd64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-amd64.tar.gz -C /opt/golang | ||
| elif [ "$(uname -m)" = "aarch64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-arm64.tar.gz -o /tmp/go1.24.6.linux-arm64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-arm64.tar.gz -C /opt/golang | ||
| else | ||
| echo "unknown arch $(uname -m)" | ||
| exit 1 | ||
| fi | ||
| /opt/golang/go/bin/go install github.com/asdf-vm/asdf/cmd/[email protected] | ||
| install /root/go/bin/asdf /usr/local/bin/asdf | ||
| asdf plugin add python https://github.com/asdf-community/asdf-python.git | ||
| asdf install python 3.10.18 | ||
| asdf set python 3.10.18 | ||
| echo "python 3.10.18" > /.tool-versions | ||
| echo "python 3.10.18" > /root/.tool-versions | ||
| asdf exec python -m pip install pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python3 | ||
| install /root/.asdf/installs/python/3.10.18/bin/pipenv /usr/bin/pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip /usr/bin/pip | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip3 /usr/bin/pip3 | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_ubuntu22.04() { | ||
| apt -y install $UBUNTU_2204_DEPS | ||
| if [ "$(uname -m)" = "x86_64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-amd64.tar.gz -o /tmp/go1.24.6.linux-amd64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-amd64.tar.gz -C /opt/golang | ||
| elif [ "$(uname -m)" = "aarch64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-arm64.tar.gz -o /tmp/go1.24.6.linux-arm64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-arm64.tar.gz -C /opt/golang | ||
| else | ||
| echo "unknown arch $(uname -m)" | ||
| exit 1 | ||
| fi | ||
| /opt/golang/go/bin/go install github.com/asdf-vm/asdf/cmd/[email protected] | ||
| install /root/go/bin/asdf /usr/local/bin/asdf | ||
| asdf plugin add python https://github.com/asdf-community/asdf-python.git | ||
| asdf install python 3.10.18 | ||
| asdf set python 3.10.18 | ||
| echo "python 3.10.18" > /.tool-versions | ||
| echo "python 3.10.18" > /root/.tool-versions | ||
| asdf exec python -m pip install pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python3 | ||
| install /root/.asdf/installs/python/3.10.18/bin/pipenv /usr/bin/pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip /usr/bin/pip | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip3 /usr/bin/pip3 | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_ubuntu24.04() { | ||
| apt -y install $UBUNTU_2404_DEPS | ||
| if [ "$(uname -m)" = "x86_64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-amd64.tar.gz -o /tmp/go1.24.6.linux-amd64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-amd64.tar.gz -C /opt/golang | ||
| elif [ "$(uname -m)" = "aarch64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-arm64.tar.gz -o /tmp/go1.24.6.linux-arm64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-arm64.tar.gz -C /opt/golang | ||
| else | ||
| echo "unknown arch $(uname -m)" | ||
| exit 1 | ||
| fi | ||
|
|
||
| /opt/golang/go/bin/go install github.com/asdf-vm/asdf/cmd/[email protected] | ||
| install /root/go/bin/asdf /usr/local/bin/asdf | ||
| asdf plugin add python https://github.com/asdf-community/asdf-python.git | ||
| asdf install python 3.10.18 | ||
| asdf set python 3.10.18 | ||
| echo "python 3.10.18" > /.tool-versions | ||
| echo "python 3.10.18" > /root/.tool-versions | ||
| asdf exec python -m pip install --break-system-packages pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python3 | ||
| install /root/.asdf/installs/python/3.10.18/bin/pipenv /usr/bin/pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip /usr/bin/pip | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip3 /usr/bin/pip3 | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_el8() { | ||
| dnf module enable -y ruby:2.7 | ||
| yum install -y "https://download.rockylinux.org/pub/rocky/8.10/Devel/$(uname -m)/os/Packages/r/readline-devel-7.0-10.el8.$(uname -m).rpm" | ||
| dnf -y install $EL8_DEPS | ||
| gem install --no-document fpm | ||
| if [ "$(uname -m)" = "x86_64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-amd64.tar.gz -o /tmp/go1.24.6.linux-amd64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-amd64.tar.gz -C /opt/golang | ||
| elif [ "$(uname -m)" = "aarch64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-arm64.tar.gz -o /tmp/go1.24.6.linux-arm64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-arm64.tar.gz -C /opt/golang | ||
| else | ||
| echo "unknown arch $(uname -m)" | ||
| exit 1 | ||
| fi | ||
| /opt/golang/go/bin/go install github.com/asdf-vm/asdf/cmd/[email protected] | ||
| install /root/go/bin/asdf /usr/local/bin/asdf | ||
| asdf plugin add python https://github.com/asdf-community/asdf-python.git | ||
| asdf install python 3.10.18 | ||
| asdf set python 3.10.18 | ||
| echo "python 3.10.18" > /.tool-versions | ||
| echo "python 3.10.18" > /root/.tool-versions | ||
| asdf exec python -m pip install pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python3 | ||
| install /root/.asdf/installs/python/3.10.18/bin/pipenv /usr/bin/pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip /usr/bin/pip | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip3 /usr/bin/pip3 | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line. |
||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_el9() { | ||
| yum install -y "https://download.rockylinux.org/pub/rocky/9.6/devel/$(uname -m)/os/Packages/r/readline-devel-8.1-4.el9.$(uname -m).rpm" | ||
| dnf -y install $EL9_DEPS | ||
|
|
||
| if [ "$(uname -m)" = "x86_64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-amd64.tar.gz -o /tmp/go1.24.6.linux-amd64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-amd64.tar.gz -C /opt/golang | ||
| elif [ "$(uname -m)" = "aarch64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-arm64.tar.gz -o /tmp/go1.24.6.linux-arm64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-arm64.tar.gz -C /opt/golang | ||
| else | ||
| echo "unknown arch $(uname -m)" | ||
| exit 1 | ||
| fi | ||
| /opt/golang/go/bin/go install github.com/asdf-vm/asdf/cmd/[email protected] | ||
| install /root/go/bin/asdf /usr/local/bin/asdf | ||
| asdf plugin add python https://github.com/asdf-community/asdf-python.git | ||
| asdf install python 3.10.18 | ||
| asdf set python 3.10.18 | ||
| echo "python 3.10.18" > /.tool-versions | ||
| echo "python 3.10.18" > /root/.tool-versions | ||
| asdf exec python -m pip install --break-system-packages pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python3 | ||
| install /root/.asdf/installs/python/3.10.18/bin/pipenv /usr/bin/pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip /usr/bin/pip | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip3 /usr/bin/pip3 | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_el10() { | ||
| yum install -y "https://download.rockylinux.org/pub/rocky/10.0/devel/$(uname -m)/os/Packages/r/readline-devel-8.2-11.el10.$(uname -m).rpm" | ||
| dnf -y install $EL10_DEPS | ||
| if [ "$(uname -m)" = "x86_64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-amd64.tar.gz -o /tmp/go1.24.6.linux-amd64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-amd64.tar.gz -C /opt/golang | ||
| elif [ "$(uname -m)" = "aarch64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-arm64.tar.gz -o /tmp/go1.24.6.linux-arm64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-arm64.tar.gz -C /opt/golang | ||
| else | ||
| echo "unknown arch $(uname -m)" | ||
| exit 1 | ||
| fi | ||
| /opt/golang/go/bin/go install github.com/asdf-vm/asdf/cmd/[email protected] | ||
| install /root/go/bin/asdf /usr/local/bin/asdf | ||
| asdf plugin add python https://github.com/asdf-community/asdf-python.git | ||
| asdf install python 3.10.18 | ||
| asdf set python 3.10.18 | ||
| echo "python 3.10.18" > /.tool-versions | ||
| echo "python 3.10.18" > /root/.tool-versions | ||
| asdf exec python -m pip install --break-system-packages pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python3 | ||
| install /root/.asdf/installs/python/3.10.18/bin/pipenv /usr/bin/pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip /usr/bin/pip | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip3 /usr/bin/pip3 | ||
| gem install fpm | ||
| } | ||
|
|
||
| function install_deps_amzn2023() { | ||
| dnf -y install $AMZN2023_DEPS | ||
| if [ "$(uname -m)" = "x86_64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-amd64.tar.gz -o /tmp/go1.24.6.linux-amd64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-amd64.tar.gz -C /opt/golang | ||
| elif [ "$(uname -m)" = "aarch64" ]; then | ||
| curl -L https://go.dev/dl/go1.24.6.linux-arm64.tar.gz -o /tmp/go1.24.6.linux-arm64.tar.gz | ||
| mkdir -p /opt/golang && tar -zxvf /tmp/go1.24.6.linux-arm64.tar.gz -C /opt/golang | ||
| else | ||
| echo "unknown arch $(uname -m)" | ||
| exit 1 | ||
| fi | ||
| /opt/golang/go/bin/go install github.com/asdf-vm/asdf/cmd/[email protected] | ||
| install /root/go/bin/asdf /usr/local/bin/asdf | ||
| asdf plugin add python https://github.com/asdf-community/asdf-python.git | ||
| asdf install python 3.10.18 | ||
| asdf set python 3.10.18 | ||
| echo "python 3.10.18" > /.tool-versions | ||
| echo "python 3.10.18" > /root/.tool-versions | ||
| asdf exec python -m pip install --break-system-packages pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python | ||
| install /root/.asdf/installs/python/3.10.18/bin/python /usr/bin/python3 | ||
| install /root/.asdf/installs/python/3.10.18/bin/pipenv /usr/bin/pipenv | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip /usr/bin/pip | ||
| install /root/.asdf/installs/python/3.10.18/bin/pip3 /usr/bin/pip3 | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env bash | ||
| set -xeuo pipefail | ||
| DISTRO="$1" | ||
| REPO_NAME="$2" | ||
| env | ||
| git fetch --unshallow --tags --no-recurse-submodules | ||
| .github/packaging/common/example-test.sh "$DISTRO" "$REPO_NAME" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/usr/bin/env bats | ||
|
|
||
| @test "can run asadm" { | ||
| asadm --help | ||
| [ "$?" -eq 0 ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've committed needed changes for makefiles and with that this file should be changed to:
function build_packages(){
if [ "$ENV_DISTRO" = "" ]; then
echo "ENV_DISTRO is not set"
return
fi
chown -R root:root .
GIT_DIR=$(git rev-parse --show-toplevel)
cd "$GIT_DIR"
echo "building package for $BUILD_DISTRO"
if [[ $ENV_DISTRO == "ubuntu" ]]; then
make deb
elif [[ $ENV_DISTRO == "debian" ]]; then
make deb
elif [[ $ENV_DISTRO == "el" ]]; then
make rpm
elif [[ $ENV_DISTRO == "amzn" ]]; then
make rpm
else
make tar
fi
mkdir -p /tmp/output/$ENV_DISTRO
cp -a $GIT_DIR/pkg/target/* /tmp/output/$ENV_DISTRO
}