-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
52 lines (43 loc) · 1.18 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
image: openjdk:9-jdk
workflow:
rules:
- if: $CI_MERGE_REQUEST_ID
when: never
- when: always
stages:
- build
- publish
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
cache:
paths:
- .gradle/wrapper
- .gradle/caches
build:
stage: build
script:
- ./gradlew fatJar
artifacts:
name: "burp-plugin"
paths:
- build/libs/*.jar
expire_in: 1 week
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: on_success
publish_files:
stage: publish
image: 'google/cloud-sdk:latest'
before_script:
- check_not_skipped(){ grep -v 'Skipping'; }
- echo $DEPLOY_KEY_FILE_PRODUCTION > /tmp/$CI_PIPELINE_ID.json
- gcloud auth activate-service-account --key-file /tmp/$CI_PIPELINE_ID.json
- export PLUGIN_VERSION=$(grep -nr 'EXTENSION_VERSION =' * | cut -f2 -d= | tr -d \" | tr -d \; | tr -d '[:space:]')
script:
- ls build/libs/faraday-burp-v$PLUGIN_VERSION.jar
- gsutil cp -R build/libs/faraday-burp-v$PLUGIN_VERSION.jar gs://faraday-community/faraday-burp-latest.jar
dependencies:
- build
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: on_success