Skip to content
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

ci: support no secrets for dependabot #3473

Merged
merged 2 commits into from
Dec 21, 2023
Merged
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
20 changes: 19 additions & 1 deletion .ci/scripts/jboss-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,32 @@
# Bash strict mode
set -eo pipefail

# Retry the given command for the given times.
retry() {
local retries=$1
shift
local count=0
until "$@"; do
exit=$?
wait=$((2 ** count))
count=$((count + 1))
if [ $count -lt "$retries" ]; then
sleep $wait
else
return $exit
fi
done
return 0
}

## This script is used by the CI to be able to re-tag the docker images
## to use the official docker namespace.
## Or by an Elastic employee to configure the docker images as needed.
while read -r i ; do
[[ -z $i ]] && continue
name="${i##*/}"
echo "::group::$name"
docker pull docker.elastic.co/observability-ci/$name --platform linux/amd64
retry 3 docker pull --platform linux/amd64 docker.elastic.co/observability-ci/$name
docker tag docker.elastic.co/observability-ci/$name $i
echo "::endgroup::"
done < .ci/scripts/jboss-docker-images.txt
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ jobs:
name: JBoss integration tests
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
# If no PR event or if a PR event that's caused by a non-fork and non dependabot actor
if: github.event_name != 'pull_request' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]' )
steps:
- uses: actions/checkout@v4
- uses: elastic/apm-pipeline-library/.github/actions/docker-login@current
Expand Down
Loading