Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Aug 31, 2020
2 parents 9cffa7b + c7446d5 commit 6efc383
Show file tree
Hide file tree
Showing 24 changed files with 1,798 additions and 361 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target/
settings.xml
.idea
/out/
49 changes: 49 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
image: maven:3-jdk-8

variables:
CI_PROJECT_PATH: "ReightI/test-nucleusj-ci-cd"
API_IMAGE_NAME: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
VERSION: "1.0.0"

stages:
- compile
- deploy
- release

# ------------------------- Compile ----------------------------------------
# Compile the Maven project with all it's dependencies thanks to maven-assembly-plugin.

compile:
stage: compile
except:
- tags
script: mvn clean package
artifacts:
paths:
- target

# ------------------------- Deploy ----------------------------------------
# Deploy the Maven artifacts generated by "Compile" stage to Gitlab's Maven repository.

deploy:
stage: deploy
except:
- tags
script:
- mvn deploy:deploy-file -Durl=https://gitlab.com/api/v4/projects/19044962/packages/maven/ -DrepositoryId=gitlab-maven -Dfile=target/NucleusJ_2-1.0.2.jar -DgroupId=burp -DartifactId=NucleusJ_2 -Dversion=$VERSION -Dpackaging=jar -DgeneratePom=false -DuniqueVersion=true -s ci_settings.xml
dependencies:
- compile

# ------------------------- Release ----------------------------------------
# Do a gitlab release with "release-cli" tool.
# Assets are a JAR file deployed at https://gitlab.com/api/v4/projects/19044962/packages/maven

release_branch:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
except:
- tags
only:
- master
script:
- release-cli create --name "v$VERSION" --description "new release" --tag-name "v$VERSION" --ref $CI_COMMIT_SHA --assets-links-name ".jar" --assets-links-url "https://gitlab.com/api/v4/projects/19044962/packages/maven/burp/NucleusJ_2/$VERSION/NucleusJ_2-$VERSION.jar"
33 changes: 0 additions & 33 deletions NucleusJ_-1.0.9-SNAPSHOT.iml

This file was deleted.

25 changes: 0 additions & 25 deletions NucleusJ_.iml

This file was deleted.

Loading

0 comments on commit 6efc383

Please sign in to comment.