Skip to main content

Check Network Access

This component checks network access to common build endpoints used in Appcircle workflows. It validates connectivity to package managers, build services, APIs, and custom-defined URLs during build time.

This component uses the URLs listed in the Network section to validate access to external resources during the build on the Appcircle runner

The code checks predefined or custom URLs using curl, allows adding extra URLs via step inputs, logs details for non-2xx HTTP responses, and fails only on network or server errors.

info
  • 2xx responses indicate successful requests.

  • 3xx responses are logged as WARN (network is reachable, but the service may not respond as expected).

  • 4xx/5xx responses and curl transport errors (exit codes, timeouts, DNS issues, SSL errors) are treated as FAIL and stop the build.

The curl exit code is also used to determine whether the connection was established. If HTTP responses are received, their headers and bodies are logged (truncated) for further details.

Prerequisites

There are no prerequisites required before using the Check Network Accessibility step.

tip

Note that you can put the Check Network Accessibility component anywhere you want in the workflow. This code is used to check the accessibility of predefined endpoints and report their status.

Screenshot

Input Variables

This step contains some input variable(s). It needs these variable(s) to work. The table below gives explanation for this variable(s).

Screenshot
Variable NameDescriptionStatus
$AC_CHECK_NETWORK_GITHUB_APPCIRCLEIf enabled, checks if the runner can access to https://github.com/appcircleio/. Default: true.Optional
$AC_CHECK_NETWORK_RUBYGEMSIf enabled, checks if the runner can access to https://rubygems.org. Default: true.Optional
$AC_CHECK_NETWORK_INDEX_RUBYGEMSIf enabled, checks if the runner can access to https://index.rubygems.org. Default: true.Optional
$AC_CHECK_NETWORK_SERVICES_GRADLE_ORGIf enabled, checks if the runner can access to https://services.gradle.org. Default: true.Optional
$AC_CHECK_NETWORK_DL_GOOGLE_COM_ANDROID_REPOSITORYIf enabled, checks if the runner can access to https://dl.google.com/android/repository/repository2-1.xml. Default: true.Optional
$AC_CHECK_NETWORK_DL_SSL_GOOGLE_COM_ANDROID_REPOSITORYIf enabled, checks if the runner can access to https://dl-ssl.google.com/android/repository/repository2-1.xml. Default: true.Optional
$AC_CHECK_NETWORK_MAVEN_GOOGLE_COMIf enabled, checks if the runner can access to https://maven.google.com/web/index.html. Default: true.Optional
$AC_CHECK_NETWORK_REPO1_MAVEN_ORG_MAVEN2If enabled, checks if the runner can access to https://repo1.maven.org/maven2/. Default: true.Optional
$AC_CHECK_NETWORK_CDCOAPODS_ORGIf enabled, checks if the runner can access to https://cdn.cocoapods.org. Default: true.Optional
$AC_CHECK_NETWORK_GITHUB_COCOAPODS_SPECSIf enabled, checks if the runner can access to https://github.com/CocoaPods/Specs. Default: true.Optional
$AC_CHECK_NETWORK_FIREBASEAPPDISTRIBUTION_GOOGLEAPIS_COMIf enabled, checks if the runner can access to https://firebaseappdistribution.googleapis.com/$discovery/rest?version=v1. Default: true.Optional
$AC_CHECK_CONNECTION_TIMEOUTSpecifies the maximum time (integer, in seconds) allowed for establishing a connection to the server before the request is aborted. Default: 8 seconds.Optional
$AC_CHECK_CONNECTION_MAX_TIMEOUTSpecifies the maximum total time (integer, in seconds) allowed for the entire request (including connection, data transfer, and response). Default: 20 seconds.Optional
$AC_CHECK_NETWORK_EXTRA_URL_PARAMETERSAdditional URLs to check, defined as a comma-separated list (e.g. https://url1.com, https://url2.com).Optional

To access the source code of this component, please use the following link:

Preview of GitHub - appcircleio/appcircle-check-network-access-component