|
| 1 | +--- |
| 2 | +kind: pipeline |
| 3 | +name: default |
| 4 | + |
| 5 | +platform: |
| 6 | + os: linux |
| 7 | + arch: amd64 |
| 8 | + |
1 | 9 | clone:
|
2 |
| - git: |
3 |
| - image: plugins/git |
4 |
| - # We clone submodules ourselves |
5 |
| - recursive: false |
6 |
| - |
7 |
| -pipeline: |
8 |
| - # We add a custom clone step to workaround a bug with GitHub (see #3415) |
9 |
| - clone: |
10 |
| - image: plugins/git |
11 |
| - commands: |
12 |
| - # if build is PR rebase on top of target branch |
13 |
| - - if [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then |
14 |
| - git config user.email "dotty.bot@epfl.ch"; |
15 |
| - git config user.name "Dotty CI"; |
16 |
| - git pull "$DRONE_REMOTE_URL" "$DRONE_BRANCH"; |
17 |
| - fi |
18 |
| - |
19 |
| - # TESTS: |
20 |
| - # We run tests in parallel. Tests run in a copy of the working directory to avoid conflict |
21 |
| - test: |
| 10 | + disable: true |
| 11 | + |
| 12 | +steps: |
| 13 | +- name: git |
| 14 | + pull: default |
| 15 | + image: plugins/git |
| 16 | + settings: |
| 17 | + |
| 18 | +- name: clone |
| 19 | + pull: default |
| 20 | + image: plugins/git |
| 21 | + commands: |
| 22 | + - if [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then |
| 23 | + git config user.email "dotty.bot@epfl.ch"; |
| 24 | + git config user.name "Dotty CI"; |
| 25 | + git pull "$DRONE_REMOTE_URL" "$DRONE_BRANCH"; |
| 26 | + fi |
| 27 | + |
| 28 | +- name: test |
| 29 | + pull: default |
| 30 | + image: lampepfl/dotty:2019-04-22 |
| 31 | + commands: |
| 32 | + - cp -R . /tmp/1/ && cd /tmp/1/ |
| 33 | + - ./project/scripts/sbt ";compile ;test" |
| 34 | + - ./project/scripts/cmdTests |
| 35 | + settings: |
22 | 36 | group: test
|
23 |
| - image: lampepfl/dotty:2019-04-22 |
24 |
| - commands: |
25 |
| - - cp -R . /tmp/1/ && cd /tmp/1/ |
26 |
| - - ./project/scripts/sbt ";compile ;test" |
27 |
| - - ./project/scripts/cmdTests |
28 | 37 |
|
29 |
| - test_bootstrapped: |
| 38 | +- name: test_bootstrapped |
| 39 | + pull: default |
| 40 | + image: lampepfl/dotty:2019-04-22 |
| 41 | + commands: |
| 42 | + - cp -R . /tmp/2/ && cd /tmp/2/ |
| 43 | + - ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test; dotty-semanticdb/compile; dotty-semanticdb/test:compile;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test" |
| 44 | + - ./project/scripts/bootstrapCmdTests |
| 45 | + settings: |
30 | 46 | group: test
|
31 |
| - image: lampepfl/dotty:2019-04-22 |
32 |
| - commands: |
33 |
| - - cp -R . /tmp/2/ && cd /tmp/2/ |
34 |
| - - ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test; dotty-semanticdb/compile; dotty-semanticdb/test:compile;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test" |
35 |
| - - ./project/scripts/bootstrapCmdTests |
36 | 47 |
|
37 |
| - community_build: |
| 48 | +- name: community_build |
| 49 | + pull: default |
| 50 | + image: lampepfl/dotty:2019-04-22 |
| 51 | + commands: |
| 52 | + - cp -R . /tmp/3/ && cd /tmp/3/ |
| 53 | + - git submodule update --init --recursive --jobs 7 |
| 54 | + - ./project/scripts/sbt community-build/test |
| 55 | + settings: |
38 | 56 | group: test
|
39 |
| - image: lampepfl/dotty:2019-04-22 |
40 |
| - commands: |
41 |
| - - cp -R . /tmp/3/ && cd /tmp/3/ |
42 |
| - - git submodule update --init --recursive --jobs 7 |
43 |
| - - ./project/scripts/sbt community-build/test |
44 | 57 |
|
45 |
| - test_sbt: |
| 58 | +- name: test_sbt |
| 59 | + pull: default |
| 60 | + image: lampepfl/dotty:2019-04-22 |
| 61 | + commands: |
| 62 | + - cp -R . /tmp/4/ && cd /tmp/4/ |
| 63 | + - ./project/scripts/sbt sbt-dotty/scripted |
| 64 | + settings: |
46 | 65 | group: test
|
47 |
| - image: lampepfl/dotty:2019-04-22 |
48 |
| - commands: |
49 |
| - - cp -R . /tmp/4/ && cd /tmp/4/ |
50 |
| - - ./project/scripts/sbt sbt-dotty/scripted |
51 |
| - when: |
52 |
| - # sbt scripted tests are slow and only run on nightly or deployment |
53 |
| - event: [ tag, deployment ] |
54 |
| - |
55 |
| - test_java11: |
| 66 | + when: |
| 67 | + event: |
| 68 | + - tag |
| 69 | + - deployment |
| 70 | + |
| 71 | +- name: test_java11 |
| 72 | + pull: default |
| 73 | + image: lampepfl/dotty:2019-04-22 |
| 74 | + commands: |
| 75 | + - export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH" |
| 76 | + - cp -R . /tmp/6/ && cd /tmp/6/ |
| 77 | + - ./project/scripts/sbt ";compile ;test" |
| 78 | + settings: |
56 | 79 | group: test
|
57 |
| - image: lampepfl/dotty:2019-04-22 |
58 |
| - commands: |
59 |
| - - export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH" |
60 |
| - - cp -R . /tmp/6/ && cd /tmp/6/ |
61 |
| - - ./project/scripts/sbt ";compile ;test" |
62 |
| - when: |
63 |
| - event: [ push, tag, deployment ] |
64 |
| - |
65 |
| - # DOCUMENTATION: |
66 |
| - documentation: |
67 |
| - image: lampepfl/dotty:2019-04-22 |
68 |
| - commands: |
69 |
| - - ./project/scripts/genDocs |
70 |
| - secrets: [ bot_token ] |
71 |
| - when: |
72 |
| - event: push |
73 |
| - # We only generate the documentation for the master branch |
74 |
| - branch: master |
75 |
| - |
76 |
| - # PUBLISHING: |
77 |
| - # Publishing expect NIGHTLYBUILD or RELEASEBUILD to be set. See dottyVersion in Build.scala |
78 |
| - publish_nightly: |
79 |
| - image: lampepfl/dotty:2019-04-22 |
80 |
| - environment: |
81 |
| - - NIGHTLYBUILD=yes |
82 |
| - commands: |
83 |
| - - ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease" |
84 |
| - secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ] |
85 |
| - when: |
86 |
| - event: deployment |
87 |
| - environment: nightly |
88 |
| - |
89 |
| - publish_release: |
90 |
| - image: lampepfl/dotty:2019-04-22 |
91 |
| - environment: |
92 |
| - - RELEASEBUILD=yes |
93 |
| - commands: |
94 |
| - # Produces dotty-version.{tar.gz, zip} |
95 |
| - - ./project/scripts/sbt dist-bootstrapped/packArchive |
96 |
| - - ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease" |
97 |
| - secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ] |
98 |
| - when: |
99 |
| - event: tag |
100 |
| - |
101 |
| - # Publish dotty-version.{tar.gz, zip} to GitHub Release |
102 |
| - github_release: |
103 |
| - image: plugins/github-release |
104 |
| - secrets: [ github_token ] |
| 80 | + when: |
| 81 | + event: |
| 82 | + - push |
| 83 | + - tag |
| 84 | + - deployment |
| 85 | + |
| 86 | +- name: documentation |
| 87 | + pull: default |
| 88 | + image: lampepfl/dotty:2019-04-22 |
| 89 | + commands: |
| 90 | + - ./project/scripts/genDocs |
| 91 | + environment: |
| 92 | + BOT_TOKEN: |
| 93 | + from_secret: bot_token |
| 94 | + when: |
| 95 | + branch: |
| 96 | + - master |
| 97 | + event: |
| 98 | + - push |
| 99 | + |
| 100 | +- name: publish_nightly |
| 101 | + pull: default |
| 102 | + image: lampepfl/dotty:2019-04-22 |
| 103 | + commands: |
| 104 | + - ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease" |
| 105 | + environment: |
| 106 | + NIGHTLYBUILD: yes |
| 107 | + PGP_PW: |
| 108 | + from_secret: pgp_pw |
| 109 | + PGP_SECRET: |
| 110 | + from_secret: pgp_secret |
| 111 | + SONATYPE_PW: |
| 112 | + from_secret: sonatype_pw |
| 113 | + SONATYPE_USER: |
| 114 | + from_secret: sonatype_user |
| 115 | + when: |
| 116 | + event: |
| 117 | + - deployment |
| 118 | + target: |
| 119 | + - nightly |
| 120 | + |
| 121 | +- name: publish_release |
| 122 | + pull: default |
| 123 | + image: lampepfl/dotty:2019-04-22 |
| 124 | + commands: |
| 125 | + - ./project/scripts/sbt dist-bootstrapped/packArchive |
| 126 | + - ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease" |
| 127 | + environment: |
| 128 | + PGP_PW: |
| 129 | + from_secret: pgp_pw |
| 130 | + PGP_SECRET: |
| 131 | + from_secret: pgp_secret |
| 132 | + RELEASEBUILD: yes |
| 133 | + SONATYPE_PW: |
| 134 | + from_secret: sonatype_pw |
| 135 | + SONATYPE_USER: |
| 136 | + from_secret: sonatype_user |
| 137 | + when: |
| 138 | + event: |
| 139 | + - tag |
| 140 | + |
| 141 | +- name: github_release |
| 142 | + pull: default |
| 143 | + image: plugins/github-release |
| 144 | + settings: |
| 145 | + checksum: |
| 146 | + - sha256 |
105 | 147 | draft: true
|
106 | 148 | files:
|
107 |
| - - dist-bootstrapped/target/dotty-* |
108 |
| - checksum: |
109 |
| - - sha256 |
110 |
| - when: |
111 |
| - event: tag |
112 |
| - |
113 |
| - publish_sbt_release: |
114 |
| - image: lampepfl/dotty:2019-04-22 |
115 |
| - environment: |
116 |
| - - RELEASEBUILD=yes |
117 |
| - commands: |
118 |
| - - ./project/scripts/sbtPublish ";sbt-dotty/publishSigned ;sonatypeRelease" |
119 |
| - secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ] |
120 |
| - when: |
121 |
| - event: deployment |
122 |
| - environment: sbt_release |
123 |
| - |
124 |
| - # NOTIFICATIONS: |
125 |
| - slack: |
126 |
| - image: plugins/slack |
| 149 | + - dist-bootstrapped/target/dotty-* |
| 150 | + environment: |
| 151 | + GITHUB_TOKEN: |
| 152 | + from_secret: github_token |
| 153 | + when: |
| 154 | + event: |
| 155 | + - tag |
| 156 | + |
| 157 | +- name: publish_sbt_release |
| 158 | + pull: default |
| 159 | + image: lampepfl/dotty:2019-04-22 |
| 160 | + commands: |
| 161 | + - ./project/scripts/sbtPublish ";sbt-dotty/publishSigned ;sonatypeRelease" |
| 162 | + environment: |
| 163 | + PGP_PW: |
| 164 | + from_secret: pgp_pw |
| 165 | + PGP_SECRET: |
| 166 | + from_secret: pgp_secret |
| 167 | + RELEASEBUILD: yes |
| 168 | + SONATYPE_PW: |
| 169 | + from_secret: sonatype_pw |
| 170 | + SONATYPE_USER: |
| 171 | + from_secret: sonatype_user |
| 172 | + when: |
| 173 | + event: |
| 174 | + - deployment |
| 175 | + target: |
| 176 | + - sbt_release |
| 177 | + |
| 178 | +- name: slack |
| 179 | + pull: default |
| 180 | + image: plugins/slack |
| 181 | + settings: |
127 | 182 | channel: dotty
|
128 |
| - secrets: [ slack_webhook ] |
129 |
| - when: |
130 |
| - status: [ failure ] |
131 |
| - event: [ push, tag, deployment ] |
| 183 | + environment: |
| 184 | + SLACK_WEBHOOK: |
| 185 | + from_secret: slack_webhook |
| 186 | + when: |
| 187 | + event: |
| 188 | + - push |
| 189 | + - tag |
| 190 | + - deployment |
| 191 | + status: |
| 192 | + - failure |
| 193 | + |
| 194 | +... |
0 commit comments