Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8e59b3d
++++ Prepare for next development iteration build: 298 ++++
io-scalecube-ci Jul 3, 2019
63b9b41
+ script files
io-scalecube-ci Jul 22, 2019
430cd34
updated: travis ci configuration file
io-scalecube-ci Jul 22, 2019
ca81f43
Merge pull request #67 from scalecube/travis-ci-cd
io-scalecube-ci Jul 22, 2019
f936904
+ script files
io-scalecube-ci Jul 23, 2019
4473116
Merge pull request #68 from scalecube/travis-ci-cd
io-scalecube-ci Jul 23, 2019
9e9e51f
updated: travis ci configuration file
io-scalecube-ci Jul 28, 2019
84278ce
Merge pull request #69 from scalecube/travis-ci-cd
aharonha Jul 29, 2019
c9dc452
+ script files
io-scalecube-ci Sep 26, 2019
704a828
Merge pull request #70 from scalecube/travis-ci-cd
aharonha Sep 26, 2019
20ed741
+ script files
io-scalecube-ci Sep 26, 2019
a62aa4d
+ git ignore
io-scalecube-ci Sep 26, 2019
6acfd49
Merge pull request #71 from scalecube/travis-ci-cd
aharonha Sep 26, 2019
b03ef8a
+ git ignore
io-scalecube-ci Sep 27, 2019
61a7bd4
Merge pull request #72 from scalecube/travis-ci-cd
aharonha Oct 2, 2019
dfc617c
+ script files
io-scalecube-ci Oct 28, 2019
c346925
Merge pull request #73 from scalecube/travis-ci-cd
aharonha Oct 28, 2019
10d4d14
+ script files
io-scalecube-ci Jan 17, 2020
32305b2
Merge pull request #74 from scalecube/travis-ci-cd
artem-v Jan 18, 2020
c473d28
updated: travis ci configuration file
io-scalecube-ci Mar 21, 2020
7bb648a
Fixed build
artem-v Mar 21, 2020
18f2144
Merge pull request #76 from scalecube/travis-ci-cd
artem-v Mar 21, 2020
ac4c16f
Merge branch 'develop' into update/sc-parent-to-latest
artem-v Mar 21, 2020
ffa53c9
Merge pull request #77 from scalecube/update/sc-parent-to-latest
artem-v Mar 21, 2020
81c1f18
Start on add security tokens module
artem-v May 14, 2020
1fb4ff6
Added tokens module
artem-v May 14, 2020
056c7ff
Minor
artem-v May 14, 2020
e586f99
Merge pull request #78 from scalecube/add-security-tokens-module
artem-v May 14, 2020
0e40c79
Merge branch 'master' into develop
artem-v May 14, 2020
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@

# IntelliJ IDEA project files and directories
*.iml

**/pom.xml.releaseBackup
/release.properties
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ addons:
- libxml-xpath-perl
sudo: required
language: java
jdk: openjdk8
jdk: openjdk11
before_install:
- "./src/main/scripts/ci/before-install.sh"
- "./src/main/scripts/cd/before-deploy.sh"
Expand All @@ -21,3 +21,8 @@ deploy:
- "./src/main/scripts/cd/release.sh"
on:
branch: master
- provider: script
script:
- "./src/main/scripts/cd/release.sh"
on:
tags: true
11 changes: 0 additions & 11 deletions jwt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,6 @@
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
54 changes: 53 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.scalecube</groupId>
<artifactId>scalecube-parent-pom</artifactId>
<version>0.0.17</version>
<version>0.1.0-RC1</version>
</parent>

<artifactId>scalecube-security-parent</artifactId>
Expand All @@ -25,14 +25,26 @@

<modules>
<module>jwt</module>
<module>tokens</module>
</modules>

<properties>
<jjwt.version>0.10.5</jjwt.version>
<reactor.version>Dysprosium-RELEASE</reactor.version>
<junit.version>5.1.1</junit.version>
<mockito.version>2.24.5</mockito.version>
<hamcrest.version>1.3</hamcrest.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-bom</artifactId>
<version>${reactor.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
Expand All @@ -50,4 +62,44 @@
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- Test scope -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
58 changes: 29 additions & 29 deletions src/main/scripts/cd/before-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,52 @@ BEFORE_DEPLOY_EXEC_FILES=$(find $DIRNAME -name 'before-deploy-*.sh')
echo Running $0
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*

function decryptsecrets {
echo decrypting secrets
echo *-*-*-*-*-*-*-*-*-*-*-*
mkdir -p ~/tmp
openssl aes-256-cbc -K $encrypted_SOME_key -iv $encrypted_SOME_iv -in $TRAVIS_BUILD_DIR/src/main/scripts/cd/secrets.tar.enc -out ~/tmp/secrets.tar -d
md5sum ~/tmp/secrets.tar
tar -xvf ~/tmp/secrets.tar -C ~/.ssh
shred -z -u ~/tmp/secrets.tar
decryptsecrets() {
echo decrypting secrets
echo *-*-*-*-*-*-*-*-*-*-*-*
mkdir -p ~/tmp
openssl aes-256-cbc -K $encrypted_SOME_key -iv $encrypted_SOME_iv -in $TRAVIS_BUILD_DIR/src/main/scripts/cd/secrets.tar.enc -out ~/tmp/secrets.tar -d
md5sum ~/tmp/secrets.tar
tar -xvf ~/tmp/secrets.tar -C ~/.ssh
shred -z -u ~/tmp/secrets.tar
}

function importpgp {
echo importing pgp secret
echo *-*-*-*-*-*-*-*-*-*-*-*
eval $(gpg-agent --daemon --batch)
importpgp() {
echo importing pgp secret
echo *-*-*-*-*-*-*-*-*-*-*-*
eval $(gpg-agent --daemon --batch)
gpg --batch --passphrase $GPG_PASSPHRASE --import ~/.ssh/codesigning.asc
shred -z -u ~/.ssh/codesigning.asc
}

function setupssh {
echo importing ssh secret
echo *-*-*-*-*-*-*-*-*-*-*-*
setupssh() {
echo importing ssh secret
echo *-*-*-*-*-*-*-*-*-*-*-*
chmod 400 ~/.ssh/id_rsa
touch ~/.ssh/config

echo "Host github.com" >> $HOME/.ssh/config
echo " IdentityFile $HOME/.ssh/id_rsa" >> $HOME/.ssh/config
echo " StrictHostKeyChecking no" >> $HOME/.ssh/config
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
ssh -T git@github.com | true
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
ssh -T git@github.com | true
}
function setupgit {
echo setting git up
echo *-*-*-*-*-*-*-*-*-*-*-*
setupgit() {
echo setting git up
echo *-*-*-*-*-*-*-*-*-*-*-*
git remote set-url origin git@github.com:$TRAVIS_REPO_SLUG.git
git config --global user.email "io.scalecube.ci@gmail.com"
git config --global user.email "io.scalecube.ci@gmail.com"
git config --global user.name "io-scalecube-ci"
git checkout -B $TRAVIS_BRANCH | true
git checkout -B $TRAVIS_BRANCH | true
}

function deployment {
if [ "$TRAVIS_PULL_REQUEST" == 'false' ] && [ "$TRAVIS_BRANCH" = 'master' ] || [ "$TRAVIS_BRANCH" = 'develop' ]; then
echo deployment
echo *-*-*-*-*-*-*-*-*-*-*-*
deployment() {
if [ "$TRAVIS_PULL_REQUEST" = 'false' -a "$TRAVIS_BRANCH" = 'master' -o "$TRAVIS_BRANCH" = 'develop' -o -n "$TRAVIS_TAG" ]; then
echo deployment
echo *-*-*-*-*-*-*-*-*-*-*-*
decryptsecrets
importpgp
setupssh
Expand Down
54 changes: 45 additions & 9 deletions src/main/scripts/cd/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,55 @@ RELEASE_EXEC_FILES=$(find $DIRNAME -name 'release-*.sh')
echo Running $0
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*

. $DIRNAME/before-deploy.sh

commit_to_develop() {
git fetch
git branch -r
git checkout -B develop
git rebase master
git commit --amend -m "++++ Prepare for next development iteration build: $TRAVIS_BUILD_NUMBER ++++"
git push origin develop
git fetch
git branch -r
git checkout -B develop
git rebase $TRAVIS_BRANCH
git commit --amend -m "++++ Prepare for next development iteration build: $TRAVIS_BUILD_NUMBER ++++"
git push origin develop
}

check_next_version() {
export NEXT_VERSION=$(echo $TRAVIS_COMMIT_MESSAGE | grep -E -o '[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT')
if [ -n "$NEXT_VERSION" ] ; then
export MVN_NEXT_VERSION=-DdevelopmentVersion=$NEXT_VERSION
fi
}

mvn -P release -Darguments=-DskipTests release:prepare release:perform -DautoVersionSubmodules=true -DscmCommentPrefix="$TRAVIS_COMMIT_MESSAGE [skip ci] " -B -V -s travis-settings.xml
check_tag_for_rc() {
export VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if [ -n "$TRAVIS_TAG" ] ; then
RC_VER=$(echo $TRAVIS_TAG | grep -E -o 'RC-?[0-9]+')
RC_PREPARE=$(echo $TRAVIS_TAG | grep -o -i 'prepare')
if [ -n "$RC_VER" -a -n "$RC_PREPARE" ] ; then
export NEW_RC_VERSION=$(echo $VERSION | sed "s/SNAPSHOT/$RC_VER/g")
echo Release candidate: $NEW_RC_VERSION
echo *-*-*-*-*-*-*-*-*-*-*-*
decryptsecrets
importpgp
setupssh
setupgit
export MVN_RELEASE_VERSION=-DreleaseVersion=$NEW_RC_VERSION
if [ -n "$MVN_NEXT_VERSION" ] ; then
export MVN_NEXT_VERSION=-DdevelopmentVersion=$VERSION;
fi
fi
fi
}

check_next_version
check_tag_for_rc

mvn -P release -Darguments=-DskipTests release:prepare release:perform $MVN_RELEASE_VERSION $MVN_NEXT_VERSION -DautoVersionSubmodules=true -DscmCommentPrefix="$TRAVIS_COMMIT_MESSAGE [skip ci] " -B -V -s travis-settings.xml || exit 126

mvn -B -q clean

mvn clean
commit_to_develop
if [ -z "$NEW_RC_VERSION" ]; then
commit_to_develop
fi

# extends release.sh
for script_file in $RELEASE_EXEC_FILES; do
Expand Down
2 changes: 1 addition & 1 deletion src/main/scripts/ci/before-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ latest=$(curl "https://oss.sonatype.org/service/local/repositories/releases/cont

echo Downloading latest version $latest of codacy reporter from sonatype
# download latest assembly jar
mvn dependency:get dependency:copy \
mvn -B -q dependency:get dependency:copy \
-DoutputDirectory=$HOME \
-DoutputAbsoluteArtifactFilename=true \
-Dmdep.stripVersion=true \
Expand Down
Loading