-
Notifications
You must be signed in to change notification settings - Fork 1
SERVER-216 #76
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
Closed
Closed
SERVER-216 #76
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #!/usr/bin/env bash | ||
| set -xeuo pipefail | ||
|
|
||
| function build_packages(){ | ||
| if [ "$ENV_DISTRO" = "" ]; then | ||
| echo "ENV_DISTRO is not set" | ||
| return | ||
| fi | ||
| export PATH=$PATH:/opt/golang/go/bin | ||
| GIT_DIR=$(git rev-parse --show-toplevel) | ||
|
|
||
| # build | ||
| cd "$GIT_DIR" || exit 1 | ||
| make clean | ||
| make | ||
|
|
||
| echo "build_package.sh version: $(git describe --tags --always)" | ||
| VERSION=$(git describe --tags --always) | ||
| export VERSION | ||
|
|
||
| # package | ||
| cd $GIT_DIR/pkg || exit 1 | ||
| make clean | ||
| 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" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/usr/bin/env bash | ||
| set -xeuo pipefail | ||
| DISTRO="$1" | ||
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,174 @@ | ||
| #!/usr/bin/env bash | ||
| set -xeuo pipefail | ||
|
|
||
| function install_deps_debian11() { | ||
| apt -y install ruby-rubygems make rpm git snapd curl binutils | ||
|
|
||
| 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 | ||
| install /opt/golang/go/bin/go /usr/local/bin/ | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_debian12() { | ||
| apt -y install ruby-rubygems make rpm git snapd curl binutils | ||
|
|
||
| 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 | ||
| install /opt/golang/go/bin/go /usr/local/bin/ | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_debian13() { | ||
| apt -y install ruby-rubygems make rpm git snapd curl binutils | ||
|
|
||
| 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 | ||
| install /opt/golang/go/bin/go /usr/local/bin/ | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_ubuntu20.04() { | ||
| apt -y install ruby make rpm git snapd curl binutils | ||
|
|
||
| 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 | ||
| install /opt/golang/go/bin/go /usr/local/bin/ | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_ubuntu22.04() { | ||
| apt -y install ruby-rubygems make rpm git snapd curl binutils | ||
|
|
||
| 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 | ||
| install /opt/golang/go/bin/go /usr/local/bin/ | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_ubuntu24.04() { | ||
| apt -y install ruby-rubygems make rpm git snapd curl binutils | ||
|
|
||
| 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 | ||
| install /opt/golang/go/bin/go /usr/local/bin/ | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_el8() { | ||
| dnf module enable -y ruby:2.7 | ||
| dnf -y install ruby ruby-devel redhat-rpm-config rubygems rpm-build make git | ||
| 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 | ||
| install /opt/golang/go/bin/go /usr/local/bin/ | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_el9() { | ||
| dnf -y install ruby rpmdevtools make git | ||
|
|
||
| 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 | ||
| install /opt/golang/go/bin/go /usr/local/bin/ | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_el10() { | ||
| dnf -y install ruby rpmdevtools make git | ||
|
|
||
| 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 | ||
| install /opt/golang/go/bin/go /usr/local/bin/ | ||
| gem install fpm -v 1.17.0 | ||
| } | ||
|
|
||
| function install_deps_amzn2023() { | ||
| dnf -y install ruby rpmdevtools make git | ||
|
|
||
| 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 | ||
| install /opt/golang/go/bin/go /usr/local/bin/ | ||
| gem install fpm -v 1.17.0 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/usr/bin/env bash | ||
| set -xeuo pipefail | ||
| DISTRO="$1" | ||
| REPO_NAME="$2" | ||
| git fetch --unshallow --tags --no-recurse-submodules | ||
| .github/packaging/common/example-test.sh "$DISTRO" "$REPO_NAME" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/usr/bin/env bats | ||
|
|
||
| @test "can run asconfig" { | ||
| asconfig --help | ||
| [ "$?" -eq 0 ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,151 @@ | ||
| name: build-artifacts.yml | ||
cinterloper marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| attestations: write | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - 'dev/*' | ||
| - 'hotfix/*' | ||
| tags: | ||
| - '*' | ||
|
|
||
|
|
||
| jobs: | ||
| build-artifacts: | ||
| strategy: | ||
| matrix: | ||
| distro: | ||
| - el8 | ||
| - el9 | ||
| - el10 | ||
| - amzn2023 | ||
| - debian12 | ||
| - debian13 | ||
| - ubuntu20.04 | ||
| - ubuntu22.04 | ||
| - ubuntu24.04 | ||
| host: | ||
| - ubuntu-24.04 | ||
| - ubuntu-24.04-arm | ||
| uses: aerospike/shared-workflows/.github/workflows/[email protected] | ||
| with: | ||
| runs-on: ${{ matrix.host }} | ||
| jf-project: database | ||
| jf-build-id: ${{ github.run_number }} | ||
| # this is the default behaviour so we can leave it out but if it is wanted to be explicit | ||
| # we need to use the ref not the ref_name in github actions. The ref_name is the short name and so not a valid ref. | ||
| # gh-source-ref: ${{ github.ref }} | ||
| build-script: local/.github/packaging/project/gha-main.sh "${{ matrix.distro }}" | ||
|
|
||
| gh-artifact-directory: dist | ||
| gh-artifact-name: unsigned-artifacts-${{ matrix.distro }}-${{ matrix.host }} | ||
| gh-retention-days: 1 | ||
| dry-run: false | ||
| oidc-provider-name: database-gh-aerospike | ||
| oidc-audience: database-gh-aerospike | ||
| jf-build-name: asconfig | ||
| sign-artifacts: | ||
| strategy: | ||
| matrix: | ||
| distro: | ||
| - el8 | ||
| - el9 | ||
| - el10 | ||
| - amzn2023 | ||
| - debian12 | ||
| - debian13 | ||
| - ubuntu20.04 | ||
| - ubuntu22.04 | ||
| - ubuntu24.04 | ||
| host: | ||
| - ubuntu-24.04 | ||
| - ubuntu-24.04-arm | ||
| needs: build-artifacts | ||
| uses: aerospike/shared-workflows/.github/workflows/[email protected] | ||
| with: | ||
| gh-artifact-name: signed-artifacts-${{ matrix.distro }}-${{ matrix.host }} | ||
| gh-unsigned-artifacts: unsigned-artifacts-${{ matrix.distro }}-${{ matrix.host }} | ||
| secrets: | ||
| gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} | ||
| gpg-public-key: ${{ secrets.GPG_PUBLIC_KEY }} | ||
| gpg-key-pass: ${{ secrets.GPG_PASS }} | ||
| upload-artifacts: | ||
| strategy: | ||
| matrix: | ||
| distro: | ||
| - el8 | ||
| - el9 | ||
| - el10 | ||
| - amzn2023 | ||
| - debian12 | ||
| - debian13 | ||
| - ubuntu20.04 | ||
| - ubuntu22.04 | ||
| - ubuntu24.04 | ||
| host: | ||
| - ubuntu-24.04 | ||
| - ubuntu-24.04-arm | ||
| needs: sign-artifacts | ||
| uses: aerospike/shared-workflows/.github/workflows/[email protected] | ||
| with: | ||
| jf-project: database | ||
| jf-build-name: asconfig | ||
| version: ${{ github.ref_name }} | ||
| oidc-provider-name: database-gh-aerospike | ||
| oidc-audience: database-gh-aerospike | ||
| gh-artifact-name: signed-artifacts-${{ matrix.distro }}-${{ matrix.host }} | ||
| gh-retention-days: 1 | ||
| dry-run: false | ||
| jf-build-id: ${{ github.run_number }} | ||
| jf-metadata-build-id: ${{ github.run_number }}-metadata | ||
| test-install-from-jfrog-and-execute: | ||
| strategy: | ||
| matrix: | ||
| distro: | ||
| - el8 | ||
| - el9 | ||
| - el10 | ||
| - amzn2023 | ||
| - debian12 | ||
| - debian13 | ||
| - ubuntu20.04 | ||
| - ubuntu22.04 | ||
| - ubuntu24.04 | ||
| host: | ||
| - ubuntu-24.04 | ||
| - ubuntu-24.04-arm | ||
| needs: upload-artifacts | ||
| env: | ||
| JFROG_CLI_BUILD_NAME: ${{ inputs.jf-build-name || github.workflow }} | ||
| JFROG_CLI_LOG_LEVEL: INFO | ||
| runs-on: ${{ matrix.host }} | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| attestations: write | ||
| id-token: write | ||
| steps: | ||
| - name: Install JFrog CLI | ||
| id: jf | ||
| uses: jfrog/setup-jfrog-cli@5b06f730cc5a6f55d78b30753f8583454b08c0aa # v4.8.1 | ||
| env: | ||
| JF_URL: https://artifact.aerospike.io | ||
| JF_PROJECT: database | ||
| with: | ||
| oidc-provider-name: database-gh-aerospike | ||
| oidc-audience: database-gh-aerospike | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: ${{ github.ref }} | ||
| submodules: recursive | ||
|
|
||
| - name: Run test cases | ||
| env: | ||
| JF_TOKEN: ${{ steps.jf.outputs.oidc-token }} | ||
| JF_USERNAME: ${{ steps.jf.outputs.oidc-user }} | ||
| run: .github/packaging/project/test/gha-test-main.sh ${{ matrix.distro }} ${{ github.event.repository.name }} | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.