Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- name: Get Ansible Control Host's public IP
shell: curl -ks --ipv4 https://ifconfig.me
shell: curl -fks --ipv4 https://ifconfig.me
register: control_host_ip
no_log: "{{ no_log_sensitive }}"

Expand Down
8 changes: 4 additions & 4 deletions .github/scripts/snyk-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ check_github_issue_exists() {
# Extract the CVE ID
local CVE_ID=$(echo "$issue_title" | grep -oE '(CVE-[0-9]{4}-[0-9]{4,7}|SNYK-[A-Z]+-[A-Z0-9]+-[0-9]{4,7})')
local search_url="https://api.github.com/search/issues?q=$CVE_ID+is%3Aissue+sort%3Aupdated-desc+repo:$KEYCLOAK_REPO"
local response=$(curl -s -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "$search_url")
local response=$(curl -f -s -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "$search_url")
local count=$(echo "$response" | jq '.total_count')

# Check for bad credentials
Expand Down Expand Up @@ -52,7 +52,7 @@ create_github_issue() {
local api_url="https://api.github.com/repos/$KEYCLOAK_REPO/issues"
local data=$(jq -n --arg title "$title" --arg body "$body" --arg branch "backport/$BRANCH_NAME" \
'{title: $title, body: $body, labels: ["status/triage", "kind/cve", "kind/bug", $branch]}')
local response=$(curl -s -w "%{http_code}" -X POST -H "Authorization: token $GITHUB_TOKEN" -H "Content-Type: application/json" -d "$data" "$api_url")
local response=$(curl -f -s -w "%{http_code}" -X POST -H "Authorization: token $GITHUB_TOKEN" -H "Content-Type: application/json" -d "$data" "$api_url")
local http_code=$(echo "$response" | tail -n1)

if [[ $http_code -eq 201 ]]; then
Expand All @@ -67,11 +67,11 @@ create_github_issue() {
update_github_issue() {
local issue_id="$1"
local api_url="https://api.github.com/repos/$KEYCLOAK_REPO/issues/$issue_id"
local existing_labels=$(curl -s -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "$api_url" | jq '.labels | .[].name' | jq -s .)
local existing_labels=$(curl -f -s -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "$api_url" | jq '.labels | .[].name' | jq -s .)
local new_label="backport/$BRANCH_NAME"
local updated_labels=$(echo "$existing_labels" | jq --arg new_label "$new_label" '. + [$new_label] | unique')
local data=$(jq -n --argjson labels "$updated_labels" '{labels: $labels}')
local response=$(curl -s -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" -H "Content-Type: application/json" -d "$data" "$api_url")
local response=$(curl -f -s -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" -H "Content-Type: application/json" -d "$data" "$api_url")
local http_code=$(echo "$response" | tail -n1)

if [[ $http_code -eq 200 ]]; then
Expand Down
4 changes: 2 additions & 2 deletions distribution/licenses-common/download-license-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ do
# Windows won't like it if : is used as a separator
filename="$groupid,$artifactid,$version,$name.txt"
echo "$filename"
curl -LsS -o "$output_dir/$filename" "$url"
curl -LfsS -o "$output_dir/$filename" "$url"
done

xmlstarlet sel -T -t -m "/licenseSummary/others/other/licenses/license" -v "../../description/text()" -o $'\t' -v "name/text()" -o $'\t' -v "url/text()" --nl "$xml" | \
Expand All @@ -73,7 +73,7 @@ do
# Windows won't like it if : is used as a separator
filename="$description,$name.txt"
echo "$filename"
curl -LsS -o "$output_dir/$filename" "$url"
curl -LfsS -o "$output_dir/$filename" "$url"
done

echo "==> Normalizing license line endings" >&2
Expand Down
2 changes: 1 addition & 1 deletion operator/scripts/install-olm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -euxo pipefail

mkdir -p /tmp/olm/
curl -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.26.0/install.sh -o /tmp/olm/install.sh
curl -f -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.26.0/install.sh -o /tmp/olm/install.sh
chmod +x /tmp/olm/install.sh
/tmp/olm/install.sh v0.26.0
2 changes: 1 addition & 1 deletion quarkus/set-quarkus-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if ! $(curl --output /dev/null --silent --head --fail "$QUARKUS_BOM_URL"); then
exit 1
fi

QUARKUS_BOM=$(curl -s "$QUARKUS_BOM_URL")
QUARKUS_BOM=$(curl -f -s "$QUARKUS_BOM_URL")

echo "Setting Quarkus version: $QUARKUS_VERSION"
$(mvn versions:set-property -f ../pom.xml -Dproperty=quarkus.version,quarkus.build.version -DnewVersion="$QUARKUS_VERSION" 1> /dev/null)
Expand Down