Skip to content

Commit

Permalink
CI - try setting proxy in gradle.properties
Browse files Browse the repository at this point in the history
  • Loading branch information
lwih committed Jan 30, 2024
1 parent ae4bddf commit 2841aae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
12 changes: 12 additions & 0 deletions backend/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#variables
proxyHost=172.27.229.197
proxyPort=8090
nonProxyHosts=gitlab-sml.din.developpement-durable.gouv.fr,localhost,127.0.0.1,0.0.0.0,.dsi.damgm.i2
#http proxy
systemProp.http.proxyHost=${proxyHost}
systemProp.http.proxyPort=${proxyPort}
systemProp.http.nonProxyHosts=${nonProxyHosts}
#https proxy
systemProp.https.proxyHost=${proxyHost}
systemProp.https.proxyPort=${proxyPort}
systemProp.https.nonProxyHosts=${nonProxyHosts}
16 changes: 1 addition & 15 deletions ci/jobs/build_projet_gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,7 @@ build_projet_gradle:
script:
- cd backend
- chmod +x gradlew
- |
HTTP_PROXY_HOST=$(echo $HTTP_PROXY | sed 's/http:\/\/\([^:]*\):.*/\1/')
HTTP_PROXY_PORT=$(echo $HTTP_PROXY | sed 's/http:\/\/[^:]*:\([^:]*\)/\1/')
HTTPS_PROXY_HOST=$(echo $HTTPS_PROXY | sed 's/http:\/\/\([^:]*\):.*/\1/')
HTTPS_PROXY_PORT=$(echo $HTTPS_PROXY | sed 's/http:\/\/[^:]*:\([^:]*\)/\1/')
echo "HTTP_PROXY_HOST: ${HTTP_PROXY_HOST}"
echo "HTTP_PROXY_PORT: ${HTTP_PROXY_PORT}"
echo "HTTPS_PROXY_HOST: ${HTTPS_PROXY_HOST}"
echo "HTTPS_PROXY_PORT: ${HTTPS_PROXY_PORT}"
- ./gradlew clean assemble \
-Dhttp.proxyHost=$HTTP_PROXY_HOST \
-Dhttp.proxyPort=$HTTP_PROXY_PORT \
-Dhttps.proxyHost=$HTTPS_PROXY_HOST \
-Dhttps.proxyPort=$HTTPS_PROXY_PORT \
-Dhttp.nonProxyHosts="$NO_PROXY"
- ./gradlew clean assemble
tags:
- build
artifacts:
Expand Down

0 comments on commit 2841aae

Please sign in to comment.