Skip to content
Closed
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
5 changes: 2 additions & 3 deletions .github/workflows/ci-auth-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Login SN docker hub
if: github.actor == 'streamnativebot'
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD}}"
- name: Run token tests
run: scripts/run-integration-tests.sh token
env:
PULSAR_IMAGE: ${{ github.actor == 'streamnativebot' && 'snstage/pulsar-all' || 'apachepulsar/pulsar-all' }}
PULSAR_IMAGE: snstage/pulsar-all
- name: Run TLS tests
run: scripts/run-integration-tests.sh tls
env:
PULSAR_IMAGE: ${{ github.actor == 'streamnativebot' && 'snstage/pulsar-all' || 'apachepulsar/pulsar-all' }}
PULSAR_IMAGE: snstage/pulsar-all
3 changes: 1 addition & 2 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Login SN docker hub
if: github.actor == 'streamnativebot'
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD}}"
- uses: actions/checkout@v2
- name: Run tests
run: scripts/run-integration-tests.sh
env:
PULSAR_IMAGE: ${{ github.actor == 'streamnativebot' && 'snstage/pulsar-all' || 'apachepulsar/pulsar-all' }}
PULSAR_IMAGE: snstage/pulsar-all
9 changes: 3 additions & 6 deletions .github/workflows/ci-functions-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Login SN docker hub
if: github.actor == 'streamnativebot'
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD}}"
- name: Set up Go 1.25.9
uses: actions/setup-go@v6
Expand All @@ -24,15 +23,14 @@ jobs:
- name: Function tests
run: scripts/run-integration-tests.sh function
env:
PULSAR_IMAGE: ${{ github.actor == 'streamnativebot' && 'snstage/pulsar-all' || 'apachepulsar/pulsar-all' }}
PULSAR_IMAGE: snstage/pulsar-all
- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@v3
sink-tests:
runs-on: ubuntu-latest
steps:
- name: Login SN docker hub
if: github.actor == 'streamnativebot'
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD}}"
- name: Set up Go 1.25.9
uses: actions/setup-go@v6
Expand All @@ -44,12 +42,11 @@ jobs:
- name: Sink tests
run: scripts/run-integration-tests.sh sink
env:
PULSAR_IMAGE: ${{ github.actor == 'streamnativebot' && 'snstage/pulsar-all' || 'apachepulsar/pulsar-all' }}
PULSAR_IMAGE: snstage/pulsar-all
source-tests:
runs-on: ubuntu-latest
steps:
- name: Login SN docker hub
if: github.actor == 'streamnativebot'
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD}}"
- name: Set up Go 1.25.9
uses: actions/setup-go@v6
Expand All @@ -61,4 +58,4 @@ jobs:
- name: Source tests
run: scripts/run-integration-tests.sh source
env:
PULSAR_IMAGE: ${{ github.actor == 'streamnativebot' && 'snstage/pulsar-all' || 'apachepulsar/pulsar-all' }}
PULSAR_IMAGE: snstage/pulsar-all
1 change: 0 additions & 1 deletion .github/workflows/ci-install-script-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Login SN docker hub
if: github.actor == 'streamnativebot'
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD}}"
- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci-packages-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Login SN docker hub
if: github.actor == 'streamnativebot'
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD}}"
- name: Set up Go 1.25.9
uses: actions/setup-go@v5
Expand All @@ -24,7 +23,7 @@ jobs:
- name: Packages tests
run: scripts/run-integration-tests.sh packages
env:
PULSAR_IMAGE: ${{ github.actor == 'streamnativebot' && 'snstage/pulsar-all' || 'apachepulsar/pulsar-all' }}
PULSAR_IMAGE: snstage/pulsar-all
- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@v3
26 changes: 26 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ set -e
readonly PULSARCTL_HOME=${PULSARCTL_HOME:-"/pulsarctl"}
readonly TEST_ARGS=${TEST_ARGS:-""}

function ensureJavaInPath() {
if command -v java >/dev/null 2>&1; then
return
fi

for dir in \
/opt/jvm/bin \
/opt/java/openjdk/bin \
/usr/local/openjdk-17/bin \
/usr/local/openjdk-11/bin \
/usr/lib/jvm/default-jvm/bin \
/usr/lib/jvm/java-17-openjdk/bin \
/usr/lib/jvm/java-11-openjdk/bin
do
if [[ -x "${dir}/java" ]]; then
export PATH="${dir}:${PATH}"
export JAVA_HOME="${dir%/bin}"
return
fi
done

echo "java executable not found in PATH or common JDK locations"
exit 1
}

function checkFunctionWorker() {
failed=0
until curl --silent localhost:8080/admin/v2/persistent/public/functions/coordinate/stats; do
Expand All @@ -20,6 +45,7 @@ function checkFunctionWorker() {
}

pushd ${PULSARCTL_HOME}
ensureJavaInPath
# startup pulsar service
scripts/pulsar-service-startup.sh

Expand Down
2 changes: 1 addition & 1 deletion scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

readonly PROJECT_ROOT=`cd $(dirname $0)/..; pwd`
readonly IMAGE_NAME=pulsarctl-test
readonly PULSAR_DEFAULT_VERSION="4.1.3"
readonly PULSAR_DEFAULT_VERSION="4.3.0-SNAPSHOT"
readonly PULSAR_VERSION=${PULSAR_VERSION:-${PULSAR_DEFAULT_VERSION}}
readonly PULSAR_IMAGE=${PULSAR_IMAGE:-"apachepulsar/pulsar-all"}

Expand Down
Loading