forked from AsyncHttpClient/async-http-client
-
Notifications
You must be signed in to change notification settings - Fork 2
Remote repo configuration #6
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
Open
suharshan
wants to merge
22
commits into
feature/enable-cookie-store-at-request-level
Choose a base branch
from
remote-repo-configuration
base: feature/enable-cookie-store-at-request-level
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
cdb78f3
- Configure remote repository
0e18c7c
Parameterized artifact version
cb857f6
Added maven flatten plugin
33e0893
Hardcoded version in org.asynchttpclient test dependency
6fd3da9
Removed multi-stage build name from dockerfile
268cb2a
Updated travis to use docker
4f2c31f
Added aws_session_token support
7c53d33
Configured default version
37768de
Beautify travis file
7758348
Added docker-utils.sh for caching
209dfab
Specify docker imagename for the before_cache
92c4c5a
Fix typos
d2b5205
Added docker-compose file and updated travis accordingly
87dbe3e
Fixed wrong service name in travis
0129913
- Improved travis file
f5b42ef
docker inspect update in travis
a96ad1f
Removed travis after_script
b246b92
Shorten revision
2b61805
Got rid of duplicate args and env vars
acb3b23
Removed unused args from dockerfile
64c9a18
Removed unwanted build args from dockerfile
12d6df4
Temp hardcoding version
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,7 @@ test-output | |
MANIFEST.MF | ||
work | ||
atlassian-ide-plugin.xml | ||
|
||
# Cached artifacts | ||
/build-cache/* | ||
!/build-cache/.keep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
dist: xenial | ||
language: minimal | ||
sudo: true | ||
services: | ||
- docker | ||
|
||
before_script: | ||
- travis/before_script.sh | ||
env: | ||
global: | ||
- SERVICE_NAME=async-http-client | ||
- AWS_DEFAULT_REGION=ap-southeast-1 | ||
- REVISION=$(git rev-parse --short ${TRAVIS_COMMIT}) | ||
- secure: vto8UyM7tMHE4tUwxmYC150orDzrz/6b33m8V6+yh1uHWJmtqhyshsjLKFMmiqkAHz/7jmrgMMlHcnYJ27IyNJsqd4WNQfUjf9nRuizbRKD+yhy7R+IKbgy8bSYizyvQ/4T07sJkOcebzXJigTlOjxpwDfKgBj7vqr5paXrir0Srs0jjgyMxnASFYaBvy2i6wPyPqslkbwHwTapWg3porl/EmSj9rmgHVnPED5CPYraMp+zTHJCpP6xgGn1N3wS+x3sUDZ4MSHeZLXbaSzmIIUBNbYSUjOnEspD0Pi/78G1cl6sW7KiSIAt+H6hoy1+rU6J4RyB8M6pSvNJDlgnYfemG/6onTAXA5n/0+dcs1X2skA3GscOmPoEUuPYyKeQwk2eXK67UC7LNSu1HSAeIxPgwKv4axmFPv/2GJtM70HP28cR35gzyWMMhsxGT7tuKE7W83bEuT/nUzXCWCC80LCOpRRHvfxczUO7bFDE9Be4K/xKtIAJiHZimcvixRoxRojPVSr8DrmeSFA+oGgE6F0hW6cQDynqF7FlmIb+6h3DVPWegQZqi7RP3UHy2qSwj2gAYAydd6FHib7juc8K4xIDdgZ53reCmQL6ULEwKF2unWDxLZ3urqDmhIc3qRH6it9VWdKoNr25EDgKXMVfiGoeKeZBVAl0KtdD6kDgLE9Q= | ||
- secure: mLmKxZKFaaa98pVHMMcF/XEoXIebrOX7B9ZSLdGe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wAdoff4bN6Uafo3vKyQXEAsr26b590kxAhKxpI7nPmYtvHSkCfVxLh5Q2R6C0dpaGdamBRKjD+Lku2PJXE+lErk5SnK2BgBkiuuBaxVvUYO9RatucVVne+VDTJY6brcXJEEDs/myfK6lpF2cb5BM14l58iHWBQHmiDhGyl3CKRVXpavG9IuuVMf7siV0957ixCZstlU7J4RDwunGrl6RM3BQdj55atnHu+AKuy3piVy+NX+IimiaRsWw+N04pO3sAakG0fMa1YQ55RDOQ= | ||
|
||
script: | ||
- mvn test -Ptest-output | ||
- find $HOME/.m2 -name "_remote.repositories" | xargs rm | ||
- find $HOME/.m2 -name "resolver-status.properties" | xargs rm -f | ||
|
||
# If building master, Publish to Sonatype | ||
after_success: | ||
- travis/after_success.sh | ||
cache: | ||
directories: | ||
- build-cache | ||
|
||
sudo: false | ||
install: | ||
- docker-compose -f docker-compose.yml build | ||
|
||
# https://github.com/travis-ci/travis-ci/issues/3259 | ||
addons: | ||
apt: | ||
packages: | ||
- oracle-java8-installer | ||
script: | ||
- docker-compose -f docker-compose.yml run ${SERVICE_NAME} | ||
|
||
# Cache settings | ||
cache: | ||
directories: | ||
- $HOME/.m2/repository | ||
before_cache: | ||
- docker-compose -f docker-compose.yml run --rm -v `pwd`/build-cache:/app/build-cache ${SERVICE_NAME} bash docker-utils.sh save-cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# wego-async-http-client stage | ||
FROM maven:3.6-jdk-11-slim | ||
|
||
# Install build dependencies | ||
RUN apt-get -qq update && \ | ||
apt-get -qq install -y --no-install-recommends \ | ||
build-essential \ | ||
openssh-client \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Read repo args | ||
ARG VERSION | ||
ARG AWS_DEFAULT_REGION | ||
ARG AWS_ACCESS_KEY_ID | ||
ARG AWS_SECRET_ACCESS_KEY | ||
ARG REPO_URL | ||
ENV REPO_URL=${REPO_URL} | ||
ENV VERSION=${VERSION} | ||
ENV AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION} | ||
ENV AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't need to assign here since its not available at build time There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree. Stripped down all unwanted args and envs. |
||
ENV AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} | ||
|
||
WORKDIR /app | ||
COPY . . | ||
|
||
RUN mvn compile -U \ | ||
-Dmaven.test.skip=true \ | ||
-Dgpg.skip \ | ||
-DdistMgmtReleasesUrl=${REPO_URL}/releases \ | ||
-DdistMgmtSnapshotsUrl=${REPO_URL}/snapshots \ | ||
-DAWS_DEFAULT_REGION=${AWS_DEFAULT_REGION} \ | ||
-Dproject.version=${VERSION} | ||
|
||
CMD mvn deploy -U \ | ||
-Dmaven.test.skip=true \ | ||
-Dgpg.skip \ | ||
-DdistMgmtReleasesUrl=${REPO_URL}/releases \ | ||
-DdistMgmtSnapshotsUrl=${REPO_URL}/snapshots \ | ||
-DAWS_DEFAULT_REGION=${AWS_DEFAULT_REGION} \ | ||
-Dproject.version=${VERSION} |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: "3.7" | ||
services: | ||
async-http-client: | ||
build: | ||
context: . | ||
args: | ||
REPO_URL: ${REPO_URL:?REPO_URL} | ||
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION:?AWS_DEFAULT_REGION} | ||
VERSION: ${REVISION:?REVISION} | ||
image: wego/async-http-client | ||
environment: | ||
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:?AWS_ACCESS_KEY_ID} | ||
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:?AWS_SECRET_ACCESS_KEY} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
GRADLE_CACHE_ARCHIVE='build-cache/maven.tar.gz' | ||
GRADLE_CACHE_DIR="/root/.m2/" | ||
|
||
function __load_cache { | ||
if [ -f "$GRADLE_CACHE_ARCHIVE" ] | ||
then | ||
mkdir $GRADLE_CACHE_DIR | ||
tar -xzf $GRADLE_CACHE_ARCHIVE -C $GRADLE_CACHE_DIR | ||
echo "Extracted $GRADLE_CACHE_ARCHIVE to $GRADLE_CACHE_DIR" | ||
else | ||
echo "$GRADLE_CACHE_ARCHIVE not found" | ||
fi | ||
} | ||
|
||
function __save_cache { | ||
# gzip without timestamps for consistent checksum | ||
GZIP=-n tar -czf $GRADLE_CACHE_ARCHIVE --exclude='./daemon' --exclude='./native' --exclude='./notifications' -C $GRADLE_CACHE_DIR . | ||
md5sum $GRADLE_CACHE_ARCHIVE | ||
echo "Saved $GRADLE_CACHE_DIR to $GRADLE_CACHE_ARCHIVE" | ||
} | ||
|
||
case "$1" in | ||
load-cache) | ||
__load_cache | ||
;; | ||
save-cache) | ||
__save_cache | ||
;; | ||
*) | ||
echo 'Unknown command' | ||
exit 1 | ||
esac | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these args still needed? if they're being passed as runtime env vars can remove from here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah forgot again. removed now