fix(jenkins) (#4970)

* fix(jenkins)

closes #4969

* use `get-port`
This commit is contained in:
Jacob Heider 2024-01-24 13:09:34 -05:00 committed by GitHub
parent e9a043112d
commit b57bb025e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,16 +44,16 @@ provides:
test:
dependencies:
curl.se: '*'
pkgx.sh: ^1
script:
- run: |
for i in $(seq 1 10); do
FREE_PORT=$((RANDOM % 10000 + 1024))
if ! nc -z localhost $FREE_PORT; then
echo $FREE_PORT
fi
done
- FREE_PORT=$(pkgx get-port)
- mkdir -p tmp var/jenkins
- jenkins-lts --version | grep {{version}}
- jenkins-lts --version
# version not updated in 2.426.3
- run: jenkins-lts --version | grep {{version}}
if: '<2.426.3 || >=2.426.4'
- jenkins-lts --httpPort=$FREE_PORT > var/jenkins/jenkins.log 2>&1 &
- PID=$!
- sleep 30
@ -62,4 +62,4 @@ test:
- cat output.html | grep '<html>'
env:
_JAVA_OPTIONS: -Djava.io.tmpdir=$PWD/tmp $_JAVA_OPTIONS
JENKINS_HOME: $PWD/var/jenkins
JENKINS_HOME: $PWD/var/jenkins