dcdx 1.2.0-next.3 → 1.2.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/reset-bamboo.js +1 -1
- package/lib/commands/reset-bitbucket.js +1 -1
- package/lib/commands/reset-confluence.js +1 -1
- package/lib/commands/reset-jira.js +1 -1
- package/lib/commands/run-bamboo.js +1 -1
- package/lib/commands/run-bitbucket.js +1 -1
- package/lib/commands/run-confluence.js +1 -1
- package/lib/commands/run-jira.js +1 -1
- package/lib/commands/start.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{program as t,Option as e}from"commander";import{gracefulExit as s}from"exit-hook";import{DOMParser as o,XMLSerializer as a}from"@xmldom/xmldom";import{spawn as n}from"child_process";import{XMLParser as i}from"fast-xml-parser";import{existsSync as r,readFileSync as u,mkdirSync as c}from"fs";import{cwd as d}from"process";import l from"xpath";import{hideBin as p}from"yargs/helpers";import m from"yargs/yargs";import h from"axios";import{dirname as b,join as g}from"path";import{stop as k,downAll as j,ps as w,execCompose as A,upAll as S}from"docker-compose/dist/v2.js";import f from"events";import{dump as v}from"js-yaml";import{homedir as E}from"os";import y from"simple-git";import{upAll as P}from"docker-compose";import{Sequelize as D,ConnectionError as x,TimeoutError as C,ConnectionTimedOutError as T,ConnectionRefusedError as O,ConnectionAcquireTimeoutError as M}from"sequelize";var R,L=["latest","9.4-ubuntu","9.4-jdk11","9.4.3-ubuntu","9.4","9.4.3","9.4.3-jdk11","ubuntu","jdk11","9-ubuntu","9-jdk11","9.5-ubuntu","9.5-jdk11","9.5.1-ubuntu","9.5.1-jdk11","9.5.1","9.5","9","9.2-ubuntu","9.2-jdk11","9.2","9.2.11-jdk11","9.2.11-ubuntu","9.2.11","9.3.3-ubuntu","9.3.3-jdk11","9.3.3","9.2.4-ubuntu","9.2.4-jdk11","9.3.2-ubuntu","9.3.2-jdk11","9.0-ubuntu","9.2.4","9.3.2","9.0-jdk11","9.0.4-ubuntu","9.0.4-jdk11","9.0.4","9.0","8.2.6-ubuntu","8.2.6","8.2.6-jdk11","8.1.11-ubuntu","8.1.11-jdk11","8.1.11","8.0.0-jdk11","8.0.0-ubuntu","8.1.8-ubuntu","9.3.4-ubuntu","8.1.8-jdk11","9.3.4-jdk11","8.1.8","8.0.0","8.0.4-ubuntu","9.3.4","8.0.4-jdk11","9.2.5-ubuntu","9.2.5-jdk11","8.0.4","9.2.5","9.1.0-ubuntu","9.1.0-jdk11","9.1.0","8.2.7-ubuntu","8.2.7-jdk11","8.2.7","8.1-ubuntu","8.1-jdk11","8.1.12-ubuntu","8.1.12-jdk11","8.1","8.1.12","8.0.5-ubuntu","8.0.5-jdk11","8.0.1-ubuntu","9.1.1-jdk11","8.1.9-ubuntu","8.0.1-jdk11","8.0.1","8.1.9-jdk11","9.1.1","8.1.9","8.2.8-ubuntu","8.2.8-jdk11","8.0.5","8.2.8","8.1.2-ubuntu","8.1.2-jdk11","8.1.2","8.0.10-ubuntu","9.3.5-ubuntu","8.0.10-jdk11","9.3.5-jdk11","8.0.10","9.3.5","9.2.6-jdk11","9.2.6-ubuntu","9.2.6","9.1.1-ubuntu","8.2.0-ubuntu","8.2.0-jdk11","9.1.2-ubuntu","8.2.0","9.1.2-jdk11","8.0.6-ubuntu","8.0.6-jdk11","9.1.2","8.0.6","8-ubuntu","8-jdk11","8.2-ubuntu","8.2-jdk11","8.2.9-ubuntu","8.2.9-jdk11","8.2.9","8.2","8.1.3-ubuntu","8.1.3-jdk11","8.1.3","8.0.11-jdk11","8.0.11-ubuntu","8.0.11","9.3-ubuntu","8","9.3-jdk11","9.3.6-ubuntu","9.3.6-jdk11","9.3.6","9.3","9.2.7-ubuntu","9.2.7-jdk11","9.2.7","8.2.1-ubuntu","8.2.1-jdk11","8.2.1","8.0.7-ubuntu","9.4.0-jdk11","8.0.7-jdk11","9.2.8-ubuntu","8.0.7","9.2.8-jdk11","9.2.8","9.1-ubuntu","9.1-jdk11","9.1.3-ubuntu","9.1.3-jdk11","9.1.3","9.1","9.0.0-jdk11","9.0.0-ubuntu","9.0.0","8.1.4-ubuntu","8.1.4-jdk11","8.1.4","8.0.8-ubuntu","8.0.8-jdk11","8.0.8","8.0.12-ubuntu","8.0.12","8.0.12-jdk11","8.2.2-ubuntu","8.2.2-jdk11","8.1.5-jdk11","8.2.2","8.1.5-ubuntu","8.1.5","8.0-ubuntu","8.0-jdk11","8.0.13-jdk11","8.0.13-ubuntu","8.0.13","9.4.1-ubuntu","8.0","9.4.1-jdk11","9.4.1","9.2.9-ubuntu","9.2.9","9.2.9-jdk11","9.2.1-ubuntu","9.2.1-jdk11","9.2.1","9.0.1-ubuntu","9.0.1-jdk11","9.0.1","8.2.3-ubuntu","8.2.3-jdk11","8.2.3","9.4.2-jdk11","8.0.9-ubuntu","8.0.9-jdk11","9.0.2-ubuntu","8.0.9","9.0.2-jdk11","9.0.2","8.1.6-ubuntu","8.1.6-jdk11","8.1.6","8.0.2-ubuntu","8.0.2-jdk11","8.0.2","7-ubuntu","7-jdk8","7.2-ubuntu","7.2-jdk8","7.2.7-jdk8","7.2.7-ubuntu","7.2.7","7.2.5-ubuntu","7.2.5-jdk8","7.2.5","7.2.3-ubuntu","7.2.3-jdk8","7.2.3","7.2.10-ubuntu","7.2.10-jdk8","7.2.10","7.2.0-ubuntu","7.2.0-jdk8","7.2.0","7.2","7.1.3-ubuntu","7.1.3-jdk8","7.1.3","7","9.3.0-ubuntu","9.3.0-jdk11","9.3.0","9.2.10-ubuntu","9.2.10-jdk11","9.2.10","8.2.4-ubuntu","8.2.4-jdk11","8.2.4","8.1.1-ubuntu","8.1.1-jdk11","8.1.1","8.1.7-ubuntu","8.1.7-jdk11","8.1.7","8.0.3-ubuntu","8.0.3-jdk11","8.0.3","jdk17","9-jdk17","9.5-jdk17","9.5.0-ubuntu","9.5.0-jdk17","9.5.0-jdk11","9.5.0","9.4-jdk17","9.4.2-ubuntu","9.4.0-ubuntu","9.4.2-jdk17","9.4.2","9.4.0","9.4.0-jdk17","9.3.1-ubuntu","9.3.1-jdk11","9.3.1","9.2.3-ubuntu","9.2.3-jdk11","9.2.3","9.0.3-ubuntu","9.0.3-jdk11","9.0.3","8.2.5-ubuntu","8.2.5-jdk11","8.2.5","8.1.10-ubuntu","8.1.10-jdk11","8.1.10","7.2.9-ubuntu","7.2.9","7.2.9-jdk8","7.2.6-ubuntu","7.2.6-jdk8","7.2.6","7.2.4-ubuntu","7.2.4-jdk8","7.2.4","7.2.2-ubuntu","7.2.2-jdk8","7.2.2","7.2.1-ubuntu","7.2.1-jdk8","7.2.1","7.1-ubuntu","7.1-jdk8","7.1.4-ubuntu","7.1.4-jdk8","7.1.4","7.1.2-ubuntu","7.1.2-jdk8","7.1.2","7.1.1-ubuntu","7.1.1-jdk8","7.1.1","7.1","9.4.1-jdk17","eap-jdk8","9.0.0-rc1-ubuntu","9.0.0-rc1-jdk11","9.0.0-rc1","eap-jdk11","eap-ubuntu","9.0.0-rc1-jdk8","eap","8.0.0-rc4","8.0.0-rc1","7.0.6","7.0","7.1.0-rc1","7.0.4","6.10","6.10.6","7.0.3","6.10.5","7.0.2","7.0.1","7.0.0-rc2","7.0.0-rc1","6.10.4","6.10.3","6.10.2","6.9.2","6.9","6.8.3","6.8","6.9.1","6.8.2","6.9.0","6.9.0-rc1","6.7","6.7.3","6.8.1","6.8.0","6.7.2","6.7.1","6.6.3","6.6","6.7.0-rc2","6.6.2","6.6.1","6.6.0"];!function(t){t.JIRA="jira",t.CONFLUENCE="confluence",t.BITBUCKET="bitbucket",t.BAMBOO="bamboo"}(R||(R={}));const{P:$,activeProfiles:_}=m(p(process.argv)).parseSync(),q=$||_||void 0;class AMPS{static maven;static stop(){AMPS.maven&&S.maven.kill(0)}static async build(t){return new Promise(((e,s)=>{if(AMPS.maven){AMPS.maven.kill(0)||s(new Error("Failed to terminate existing Maven process"))}AMPS.maven=n("mvn",["package",...t],{cwd:d(),stdio:"inherit"}),AMPS.maven.on("exit",(t=>{AMPS.maven=null,0===t||130===t?e():s(new Error(`Maven exited with code ${t}`))}))}))}static isAtlassianPlugin=()=>{try{return AMPS.getNodes("//*[local-name()='packaging']").some((t=>"atlassian-plugin"===t.textContent))}catch(t){return!1}};static getApplicationVersion(){const t=q?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${q}']/..//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']`,!0):AMPS.getNodes("//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']",!0);if(t){const e=t.parentNode;if(e){const{plugin:t}=AMPS.toObject(e),s=t?.configuration?.productVersion;return s?this.doPropertyReplacement(s):void 0}}}static getApplication(){const t=AMPS.getApplications();if(1===t.length)return t[0];if(q){const t=AMPS.getApplications(q);if(1===t.length)return t[0]}return null}static getApplications(t){const e=new Set;return(t?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${t}']/..//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']`):AMPS.getNodes("//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']")).forEach((t=>{const s=t.parentNode;if(s){const{plugin:t}=AMPS.toObject(s);t?.artifactId?.includes(R.JIRA)?e.add(R.JIRA):t?.artifactId?.includes(R.CONFLUENCE)?e.add(R.CONFLUENCE):t?.artifactId?.includes(R.BAMBOO)?e.add(R.BAMBOO):t?.artifactId?.includes(R.BITBUCKET)&&e.add(R.BITBUCKET)}})),Array.from(e)}static doPropertyReplacement(t){let e=t;const s=q?AMPS.getProperties(q):{};Object.entries(s).forEach((([t,s])=>{e=e.replaceAll(`\${${t}}`,s)}));const o=AMPS.getProperties();return Object.entries(o).forEach((([t,s])=>{e=e.replaceAll(`\${${t}}`,s)})),e}static getProperties(t){const e={};return(t?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${t}']/..//*[local-name()='properties']`):AMPS.getNodes("//*[local-name()='properties']")).forEach((t=>{const{properties:s}=AMPS.toObject(t);Object.entries(s).forEach((([t,s])=>e[t]=s))})),e}static getNodes(t,e){if(r("./pom.xml")){const s=u("./pom.xml","utf8"),a=(new o).parseFromString(s,"text/xml"),n=e?l.select(t,a,!0):l.select(t,a,!1);return Array.isArray(n)||e?n:[]}return[]}static toObject(t){try{return(new i).parse((new a).serializeToString(t))}catch(t){return null}}}const B="AAAB3w0ODAoPeNp9Ultr2zAYffevEOwtoMR10qYLGJbYWsno7GA7g90eZPlrotWWjCSnzX79FF8IYWkfDPJ3Oedwzvch2zdoWSvkzpF7v5jdLrwpCkiaIc/1POeRMxAasmMNEa3Az2xnHT04gQJquBQhNeB77vQGuzPs3jk5rXIpx5QZfgDfqAaGUtRUOaj4adX+PkpGy+UOhNE+vnGG5laDags9L3mtuToOJF5Pkja5ZorXJwEXHG+pJQdaNvS/cYtLAysBVFfu19ehvxXPQr4IJwV1AGULKzIneBb+8PBd/GWOH6Yf751No9ieaujleYMHKYl8++Fb13VGo1EUZ/hznOBNEofbIFvHEd6mxDb81kQoUH5EZg+op0dEMFmAQrWSf4AZ9HNvTP1rMZnsrLGmpFpzKsZMVpOy28DQbfweo1AiIQ0quDaK540Bi8w1MhKxRhtZWXvHTghn+zLQBvU46Ela1rLZcYEKOEApazvvfKXceiSoYG/kcTXhTUlFG+XVbgKVNHA+gF7BN8t3UuU5sdpRwXUXGnmlVV0CCmRVU3G8Evf5MKUw9vqIFV36tX7moNjfo7CPTxfenZIJErLMSIhX309pvDd8SUgK3smKMpJsknVKBtr26t4D+gd3AC5qMCwCFHOaTWfFvLCLJPft3qktVo3FafmZAhRojb9IAxj8KEqPDQy0stos394SQQ==X02mq",toAbsolutePath=t=>{const[,e]=process.argv,s=b(e),o=s.substring(0,s.indexOf("dcdx")+4);return g(o,t.replaceAll("../",""))},U={name:"shared",driver:"bridge"};let N=class Base extends f{options;sequelize=null;constructor(t){super(),this.options=t}async run(t,e){try{if(!this.sequelize)throw new Error("Database connection does not exist");await this.sequelize.query(t,{logging:e})}catch(e){console.error("An error occurred while trying to run the following SQL query:",t,e),s()}return null}async start(t=this.options.clean){console.log(`Starting instance of ${this.name} ⏳`),t&&await this.down(),await this.up(),this.emit(`${this.name}:up`);if(await this.waitUntilReady()){if(console.log(`Database is ready and accepting connections on localhost:${this.options.port} 🗄️`),await this.onDatabaseReady(),this.emit("db:ready"),this.options.logging){const t=await this.getServiceState();t&&await this.showDockerLogs(t.name)}}else console.log(`Failed to start database ${this.name} ⛔`),s(0)}async stop(t=this.options.prune){if(t)await this.down();else{const t=v(this.getDockerComposeConfig());await k({cwd:d(),configAsString:t,log:!0})}this.emit("db:stopped")}async onDatabaseReady(){}getDockerComposeConfig(){return{version:"3.8",services:{db:this.getService()},networks:{shared:U}}}async up(){const t=v(this.getDockerComposeConfig());return P({cwd:d(),configAsString:t,log:!0})}async down(){const t=v(this.getDockerComposeConfig());return j({cwd:d(),configAsString:t,commandOptions:["-v","--remove-orphans","--rmi","local"],log:!0})}async waitUntilReady(){try{const t="mssql"===this.name?"master":this.options.database;return this.sequelize=new D(t,this.options.username,this.options.password,{host:"localhost",port:this.options.port,dialect:this.name.replace("postgresql","postgres"),retry:{max:30,match:[x,C,T,O,M],backoffBase:1e3,backoffExponent:1},logging:!1}),this.sequelize.authenticate().then((()=>!0)).catch((t=>(console.log(t),!1)))}catch(t){return!1}}async getServiceState(){const t=v(this.getDockerComposeConfig());return(await w({configAsString:t,log:!1,commandOptions:["--all"]})).data.services.find((t=>t.name.includes(this.name)))}async showDockerLogs(t){return new Promise(((e,s)=>{n("docker",["logs","-f","-n","5000",t],{cwd:d(),stdio:"inherit"}).on("exit",(t=>0===t?e():s(new Error(`Docker exited with code ${t}`))))}))}};const I={port:1433,database:"dcdx",username:"sa",password:"DataCenterDX!",edition:"Developer",version:"2022"};class MSSQL extends N{name="mssql";driver="com.microsoft.sqlserver.jdbc.SQLServerDriver";options=I;version="2022";get url(){return`jdbc:sqlserver://db:${this.options.port};databaseName=${this.options.database};trustServerCertificate=true`}constructor(t=I){super({...I,...t})}async onDatabaseReady(){await this.run(`CREATE DATABASE ${this.options.database}`),await this.run(`ALTER DATABASE ${this.options.database} COLLATE SQL_Latin1_General_CP1_CS_AS`),await this.run(`ALTER DATABASE ${this.options.database} SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;`)}getService=()=>({image:`mcr.microsoft.com/mssql/server:${this.version}-latest`,ports:[`${this.options.port||1433}:1433`],environment:{ACCEPT_EULA:"y",MSSQL_SA_PASSWORD:this.options.password||"dcdx",MSSQL_PID:this.options.edition},networks:{shared:{aliases:["db","database"]}}})}const F={port:3306,database:"dcdx",username:"dcdx",password:"dcdx",version:"8.0"};class MySQL extends N{name="mysql";driver="com.mysql.jdbc.Driver";options=F;version="8.0";get url(){return`jdbc:mysql://db:${this.options.port}/${this.options.database}?sessionVariables=transaction_isolation='READ-COMMITTED'`}constructor(t=F){super({...F,...t})}async onDatabaseReady(){await this.run(`ALTER DATABASE ${this.options.database} CHARACTER SET 'utf8mb4' COLLATE utf8mb4_bin`)}getService=()=>({image:`mysql:${this.version}`,ports:[`${this.options.port||3306}:3306`],environment:{MYSQL_ROOT_PASSWORD:this.options.password||"dcdx",MYSQL_USER:this.options.username||"dcdx",MYSQL_PASSWORD:this.options.password||"dcdx",MYSQL_DATABASE:this.options.database||"dcdx"},command:["--log_bin_trust_function_creators=1"],networks:{shared:{aliases:["db","database"]}}})}const Q={version:"15",database:"dcdx",port:5432,username:"dcdx",password:"dcdx"};class Postgres extends N{name="postgresql";driver="org.postgresql.Driver";options=Q;version="15";get url(){return`jdbc:postgresql://db:${this.options.port}/${this.options.database}`}constructor(t=Q){super({...Q,...t})}getService=()=>({image:`postgres:${this.version}`,ports:[`${this.options.port||5432}:5432`],environment:{POSTGRES_USER:this.options.username||"dcdx",POSTGRES_PASSWORD:this.options.password||"dcdx",POSTGRES_DB:this.options.database||"dcdx",POSTGRES_HOST_AUTH_METHOD:"md5",POSTGRES_INITDB_ARGS:"--encoding=UTF-8 --lc-collate=C --lc-ctype=C"},networks:{shared:{aliases:["db","database"]}}})}const G=g(E(),".dcdx");class Base extends f{options;constructor(t){super(),this.options=t}get baseUrl(){let t="http://localhost";return this.options.port&&(t+=`:${this.options.port}`),this.options.contextPath?`${t}/${this.options.contextPath}`:t}getDatabaseEngine(t){switch(t){case"postgresql":return new Postgres;case"mssql":return new MSSQL;case"mysql":return new MySQL}}async start(){this.options.clean&&await this.down(),await this.build(this.options.version),await this.database.start(this.options.clean),await this.up()}async stop(){if(await this.database.stop(this.options.prune),this.options.prune)await this.down();else{const t=v(this.getDockerComposeConfig());await k({cwd:d(),configAsString:t,log:!0})}this.emit(`${this.name}:stopped`)}async reset(){await this.database.stop(!0),await this.down()}async cp(t){const e=await this.getServiceState();if(e&&e.state.toLowerCase().startsWith("up")){const e=this.getDockerComposeConfig(),s=v(e);await A("cp",[t,`${this.name}:/opt/quickreload/`],{cwd:d(),configAsString:s,log:!1})}}async isApplicationReady(){try{const t=await h.get(`${this.baseUrl}/status`,{validateStatus:()=>!0}).catch((()=>null));if(t&&200===t.status){const{data:e}=t;if("FIRST_RUN"===e.state)return console.log(`The application ${this.name} is ready on ${this.baseUrl} 🎉`),!0}return!1}catch(t){return!1}}getDockerComposeConfig(){return{version:"3.8",services:{[this.name]:this.getService()},networks:{shared:U}}}async up(){const t=this.getDockerComposeConfig(),e=v(t);await S({cwd:d(),configAsString:e,log:!0}),this.emit(`${this.name}:up`);await this.waitUntilReady()?(this.emit(`${this.name}:ready`),await this.tailApplicationLogs()):console.log(`Failed to start ${this.name} ⛔`),s(0)}async down(){const t=v(this.getDockerComposeConfig());await j({cwd:d(),configAsString:t,commandOptions:["-v","--remove-orphans","--rmi","local"],log:!0})}async getServiceState(){const t=v(this.getDockerComposeConfig());return(await w({configAsString:t,log:!1,commandOptions:["--all"]})).data.services.find((t=>t.name.includes(this.name)))}async waitUntilReady(t=0){console.log(`Waiting for ${this.name} to become available... ${t}s`);const e=await this.getServiceState();return!!(e&&e.state.toLowerCase().startsWith("up")&&await this.isApplicationReady())||(t>=300?(console.error(`A timeout occurred while waiting for ${this.name} to become available ⛔`),e&&await this.showDockerLogs(e.name),!1):(await new Promise((t=>setTimeout(t,1e3))),this.waitUntilReady(t+1)))}getDockerRepositoryUrl(){return`https://bitbucket.org/atlassian-docker/docker-${"jira"===this.name?"atlassian-jira":"bamboo"===this.name?`${this.name}-server`:`atlassian-${this.name}-server`}.git`}async build(t){const e=this.getDockerRepositoryUrl(),s=g(G,this.name,"source");r(s)?await y({baseDir:s}).pull({"--recurse-submodule":null}):(c(g(G,this.name),{recursive:!0}),await y().clone(e,s,{"--recurse-submodule":null})),await new Promise(((e,o)=>{n("docker",["build","-t",`dcdx/${this.name}:${t}`,"--build-arg",`${this.name.toUpperCase()}_VERSION=${t}`,"."],{cwd:s,stdio:"inherit"}).on("exit",(t=>0===t?e():o(new Error(`Docker exited with code ${t}`))))}))}async tailApplicationLogs(){const t=await this.getServiceState();t&&t.state.toLowerCase().startsWith("up")&&await this.showApplicationLogs(t.name).catch((()=>null))}async showDockerLogs(t){return new Promise(((e,s)=>{n("docker",["logs","-f","-n","5000",t],{cwd:d(),stdio:"inherit"}).on("exit",(t=>0===t?e():s(new Error(`Docker exited with code ${t}`))))}))}async showApplicationLogs(t){return new Promise(((e,s)=>{n("docker",["exec","-i",t,"tail","-F","-n","5000",this.logFilePath],{cwd:d(),stdio:"inherit"}).on("exit",(t=>0===t?e():s(new Error(`Docker exited with code ${t}`))))}))}}class Bamboo extends Base{name=R.BAMBOO;database;logFilePath="/var/atlassian/application-data/bamboo/logs/atlassian-bamboo.log";constructor(t){super(t),this.database=this.getDatabaseEngine(t.database)}getService(){const t=this.getVolumes(),e=this.getEnvironmentVariables();return{build:{context:toAbsolutePath("../../assets"),dockerfile_inline:`\nFROM dcdx/${this.name}:${this.options.version}\nCOPY ./mysql-connector-j-8.3.0.jar /opt/atlassian/bamboo/lib/mysql-connector-j-8.3.0.jar\nCOPY ./quickreload-5.0.2.jar /var/atlassian/application-data/bamboo/shared/plugins/quickreload-5.0.2.jar\nRUN echo "/opt/quickreload" > /var/atlassian/application-data/bamboo/quickreload.properties; mkdir -p /opt/quickreload; chown -R bamboo:bamboo /opt/quickreload;\n\nRUN chown -R bamboo:bamboo /var/atlassian/application-data/bamboo`},ports:[`${this.options.port||80}:8085`,...this.options.debug?["5005:5005"]:[]],environment:Object.keys(e).length>0?e:void 0,volumes:t.length>0?t:void 0,networks:["shared"]}}async isApplicationReady(){try{const t=await h.get(`${this.baseUrl}/setup/setupGeneralConfiguration.action`,{validateStatus:()=>!0}).catch((()=>null));return 200===t?.status}catch(t){return!1}}getEnvironmentVariables(){return{...this.options.contextPath?{ATL_TOMCAT_CONTEXTPATH:this.options.contextPath}:"",...this.options.debug?{JVM_SUPPORT_RECOMMENDED_ARGS:this.getJVMArgs()}:"",ATL_BAMBOO_ENABLE_UNATTENDED_SETUP:"true",ATL_LICENSE:this.options.license||B,ATL_JDBC_URL:this.database.url,ATL_JDBC_USER:this.database.options.username,ATL_JDBC_PASSWORD:this.database.options.password,ATL_DB_TYPE:`${this.database.name}`}}getJVMArgs(){const t=[];return this.options.debug&&(t.push("-Dupm.plugin.upload.enabled=true"),t.push("-Xdebug"),t.push("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005")),this.options.quickReload&&t.push("-Dquickreload.dirs=/opt/quickreload"),t.join(" ")}getVolumes(){return[...this.options.quickReload?[`${this.options.quickReload}:/opt/quickreload`]:""]}}const V=AMPS.getApplicationVersion()||"latest";(async()=>{const s=t.showHelpAfterError(!0).addOption(new e("-v, --version <version>","The version of the host application").choices(L).default(V)).addOption(new e("-d, --database <name>","The database engine to remove data from").choices(["postgresql","mysql","mssql"]).default("postgresql")).parse(process.argv).opts(),o=new Bamboo({version:s.version,database:s.database});await o.reset()})(),process.on("SIGINT",(()=>{console.log("Received term signal, trying to stop gracefully 💪"),s()}));
|
|
2
|
+
import{program as t,Option as e}from"commander";import{gracefulExit as s}from"exit-hook";import{DOMParser as o,XMLSerializer as a}from"@xmldom/xmldom";import{spawn as n}from"child_process";import{XMLParser as i}from"fast-xml-parser";import{existsSync as r,readFileSync as u,mkdirSync as c}from"fs";import{cwd as d}from"process";import l from"xpath";import{hideBin as p}from"yargs/helpers";import m from"yargs/yargs";import h from"axios";import{dirname as b,join as g}from"path";import{stop as k,downAll as j,ps as w,execCompose as A,upAll as S}from"docker-compose/dist/v2.js";import f from"events";import{dump as v}from"js-yaml";import{homedir as E}from"os";import y from"simple-git";import{upAll as P}from"docker-compose";import{Sequelize as D,ConnectionError as x,TimeoutError as C,ConnectionTimedOutError as T,ConnectionRefusedError as O,ConnectionAcquireTimeoutError as R}from"sequelize";var M,L=["latest","9.4-ubuntu","9.4-jdk11","9.4.3-ubuntu","9.4","9.4.3","9.4.3-jdk11","ubuntu","jdk11","9-ubuntu","9-jdk11","9.5-ubuntu","9.5-jdk11","9.5.1-ubuntu","9.5.1-jdk11","9.5.1","9.5","9","9.2-ubuntu","9.2-jdk11","9.2","9.2.11-jdk11","9.2.11-ubuntu","9.2.11","9.3.3-ubuntu","9.3.3-jdk11","9.3.3","9.2.4-ubuntu","9.2.4-jdk11","9.3.2-ubuntu","9.3.2-jdk11","9.0-ubuntu","9.2.4","9.3.2","9.0-jdk11","9.0.4-ubuntu","9.0.4-jdk11","9.0.4","9.0","8.2.6-ubuntu","8.2.6","8.2.6-jdk11","8.1.11-ubuntu","8.1.11-jdk11","8.1.11","8.0.0-jdk11","8.0.0-ubuntu","8.1.8-ubuntu","9.3.4-ubuntu","8.1.8-jdk11","9.3.4-jdk11","8.1.8","8.0.0","8.0.4-ubuntu","9.3.4","8.0.4-jdk11","9.2.5-ubuntu","9.2.5-jdk11","8.0.4","9.2.5","9.1.0-ubuntu","9.1.0-jdk11","9.1.0","8.2.7-ubuntu","8.2.7-jdk11","8.2.7","8.1-ubuntu","8.1-jdk11","8.1.12-ubuntu","8.1.12-jdk11","8.1","8.1.12","8.0.5-ubuntu","8.0.5-jdk11","8.0.1-ubuntu","9.1.1-jdk11","8.1.9-ubuntu","8.0.1-jdk11","8.0.1","8.1.9-jdk11","9.1.1","8.1.9","8.2.8-ubuntu","8.2.8-jdk11","8.0.5","8.2.8","8.1.2-ubuntu","8.1.2-jdk11","8.1.2","8.0.10-ubuntu","9.3.5-ubuntu","8.0.10-jdk11","9.3.5-jdk11","8.0.10","9.3.5","9.2.6-jdk11","9.2.6-ubuntu","9.2.6","9.1.1-ubuntu","8.2.0-ubuntu","8.2.0-jdk11","9.1.2-ubuntu","8.2.0","9.1.2-jdk11","8.0.6-ubuntu","8.0.6-jdk11","9.1.2","8.0.6","8-ubuntu","8-jdk11","8.2-ubuntu","8.2-jdk11","8.2.9-ubuntu","8.2.9-jdk11","8.2.9","8.2","8.1.3-ubuntu","8.1.3-jdk11","8.1.3","8.0.11-jdk11","8.0.11-ubuntu","8.0.11","9.3-ubuntu","8","9.3-jdk11","9.3.6-ubuntu","9.3.6-jdk11","9.3.6","9.3","9.2.7-ubuntu","9.2.7-jdk11","9.2.7","8.2.1-ubuntu","8.2.1-jdk11","8.2.1","8.0.7-ubuntu","9.4.0-jdk11","8.0.7-jdk11","9.2.8-ubuntu","8.0.7","9.2.8-jdk11","9.2.8","9.1-ubuntu","9.1-jdk11","9.1.3-ubuntu","9.1.3-jdk11","9.1.3","9.1","9.0.0-jdk11","9.0.0-ubuntu","9.0.0","8.1.4-ubuntu","8.1.4-jdk11","8.1.4","8.0.8-ubuntu","8.0.8-jdk11","8.0.8","8.0.12-ubuntu","8.0.12","8.0.12-jdk11","8.2.2-ubuntu","8.2.2-jdk11","8.1.5-jdk11","8.2.2","8.1.5-ubuntu","8.1.5","8.0-ubuntu","8.0-jdk11","8.0.13-jdk11","8.0.13-ubuntu","8.0.13","9.4.1-ubuntu","8.0","9.4.1-jdk11","9.4.1","9.2.9-ubuntu","9.2.9","9.2.9-jdk11","9.2.1-ubuntu","9.2.1-jdk11","9.2.1","9.0.1-ubuntu","9.0.1-jdk11","9.0.1","8.2.3-ubuntu","8.2.3-jdk11","8.2.3","9.4.2-jdk11","8.0.9-ubuntu","8.0.9-jdk11","9.0.2-ubuntu","8.0.9","9.0.2-jdk11","9.0.2","8.1.6-ubuntu","8.1.6-jdk11","8.1.6","8.0.2-ubuntu","8.0.2-jdk11","8.0.2","7-ubuntu","7-jdk8","7.2-ubuntu","7.2-jdk8","7.2.7-jdk8","7.2.7-ubuntu","7.2.7","7.2.5-ubuntu","7.2.5-jdk8","7.2.5","7.2.3-ubuntu","7.2.3-jdk8","7.2.3","7.2.10-ubuntu","7.2.10-jdk8","7.2.10","7.2.0-ubuntu","7.2.0-jdk8","7.2.0","7.2","7.1.3-ubuntu","7.1.3-jdk8","7.1.3","7","9.3.0-ubuntu","9.3.0-jdk11","9.3.0","9.2.10-ubuntu","9.2.10-jdk11","9.2.10","8.2.4-ubuntu","8.2.4-jdk11","8.2.4","8.1.1-ubuntu","8.1.1-jdk11","8.1.1","8.1.7-ubuntu","8.1.7-jdk11","8.1.7","8.0.3-ubuntu","8.0.3-jdk11","8.0.3","jdk17","9-jdk17","9.5-jdk17","9.5.0-ubuntu","9.5.0-jdk17","9.5.0-jdk11","9.5.0","9.4-jdk17","9.4.2-ubuntu","9.4.0-ubuntu","9.4.2-jdk17","9.4.2","9.4.0","9.4.0-jdk17","9.3.1-ubuntu","9.3.1-jdk11","9.3.1","9.2.3-ubuntu","9.2.3-jdk11","9.2.3","9.0.3-ubuntu","9.0.3-jdk11","9.0.3","8.2.5-ubuntu","8.2.5-jdk11","8.2.5","8.1.10-ubuntu","8.1.10-jdk11","8.1.10","7.2.9-ubuntu","7.2.9","7.2.9-jdk8","7.2.6-ubuntu","7.2.6-jdk8","7.2.6","7.2.4-ubuntu","7.2.4-jdk8","7.2.4","7.2.2-ubuntu","7.2.2-jdk8","7.2.2","7.2.1-ubuntu","7.2.1-jdk8","7.2.1","7.1-ubuntu","7.1-jdk8","7.1.4-ubuntu","7.1.4-jdk8","7.1.4","7.1.2-ubuntu","7.1.2-jdk8","7.1.2","7.1.1-ubuntu","7.1.1-jdk8","7.1.1","7.1","9.4.1-jdk17","eap-jdk8","9.0.0-rc1-ubuntu","9.0.0-rc1-jdk11","9.0.0-rc1","eap-jdk11","eap-ubuntu","9.0.0-rc1-jdk8","eap","8.0.0-rc4","8.0.0-rc1","7.0.6","7.0","7.1.0-rc1","7.0.4","6.10","6.10.6","7.0.3","6.10.5","7.0.2","7.0.1","7.0.0-rc2","7.0.0-rc1","6.10.4","6.10.3","6.10.2","6.9.2","6.9","6.8.3","6.8","6.9.1","6.8.2","6.9.0","6.9.0-rc1","6.7","6.7.3","6.8.1","6.8.0","6.7.2","6.7.1","6.6.3","6.6","6.7.0-rc2","6.6.2","6.6.1","6.6.0"];!function(t){t.JIRA="jira",t.CONFLUENCE="confluence",t.BITBUCKET="bitbucket",t.BAMBOO="bamboo"}(M||(M={}));const{P:$,activeProfiles:_}=m(p(process.argv)).parseSync(),q=$||_||void 0;class AMPS{static maven;static stop(){AMPS.maven&&S.maven.kill(0)}static async build(t){return new Promise(((e,s)=>{if(AMPS.maven){AMPS.maven.kill(0)||s(new Error("Failed to terminate existing Maven process"))}AMPS.maven=n("mvn",["package",...t],{cwd:d(),stdio:"inherit"}),AMPS.maven.on("exit",(t=>{AMPS.maven=null,0===t||130===t?e():s(new Error(`Maven exited with code ${t}`))}))}))}static isAtlassianPlugin=()=>{try{return AMPS.getNodes("//*[local-name()='packaging']").some((t=>"atlassian-plugin"===t.textContent))}catch(t){return!1}};static getApplicationVersion(){const t=q?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${q}']/..//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']`,!0):AMPS.getNodes("//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']",!0);if(t){const e=t.parentNode;if(e){const{plugin:t}=AMPS.toObject(e),s=t?.configuration?.productVersion;return s?this.doPropertyReplacement(s):void 0}}}static getApplication(){const t=AMPS.getApplications();if(1===t.length)return t[0];if(q){const t=AMPS.getApplications(q);if(1===t.length)return t[0]}return null}static getApplications(t){const e=new Set;return(t?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${t}']/..//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']`):AMPS.getNodes("//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']")).forEach((t=>{const s=t.parentNode;if(s){const{plugin:t}=AMPS.toObject(s);t?.artifactId?.includes(M.JIRA)?e.add(M.JIRA):t?.artifactId?.includes(M.CONFLUENCE)?e.add(M.CONFLUENCE):t?.artifactId?.includes(M.BAMBOO)?e.add(M.BAMBOO):t?.artifactId?.includes(M.BITBUCKET)&&e.add(M.BITBUCKET)}})),Array.from(e)}static doPropertyReplacement(t){let e=t;const s=q?AMPS.getProperties(q):{};Object.entries(s).forEach((([t,s])=>{e=e.replaceAll(`\${${t}}`,s)}));const o=AMPS.getProperties();return Object.entries(o).forEach((([t,s])=>{e=e.replaceAll(`\${${t}}`,s)})),e}static getProperties(t){const e={};return(t?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${t}']/..//*[local-name()='properties']`):AMPS.getNodes("//*[local-name()='properties']")).forEach((t=>{const{properties:s}=AMPS.toObject(t);Object.entries(s).forEach((([t,s])=>e[t]=s))})),e}static getNodes(t,e){if(r("./pom.xml")){const s=u("./pom.xml","utf8"),a=(new o).parseFromString(s,"text/xml"),n=e?l.select(t,a,!0):l.select(t,a,!1);return Array.isArray(n)||e?n:[]}return[]}static toObject(t){try{return(new i).parse((new a).serializeToString(t))}catch(t){return null}}}const U="AAAB3w0ODAoPeNp9Ultr2zAYffevEOwtoMR10qYLGJbYWsno7GA7g90eZPlrotWWjCSnzX79FF8IYWkfDPJ3Oedwzvch2zdoWSvkzpF7v5jdLrwpCkiaIc/1POeRMxAasmMNEa3Az2xnHT04gQJquBQhNeB77vQGuzPs3jk5rXIpx5QZfgDfqAaGUtRUOaj4adX+PkpGy+UOhNE+vnGG5laDags9L3mtuToOJF5Pkja5ZorXJwEXHG+pJQdaNvS/cYtLAysBVFfu19ehvxXPQr4IJwV1AGULKzIneBb+8PBd/GWOH6Yf751No9ieaujleYMHKYl8++Fb13VGo1EUZ/hznOBNEofbIFvHEd6mxDb81kQoUH5EZg+op0dEMFmAQrWSf4AZ9HNvTP1rMZnsrLGmpFpzKsZMVpOy28DQbfweo1AiIQ0quDaK540Bi8w1MhKxRhtZWXvHTghn+zLQBvU46Ela1rLZcYEKOEApazvvfKXceiSoYG/kcTXhTUlFG+XVbgKVNHA+gF7BN8t3UuU5sdpRwXUXGnmlVV0CCmRVU3G8Evf5MKUw9vqIFV36tX7moNjfo7CPTxfenZIJErLMSIhX309pvDd8SUgK3smKMpJsknVKBtr26t4D+gd3AC5qMCwCFHOaTWfFvLCLJPft3qktVo3FafmZAhRojb9IAxj8KEqPDQy0stos394SQQ==X02mq",toAbsolutePath=t=>{const[,e]=process.argv,s=b(e),o=s.substring(0,s.indexOf("dcdx")+4);return g(o,t.replaceAll("../",""))},B={name:"shared",driver:"bridge"};let N=class Base extends f{options;sequelize=null;constructor(t){super(),this.options=t}async run(t,e){try{if(!this.sequelize)throw new Error("Database connection does not exist");await this.sequelize.query(t,{logging:e})}catch(e){console.error("An error occurred while trying to run the following SQL query:",t,e),s()}return null}async start(t=this.options.clean){console.log(`Starting instance of ${this.name} ⏳`),t&&await this.down(),await this.up(),this.emit(`${this.name}:up`);if(await this.waitUntilReady()){if(console.log(`Database is ready and accepting connections on localhost:${this.options.port} 🗄️`),await this.onDatabaseReady(),this.emit("db:ready"),this.options.logging){const t=await this.getServiceState();t&&await this.showDockerLogs(t.name)}}else console.log(`Failed to start database ${this.name} ⛔`),s(0)}async stop(t=this.options.prune){if(t)await this.down();else{const t=v(this.getDockerComposeConfig());await k({cwd:d(),configAsString:t,log:!0})}this.emit("db:stopped")}async onDatabaseReady(){}getDockerComposeConfig(){return{version:"3.8",services:{db:this.getService()},networks:{shared:B}}}async up(){const t=v(this.getDockerComposeConfig());return P({cwd:d(),configAsString:t,log:!0})}async down(){const t=v(this.getDockerComposeConfig());return j({cwd:d(),configAsString:t,commandOptions:["-v","--remove-orphans","--rmi","local"],log:!0})}async waitUntilReady(){try{const t="mssql"===this.name?"master":this.options.database;return this.sequelize=new D(t,this.options.username,this.options.password,{host:"localhost",port:this.options.port,dialect:this.name.replace("postgresql","postgres"),retry:{max:30,match:[x,C,T,O,R],backoffBase:1e3,backoffExponent:1},logging:!1}),this.sequelize.authenticate().then((()=>!0)).catch((t=>(console.log(t),!1)))}catch(t){return!1}}async getServiceState(){const t=v(this.getDockerComposeConfig());return(await w({configAsString:t,log:!1,commandOptions:["--all"]})).data.services.find((t=>t.name.includes(this.name)))}async showDockerLogs(t){return new Promise(((e,s)=>{n("docker",["logs","-f","-n","5000",t],{cwd:d(),stdio:"inherit"}).on("exit",(t=>0===t?e():s(new Error(`Docker exited with code ${t}`))))}))}};const I={port:1433,database:"dcdx",username:"sa",password:"DataCenterDX!",edition:"Developer",version:"2022"};class MSSQL extends N{name="mssql";driver="com.microsoft.sqlserver.jdbc.SQLServerDriver";options=I;version="2022";get url(){return`jdbc:sqlserver://db:${this.options.port};databaseName=${this.options.database};trustServerCertificate=true`}constructor(t=I){super({...I,...t})}async onDatabaseReady(){await this.run(`CREATE DATABASE ${this.options.database}`),await this.run(`ALTER DATABASE ${this.options.database} COLLATE SQL_Latin1_General_CP1_CS_AS`),await this.run(`ALTER DATABASE ${this.options.database} SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;`)}getService=()=>({image:`mcr.microsoft.com/mssql/server:${this.version}-latest`,ports:[`${this.options.port||1433}:1433`],environment:{ACCEPT_EULA:"y",MSSQL_SA_PASSWORD:this.options.password||"dcdx",MSSQL_PID:this.options.edition},networks:{shared:{aliases:["db","database"]}}})}const F={port:3306,database:"dcdx",username:"dcdx",password:"dcdx",version:"8.0"};class MySQL extends N{name="mysql";driver="com.mysql.jdbc.Driver";options=F;version="8.0";get url(){return`jdbc:mysql://db:${this.options.port}/${this.options.database}?sessionVariables=transaction_isolation='READ-COMMITTED'`}constructor(t=F){super({...F,...t})}async onDatabaseReady(){await this.run(`ALTER DATABASE ${this.options.database} CHARACTER SET 'utf8mb4' COLLATE utf8mb4_bin`)}getService=()=>({image:`mysql:${this.version}`,ports:[`${this.options.port||3306}:3306`],environment:{MYSQL_ROOT_PASSWORD:this.options.password||"dcdx",MYSQL_USER:this.options.username||"dcdx",MYSQL_PASSWORD:this.options.password||"dcdx",MYSQL_DATABASE:this.options.database||"dcdx"},command:["--log_bin_trust_function_creators=1"],networks:{shared:{aliases:["db","database"]}}})}const G={version:"15",database:"dcdx",port:5432,username:"dcdx",password:"dcdx"};class Postgres extends N{name="postgresql";driver="org.postgresql.Driver";options=G;version="15";get url(){return`jdbc:postgresql://db:${this.options.port}/${this.options.database}`}constructor(t=G){super({...G,...t})}getService=()=>({image:`postgres:${this.version}`,ports:[`${this.options.port||5432}:5432`],environment:{POSTGRES_USER:this.options.username||"dcdx",POSTGRES_PASSWORD:this.options.password||"dcdx",POSTGRES_DB:this.options.database||"dcdx",POSTGRES_HOST_AUTH_METHOD:"md5",POSTGRES_INITDB_ARGS:"--encoding=UTF-8 --lc-collate=C --lc-ctype=C"},networks:{shared:{aliases:["db","database"]}}})}const Q=g(E(),".dcdx");class Base extends f{options;constructor(t){super(),this.options=t}get baseUrl(){let t="http://localhost";return this.options.port&&(t+=`:${this.options.port}`),this.options.contextPath?`${t}/${this.options.contextPath}`:t}getDatabaseEngine(t){switch(t){case"postgresql":return new Postgres;case"mssql":return new MSSQL;case"mysql":return new MySQL}}async start(){this.options.clean&&await this.down(),await this.build(this.options.version),await this.database.start(this.options.clean),await this.up()}async stop(){if(await this.database.stop(this.options.prune),this.options.prune)await this.down();else{const t=v(this.getDockerComposeConfig());await k({cwd:d(),configAsString:t,log:!0})}this.emit(`${this.name}:stopped`)}async reset(){await this.database.stop(!0),await this.down()}async cp(t){const e=await this.getServiceState();if(e&&e.state.toLowerCase().startsWith("up")){const e=this.getDockerComposeConfig(),s=v(e);await A("cp",[t,`${this.name}:/opt/quickreload/`],{cwd:d(),configAsString:s,log:!1})}}async isApplicationReady(){try{const t=await h.get(`${this.baseUrl}/status`,{validateStatus:()=>!0}).catch((()=>null));if(t&&200===t.status){const{data:e}=t;if("FIRST_RUN"===e.state||"RUNNING"===e.state)return console.log(`The application ${this.name} is ready on ${this.baseUrl} 🎉`),!0}return!1}catch(t){return!1}}getDockerComposeConfig(){return{version:"3.8",services:{[this.name]:this.getService()},networks:{shared:B}}}async up(){const t=this.getDockerComposeConfig(),e=v(t);await S({cwd:d(),configAsString:e,log:!0}),this.emit(`${this.name}:up`);await this.waitUntilReady()?(this.emit(`${this.name}:ready`),await this.tailApplicationLogs()):console.log(`Failed to start ${this.name} ⛔`),s(0)}async down(){const t=v(this.getDockerComposeConfig());await j({cwd:d(),configAsString:t,commandOptions:["-v","--remove-orphans","--rmi","local"],log:!0})}async getServiceState(){const t=v(this.getDockerComposeConfig());return(await w({configAsString:t,log:!1,commandOptions:["--all"]})).data.services.find((t=>t.name.includes(this.name)))}async waitUntilReady(t=0){console.log(`Waiting for ${this.name} to become available... ${t}s`);const e=await this.getServiceState();return!!(e&&e.state.toLowerCase().startsWith("up")&&await this.isApplicationReady())||(t>=300?(console.error(`A timeout occurred while waiting for ${this.name} to become available ⛔`),e&&await this.showDockerLogs(e.name),!1):(await new Promise((t=>setTimeout(t,1e3))),this.waitUntilReady(t+1)))}getDockerRepositoryUrl(){return`https://bitbucket.org/atlassian-docker/docker-${"jira"===this.name?"atlassian-jira":"bamboo"===this.name?`${this.name}-server`:`atlassian-${this.name}-server`}.git`}async build(t){const e=this.getDockerRepositoryUrl(),s=g(Q,this.name,"source");r(s)?await y({baseDir:s}).pull({"--recurse-submodule":null}):(c(g(Q,this.name),{recursive:!0}),await y().clone(e,s,{"--recurse-submodule":null})),await new Promise(((e,o)=>{n("docker",["build","-t",`dcdx/${this.name}:${t}`,"--build-arg",`${this.name.toUpperCase()}_VERSION=${t}`,"."],{cwd:s,stdio:"inherit"}).on("exit",(t=>0===t?e():o(new Error(`Docker exited with code ${t}`))))}))}async tailApplicationLogs(){const t=await this.getServiceState();t&&t.state.toLowerCase().startsWith("up")&&await this.showApplicationLogs(t.name).catch((()=>null))}async showDockerLogs(t){return new Promise(((e,s)=>{n("docker",["logs","-f","-n","5000",t],{cwd:d(),stdio:"inherit"}).on("exit",(t=>0===t?e():s(new Error(`Docker exited with code ${t}`))))}))}async showApplicationLogs(t){return new Promise(((e,s)=>{n("docker",["exec","-i",t,"tail","-F","-n","5000",this.logFilePath],{cwd:d(),stdio:"inherit"}).on("exit",(t=>0===t?e():s(new Error(`Docker exited with code ${t}`))))}))}}class Bamboo extends Base{name=M.BAMBOO;database;logFilePath="/var/atlassian/application-data/bamboo/logs/atlassian-bamboo.log";constructor(t){super(t),this.database=this.getDatabaseEngine(t.database)}getService(){const t=this.getVolumes(),e=this.getEnvironmentVariables();return{build:{context:toAbsolutePath("../../assets"),dockerfile_inline:`\nFROM dcdx/${this.name}:${this.options.version}\nCOPY ./mysql-connector-j-8.3.0.jar /opt/atlassian/bamboo/lib/mysql-connector-j-8.3.0.jar\nCOPY ./quickreload-5.0.2.jar /var/atlassian/application-data/bamboo/shared/plugins/quickreload-5.0.2.jar\nRUN echo "/opt/quickreload" > /var/atlassian/application-data/bamboo/quickreload.properties; mkdir -p /opt/quickreload; chown -R bamboo:bamboo /opt/quickreload;\n\nRUN chown -R bamboo:bamboo /var/atlassian/application-data/bamboo`},ports:[`${this.options.port||80}:8085`,...this.options.debug?["5005:5005"]:[]],environment:Object.keys(e).length>0?e:void 0,volumes:t.length>0?t:void 0,networks:["shared"]}}async isApplicationReady(){try{const t=await h.get(`${this.baseUrl}/setup/setupGeneralConfiguration.action`,{validateStatus:()=>!0}).catch((()=>null));return 200===t?.status}catch(t){return!1}}getEnvironmentVariables(){return{...this.options.contextPath?{ATL_TOMCAT_CONTEXTPATH:this.options.contextPath}:"",...this.options.debug?{JVM_SUPPORT_RECOMMENDED_ARGS:this.getJVMArgs()}:"",ATL_BAMBOO_ENABLE_UNATTENDED_SETUP:"true",ATL_LICENSE:this.options.license||U,ATL_JDBC_URL:this.database.url,ATL_JDBC_USER:this.database.options.username,ATL_JDBC_PASSWORD:this.database.options.password,ATL_DB_TYPE:`${this.database.name}`}}getJVMArgs(){const t=[];return this.options.debug&&(t.push("-Dupm.plugin.upload.enabled=true"),t.push("-Xdebug"),t.push("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005")),this.options.quickReload&&t.push("-Dquickreload.dirs=/opt/quickreload"),t.join(" ")}getVolumes(){return[...this.options.quickReload?[`${this.options.quickReload}:/opt/quickreload`]:""]}}const V=AMPS.getApplicationVersion()||"latest";(async()=>{const s=t.showHelpAfterError(!0).addOption(new e("-v, --version <version>","The version of the host application").choices(L).default(V)).addOption(new e("-d, --database <name>","The database engine to remove data from").choices(["postgresql","mysql","mssql"]).default("postgresql")).parse(process.argv).opts(),o=new Bamboo({version:s.version,database:s.database});await o.reset()})(),process.on("SIGINT",(()=>{console.log("Received term signal, trying to stop gracefully 💪"),s()}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{program as u,Option as t}from"commander";import{gracefulExit as d}from"exit-hook";import{DOMParser as n,XMLSerializer as k}from"@xmldom/xmldom";import{spawn as j}from"child_process";import{XMLParser as e}from"fast-xml-parser";import{existsSync as b,readFileSync as a,mkdirSync as i}from"fs";import{cwd as s}from"process";import o from"xpath";import{hideBin as r}from"yargs/helpers";import l from"yargs/yargs";import{dirname as p,join as c}from"path";import h from"axios";import{stop as m,downAll as g,ps as w,execCompose as S,upAll as A}from"docker-compose/dist/v2.js";import v from"events";import{dump as f}from"js-yaml";import{homedir as y}from"os";import R from"simple-git";import{upAll as P}from"docker-compose";import{Sequelize as C,ConnectionError as D,TimeoutError as E,ConnectionTimedOutError as x,ConnectionRefusedError as O,ConnectionAcquireTimeoutError as M}from"sequelize";var $,T=["8.2.1-ubuntu-jdk11","8.2.1-jdk11","8.2.1","8.16.2-ubuntu-jdk17","8.16.2-jdk17","8.16.2","8.1.1-ubuntu-jdk11","8.1.1-jdk11","8.1.1","8.8-ubuntu-jdk17","8.8-jdk17","8.8.7-ubuntu-jdk17","8.8.7-jdk17","8.8.7","8.8","8.3.2-ubuntu-jdk11","7.21.5-ubuntu-jdk11","8.3.2-jdk11","7.21.5-jdk11","8.3.2","8.2.2-ubuntu-jdk11","7.21.5","8.2.2-jdk11","8.2.2","8.1.2-ubuntu-jdk11","8.1.2-jdk11","8.1.2","7.21.2-ubuntu-jdk11","7.21.2-jdk11","7.21.2","8.3.3-ubuntu-jdk11","8.3.3-jdk11","8.3.3","8.16-ubuntu-jdk17","8.16-jdk17","8.16.3-ubuntu-jdk17","8.16.3-jdk17","8.16.3","8.16","8.14.2-ubuntu-jdk17","8.15.1-ubuntu-jdk17","8.15.1-jdk17","8.14.2-jdk17","8.14.3-ubuntu-jdk17","8.15.1","8.14.2","8.14.3-jdk17","8.9.4-ubuntu-jdk17","8.9.4-jdk17","8.14.4-ubuntu-jdk17","8.14.3","8.9.4","8.14.4-jdk17","8.14.5-ubuntu-jdk17","8.14.4","8.8.1-ubuntu-jdk17","8.8.1-jdk17","8.14-ubuntu-jdk17","8.8.1","8.14-jdk17","8.14.5-jdk17","8.11.3-ubuntu-jdk17","8.11.3-jdk17","8.15.0-ubuntu-jdk17","8.14.5","8.15.0-jdk17","8.11.3","8.14","8.0.1-ubuntu-jdk11","8.15.0","8.0.1-jdk11","8.0.1","8.7.0-ubuntu-jdk11","8.7.0-jdk11","8.7.0","8.10.5-ubuntu-jdk17","8.10.5-jdk17","8.10.5","7.21.14-ubuntu-jdk11","7.21.14-jdk11","8.9.0-ubuntu-jdk17","7.21.14","8.9.0-jdk17","8.9.0","8.5-ubuntu-jdk11","8.5-jdk11","8.5.4-ubuntu-jdk11","8.5.4-jdk11","8.5.4","8.5","8.4.3-ubuntu-jdk11","8.4.3-jdk11","8.4.3","7.21.6-ubuntu-jdk11","7.21.6-jdk11","7.21.6","7.21.20-ubuntu-jdk11","7.21.20-jdk11","7.21.20","7.21.1-ubuntu-jdk11","7.21.1-jdk11","7.21.1","8.3-ubuntu-jdk11","8.3-jdk11","8.3.4-ubuntu-jdk11","8.3.4-jdk11","8.3.4","8.3","8.2.3-ubuntu-jdk11","8.2.3-jdk11","8.2.3","8.15.2-ubuntu-jdk17","8.15.2-jdk17","8.15.2","8.1.3-ubuntu-jdk11","8.1.3-jdk11","8.1.3","8.9.5-ubuntu-jdk17","8.9.5-jdk17","8.10.0-ubuntu-jdk17","8.10.0-jdk17","8.10.0","8.0.2-ubuntu-jdk11","8.0.2-jdk11","8.0.2","7.20.0-ubuntu-jdk11","7.20.0-jdk11","7.20.0","8.9.5","8.8.2-ubuntu-jdk17","8.8.2-jdk17","8.8.2","8.17.0-ubuntu-jdk17","8.17.0-jdk17","8.17.0","8.11.4-ubuntu-jdk17","8.11.4-jdk17","8.11.4","8.10-ubuntu-jdk17","8.10-jdk17","8.10.6-ubuntu-jdk17","8.10.6-jdk17","8.10.6","8.10","8.9.1-ubuntu-jdk17","8.9.1-jdk17","8.7.1-ubuntu-jdk11","8.9.1","8.7.1-jdk11","8.7.1","8.4-ubuntu-jdk11","8.4-jdk11","8.4.4-ubuntu-jdk11","8.4.4-jdk11","8.4.4","8.4","8.12.1-ubuntu-jdk17","8.12.1-jdk17","8.12.1","7.21.7-ubuntu-jdk11","7.21.7-jdk11","7.21.7","7.21.21-ubuntu-jdk11","7.21.21-jdk11","7.21.21","7.21.15-ubuntu-jdk11","7.21.15-jdk11","7.21.15","7.21.10-jdk11","7.21.10-ubuntu-jdk11","7.21.10","8.2-ubuntu-jdk11","8.2-jdk11","8.2.4-ubuntu-jdk11","8.2.4-jdk11","8.2.4","8.2","8.15.3-ubuntu-jdk17","8.15.3-jdk17","8.15.3","8.12-ubuntu-jdk17","8.12-jdk17","8.12.6-ubuntu-jdk17","8.12.6-jdk17","8.12.6","8.12","8.6.0-ubuntu-jdk11","8.6.0","8.6.0-jdk11","8.1.4-ubuntu-jdk11","8.1.4-jdk11","8.1.4","8.13.4-ubuntu-jdk17","8.13.4-jdk17","8.13.4","8.0.3-ubuntu-jdk11","8.0.3-jdk11","8.0.3","7.20.1-ubuntu-jdk11","8.9.6-ubuntu-jdk17","7.20.1-jdk11","8.9.6-jdk17","7.20.1","8.9.6","8.17-ubuntu-jdk17","8.17-jdk17","8.17.1-ubuntu-jdk17","8.17.1-jdk17","8.17.1","8.17","8.11.5-ubuntu-jdk17","8.11.5-jdk17","8.11.5","8.10.1-ubuntu-jdk17","8.10.1-jdk17","8.10.1","8.8.3-ubuntu-jdk17","8.8.3-jdk17","8.8.3","8.7.2-ubuntu-jdk11","8.7.2-jdk11","8.7.2","7-ubuntu-jdk11","7-jdk11","7.21-ubuntu-jdk11","7.21-jdk11","7.21.8-ubuntu-jdk11","7.21.8-jdk11","7.21.8","7.21.22-ubuntu-jdk11","7.21.22-jdk11","7.21.22","7.21","7","8.9-ubuntu-jdk17","8.9-jdk17","8.9.10-ubuntu-jdk17","8.9.10-jdk17","8.9.10","8.9","8.12.2-ubuntu-jdk17","8.12.2-jdk17","8.12.2","7.21.16-ubuntu-jdk11","7.21.16-jdk11","7.21.16","8.6.1-ubuntu-jdk11","8.6.1-jdk11","8.6.1","8.4.0-ubuntu-jdk11","8.4.0-jdk11","8.4.0","8.15-ubuntu-jdk17","8.15-jdk17","8.15.4-ubuntu-jdk17","8.15.4-jdk17","8.15.4","8.15","8.13.5-ubuntu-jdk17","8.13.5-jdk17","8.13.5","8.0.4-ubuntu-jdk11","8.0.4-jdk11","8.0.4","7.21.11-ubuntu-jdk11","7.21.11-jdk11","7.21.11","7.20.2-ubuntu-jdk11","7.20.2-jdk11","7.20.2","8.9.7-ubuntu-jdk17","8.9.7-jdk17","8.9.7","8.5.0-ubuntu-jdk11","8.5.0-jdk11","8.5.0","8.1-ubuntu-jdk11","8.1-jdk11","8.1.5-ubuntu-jdk11","8.1.5-jdk11","8.1.5","8.11.0-ubuntu-jdk17","8.11.0-jdk17","8.11.0","8.1","8.8.4-ubuntu-jdk17","8.8.4-jdk17","8.8.4","8.7.3-ubuntu-jdk11","8.13.0-ubuntu-jdk17","8.13.0-jdk17","8.13.0","8.11-ubuntu-jdk17","8.11-jdk17","8.11.6-ubuntu-jdk17","8.11.6-jdk17","8.11.6","8.11","8.10.2-ubuntu-jdk17","8.10.2-jdk17","latest","8.10.2","jdk17","8-ubuntu-jdk17","8-jdk17","8.7.3-jdk11","8.7.3","8.18.0-ubuntu-jdk17","8.12.3-ubuntu-jdk17","8.12.3-jdk17","8.12.3","8","7.21.9-ubuntu-jdk11","7.21.9-jdk11","7.21.9","ubuntu-jdk17","7.21.17-ubuntu-jdk11","8.6.2-ubuntu-jdk11","8.6.2-jdk11","8.6.2","8.4.1-ubuntu-jdk11","8.4.1-jdk11","8.4.1","8.3.0-ubuntu-jdk11","8.3.0-jdk11","8.3.0","8.18-ubuntu-jdk17","8.18-jdk17","8.18.0-jdk17","8.18.0","8.18","8.13-ubuntu-jdk17","8.13-jdk17","8.13.6-ubuntu-jdk17","8.13.6-jdk17","8.13.6","8.13","8.0-ubuntu-jdk11","8.0-jdk11","8.0.5-ubuntu-jdk11","8.0.5-jdk11","8.0.5","8.0","7.21.17-jdk11","7.21.17","7.20-ubuntu-jdk11","7.20-jdk11","7.20.3-ubuntu-jdk11","7.20.3-jdk11","7.20.3","7.20","8.9.8-ubuntu-jdk17","8.9.8-jdk17","8.9.8","8.5.1-ubuntu-jdk11","8.5.1-jdk11","8.5.1","8.11.1-ubuntu-jdk17","8.11.1-jdk17","8.11.1","7.21.3-ubuntu-jdk11","7.21.3-jdk11","7.21.3","7.21.12-ubuntu-jdk11","7.21.12-jdk11","7.21.12","8.9.2-ubuntu-jdk17","8.9.2-jdk17","8.9.2","8.8.5-ubuntu-jdk17","8.8.5-jdk17","8.8.5","8.7.4-ubuntu-jdk11","8.7.4-jdk11","8.7.4","8.13.1-ubuntu-jdk17","8.13.1-jdk17","8.13.1","8.10.3-ubuntu-jdk17","8.6.3-ubuntu-jdk11","8.10.3-jdk17","8.6.3-jdk11","8.10.3","8.6.3","8.16.0-ubuntu-jdk17","8.16.0-jdk17","8.16.0","8.12.4-ubuntu-jdk17","8.12.4-jdk17","8.12.4","8.0.0","7.21.18-ubuntu-jdk11","7.21.18","8.2.0-ubuntu-jdk11","8.2.0-jdk11","8.2.0","8.12.0-ubuntu-jdk17","8.12.0-jdk17","8.12.0","8.0.0-ubuntu-jdk11","8.0.0-jdk11","7.21.4-ubuntu-jdk11","7.21.4-jdk11","7.21.4","7.21.18-jdk11","8.9.9","8.5.2-ubuntu-jdk11","8.5.2-jdk11","8.5.2","8.4.2-ubuntu-jdk11","8.4.2-jdk11","8.4.2","8.3.1-ubuntu-jdk11","8.3.1-jdk11","8.3.1","8.11.2-ubuntu-jdk17","8.11.2-jdk17","8.11.2","8.9.9-ubuntu-jdk17","8.9.9-jdk17","8.14.0-ubuntu-jdk17","8.14.0-jdk17","8.14.0","8.13.2-ubuntu-jdk17","8.13.2-jdk17","8.13.2","7.21.13-ubuntu-jdk11","7.21.13-jdk11","7.21.13","8.7-ubuntu-jdk11","8.7-jdk11","8.7.5-ubuntu-jdk11","8.7.5-jdk11","8.7.5","8.7","8.6-ubuntu-jdk11","8.6-jdk11","8.6.4-ubuntu-jdk11","8.6.4-jdk11","8.6.4","8.6","7.21.0-ubuntu-jdk11","7.21.0-jdk11","7.21.0","8.9.3-ubuntu-jdk17","8.9.3-jdk17","8.9.3","8.8.6-ubuntu-jdk17","8.8.6-jdk17","8.8.6","8.8.0-ubuntu-jdk17","8.8.0-jdk17","8.8.0","8.16.1-ubuntu-jdk17","8.16.1-jdk17","8.16.1","8.12.5-ubuntu-jdk17","8.12.5-jdk17","8.12.5","8.1.0-ubuntu-jdk11","8.1.0-jdk11","8.10.4-ubuntu-jdk17","8.10.4-jdk17","8.10.4","8.1.0","7.21.19-ubuntu-jdk11","7.21.19-jdk11","7.21.19","8.5.3-ubuntu-jdk11","8.5.3-jdk11","8.5.3","8.14.1-ubuntu-jdk17","8.14.1-jdk17","8.14.1","8.13.3-ubuntu-jdk17","8.13.3-jdk17","8.13.3","8.15-ubuntu-jdk11","8.15-jdk11","8.15.3-ubuntu-jdk11","8.15.3-jdk11","8.8.0-ubuntu-jdk11","8.8.0-jdk11","8.16.0-ubuntu-jdk11","8.16.0-jdk11","8.8.1-jdk11","8.12.3-ubuntu-jdk11","8.12.3-jdk11","8.8.1-ubuntu-jdk11","8.16.1-ubuntu-jdk11","8.10.0-ubuntu-jdk11","8.10.0-jdk11","8.16.1-jdk11","7.6.9-ubuntu-jdk11","7.6.9-jdk11","8.12.4-ubuntu-jdk11","8.12.4-jdk11","7.6.9","8.8.2-ubuntu-jdk11","8.8.2-jdk11","7.19-ubuntu-jdk11","7.19-jdk11","7.19.5-ubuntu-jdk11","7.19.5-jdk11","7.19.5","7.19","7.7.0-ubuntu-jdk11","8.16-ubuntu-jdk11","8.16-jdk11","8.16.2-ubuntu-jdk11","7.7.0","8.16.2-jdk11","8.10.1-ubuntu-jdk11","8.10.1-jdk11","7.7.0-jdk11","8.12.5-ubuntu-jdk11","8.8.3-ubuntu-jdk11","8.12.5-jdk11","8.8.3-jdk11","7.7-ubuntu-jdk11","7.7-jdk11","7.7.1-ubuntu-jdk11","7.7.1-jdk11","7.7.1","7.7","7.10.0-ubuntu-jdk11","7.10.0-jdk11","7.10.0","8.10.2-ubuntu-jdk11","8.10.2-jdk11","ubuntu-jdk11","jdk11","8-jdk11","8-ubuntu-jdk11","8.17-ubuntu-jdk11","8.17-jdk11","8.17.0-ubuntu-jdk11","8.17.0-jdk11","8.12-ubuntu-jdk11","8.12-jdk11","8.12.6-ubuntu-jdk11","8.12.6-jdk11","7.16.2-ubuntu-jdk11","7.16.2-jdk11","7.16.2","8.8.4-ubuntu-jdk11","8.8.4-jdk11","7.10-ubuntu-jdk11","7.10-jdk11","7.10.1-ubuntu-jdk11","7.10.1-jdk11","7.10.1","7.10","7.17.3-ubuntu-jdk11","7.17.3-jdk11","8.10.3-ubuntu-jdk11","7.17.3","8.10.3-jdk11","7.8.0-ubuntu-jdk11","7.8.0-jdk11","7.8.0","7.16-jdk11","7.16-ubuntu-jdk11","7.16.3-jdk11","7.16.3-ubuntu-jdk11","7.16.3","7.16","8.13.0-ubuntu-jdk11","8.13.0-jdk11","8.8.5-ubuntu-jdk11","8.8.5-jdk11","7.11.1","7.6.13-ubuntu-jdk11","7.6.13-jdk11","7.17.4-ubuntu-jdk11","7.6.13","7.17.4-jdk11","7.17.4","7.11.1-ubuntu-jdk11","7.11.1-jdk11","7.8-ubuntu-jdk11","8.10.4-ubuntu-jdk11","7.8-jdk11","7.8.1-jdk11","7.8.1-ubuntu-jdk11","7.8.1","7.8","8.10.4-jdk11","7.17.0-ubuntu-jdk11","7.17.0-jdk11","7.17.0","8.13.1-ubuntu-jdk11","8.13.1-jdk11","7.6.14-ubuntu-jdk11","7.6.14-jdk11","7.6.14","7.11-ubuntu-jdk11","7.11-jdk11","7.11.2-ubuntu-jdk11","7.11.2-jdk11","8.8.6-ubuntu-jdk11","8.8.6-jdk11","7.11.2","7.11","7.17.5-ubuntu-jdk11","7.17.5-jdk11","7.17.5","7.9.0-ubuntu-jdk11","7.9.0-jdk11","7.9.0","8.10.5-ubuntu-jdk11","8.10.5-jdk11","7.6.15-ubuntu-jdk11","7.6.15-jdk11","7.6.15","7.17.1-ubuntu-jdk11","7.17.1-jdk11","7.17.1","8.13.2-ubuntu-jdk11","8.13.2-jdk11","7.17.6-ubuntu-jdk11","7.17.6-jdk11","7.17.6","7.12.0-jdk11","7.12.0","8.8-ubuntu-jdk11","8.8-jdk11","7.12.0-ubuntu-jdk11","8.8.7-ubuntu-jdk11","8.8.7-jdk11","7.9-ubuntu-jdk11","7.9-jdk11","7.9.1-ubuntu-jdk11","7.9.1-jdk11","7.9.1","7.9","8.10-ubuntu-jdk11","8.10-jdk11","8.10.6-ubuntu-jdk11","8.10.6-jdk11","7.6.16-ubuntu-jdk11","7.6.16-jdk11","7.6.16","7.17.10-ubuntu-jdk11","7.17.10-jdk11","7.17.10","7.17.7-ubuntu-jdk11","7.17.7-jdk11","7.17.7","7.12-ubuntu-jdk11","7.12-jdk11","7.12.1-ubuntu-jdk11","7.12.1-jdk11","7.12","8.13.3-ubuntu-jdk11","8.13.3-jdk11","7.12.1","7.6.17-ubuntu-jdk11","7.6.17-jdk11","7.6.17","7.17.11-ubuntu-jdk11","7.17.11-jdk11","7.17.11","7.17.8-ubuntu-jdk11","7.17.8-jdk11","7.17.8","8.9.0-ubuntu-jdk11","8.9.0-jdk11","8.13.4-ubuntu-jdk11","8.13.4-jdk11","8.11.0-ubuntu-jdk11","8.11.0-jdk11","7.6.18-ubuntu-jdk11","7.6.18-jdk11","7.6.18","7.13.0-ubuntu-jdk11","7.13.0-jdk11","7.13.0","7.17.12-ubuntu-jdk11","7.17.12-jdk11","7.17.12","7.17.9-ubuntu-jdk11","7.17.9-jdk11","7.17.9","8.13-ubuntu-jdk11","8.13-jdk11","8.13.5-ubuntu-jdk11","8.13.5-jdk11","7.6.19-ubuntu-jdk11","7.6.19-jdk11","7.6.19","7.13-ubuntu-jdk11","7.13-jdk11","7.13.1-ubuntu-jdk11","7.13.1-jdk11","7.13.1","7.13","8.9.1-ubuntu-jdk11","8.9.1-jdk11","8.11.1-ubuntu-jdk11","8.11.1-jdk11","7.17.13-ubuntu-jdk11","7.17.13-jdk11","7.17.13","7.18.0-ubuntu-jdk11","7.18.0-jdk11","7.18.0","7.6.2-ubuntu-jdk11","7.6.2-jdk11","8.9.2-ubuntu-jdk11","7.6.2","8.9.2-jdk11","8.14.0-ubuntu-jdk11","8.14.0-jdk11","8.11.2-ubuntu-jdk11","8.11.2-jdk11","7.17.14-ubuntu-jdk11","7.17.14-jdk11","7.17.14","7.14.0-ubuntu-jdk11","7.14.0-jdk11","7.14.0","7.6.20-ubuntu-jdk11","7.6.20-jdk11","7.6.20","7.18.1-ubuntu-jdk11","7.18.1-jdk11","7.18.1","7.14.1-ubuntu-jdk11","7.14.1","7.18.2-ubuntu-jdk11","7.17.15-ubuntu-jdk11","7.17.15-jdk11","7.17.15","7.14.1-jdk11","8.9.3-ubuntu-jdk11","8.9.3-jdk11","8.14.1-ubuntu-jdk11","8.14.1-jdk11","8.11.3-ubuntu-jdk11","8.11.3-jdk11","7.6.21-ubuntu-jdk11","7.6.21-jdk11","7.6.21","7.18.2-jdk11","7.18.2","7.14-ubuntu-jdk11","7.14.2-ubuntu-jdk11","7.14.2-jdk11","7.6.22-ubuntu-jdk11","7.6.22-jdk11","7.6.22","7.5.0-ubuntu-jdk11","7.5.0-jdk11","7.5.0","7.18.3","7.17.16-ubuntu-jdk11","7.17.16-jdk11","7.17.16","7.14-jdk11","7.14.2","7.14","8.14.2-ubuntu-jdk11","8.14.2-jdk11","7.18.3-ubuntu-jdk11","7.18.3-jdk11","8.9.4-ubuntu-jdk11","8.9.4-jdk11","8.11.4-ubuntu-jdk11","8.11.4-jdk11","7.6-ubuntu-jdk11","7.6-jdk11","7.6.23-ubuntu-jdk11","7.6.23-jdk11","7.6.23","7.6","7.5.1-ubuntu-jdk11","7.5.1-jdk11","7.5.1","7.17.17-ubuntu-jdk11","7.17.17-jdk11","7.17.17","7.18-ubuntu-jdk11","7.18-jdk11","7.18.4-ubuntu-jdk11","7.18.4-jdk11","7.18.4","7.18","8.14.3-ubuntu-jdk11","7.15.0-jdk11","8.14.3-jdk11","8.11.5-ubuntu-jdk11","8.11.5-jdk11","7.15.0-ubuntu-jdk11","7.15.0","8.9.5-ubuntu-jdk11","8.9.5-jdk11","7.5-ubuntu-jdk11","7.5-jdk11","7.5.2-ubuntu-jdk11","7.5.2-jdk11","7.5.2","7.5","7.17.18-ubuntu-jdk11","7.17.18-jdk11","7.17.18","7.15.1-ubuntu-jdk11","7.15.1-jdk11","7.15.1","8.14-jdk11","8.14.4-jdk11","8.9.6-ubuntu-jdk11","7.6.3-ubuntu-jdk11","7.6.3-jdk11","8.9.6-jdk11","7.6.3","8.14-ubuntu-jdk11","8.14.4-ubuntu-jdk11","8.11-ubuntu-jdk11","8.11-jdk11","8.11.6-ubuntu-jdk11","8.11.6-jdk11","7.19.0-ubuntu-jdk11","7.19.0-jdk11","7.19.0","7.17.19-ubuntu-jdk11","7.17.19-jdk11","7.17.19","7.15.2-ubuntu-jdk11","7.15.2-jdk11","7.15.2","7.6.4-ubuntu-jdk11","7.6.4-jdk11","7.6.4","7.6.0-ubuntu-jdk11","7.6.0-jdk11","7.6.0","8.9.7-ubuntu-jdk11","8.9.7-jdk11","7.19.1-ubuntu-jdk11","7.19.1-jdk11","7.19.1","7.17.2-ubuntu-jdk11","7.17.2","7.17.2-jdk11","7.15-ubuntu-jdk11","7.15-jdk11","7.15.3-ubuntu-jdk11","7.15.3-jdk11","7.15.3","7.15","8.15.0-ubuntu-jdk11","8.15.0-jdk11","8.12.0-ubuntu-jdk11","8.12.0-jdk11","7.6.5-ubuntu-jdk11","7.6.5-jdk11","7.6.5","7.6.1-ubuntu-jdk11","7.6.1-jdk11","7.6.1","8.9.8-ubuntu-jdk11","8.9.8-jdk11","7.19.2-ubuntu-jdk11","7.19.2-jdk11","7.19.2","7.17.20-ubuntu-jdk11","7.17.20-jdk11","7.17.20","7.6.6-ubuntu-jdk11","7.6.6-jdk11","7.6.6","7.6.10-ubuntu-jdk11","7.6.10-jdk11","7.6.10","8.15.1-ubuntu-jdk11","8.15.1-jdk11","8.12.1-ubuntu-jdk11","8.12.1-jdk11","7.19.3-ubuntu-jdk11","7.19.3-jdk11","7.19.3","7.16.0-ubuntu-jdk11","7.16.0-jdk11","8.9-ubuntu-jdk11","7.16.0","8.9-jdk11","8.9.9-ubuntu-jdk11","8.9.9-jdk11","7.6.7-ubuntu-jdk11","7.6.7-jdk11","7.6.7","7.6.11-ubuntu-jdk11","7.6.11-jdk11","7.6.11","7.17-ubuntu-jdk11","7.17-jdk11","7.17.21-ubuntu-jdk11","7.17.21-jdk11","7.17.21","7.17","8.15.2-ubuntu-jdk11","8.15.2-jdk11","8.12.2-ubuntu-jdk11","8.12.2-jdk11","7.19.4-ubuntu-jdk11","7.19.4-jdk11","7.19.4","7.16.1-ubuntu-jdk11","7.16.1-jdk11","7.16.1","7.6.8-ubuntu-jdk11","7.6.8-jdk11","7.6.8","7.6.12-ubuntu-jdk11","7.6.12-jdk11","7.6.12","8.14.0-eap01","8.14.0-eap01-ubuntu-jdk11","8.14.0-eap01-jdk11","7.4-ubuntu-jdk11","7.4-jdk11","7.4.1-ubuntu-jdk11","7.4.1-jdk11","7.4.1","7.4.0-ubuntu-jdk11","7.4.0-jdk11","7.4.0","7.3-ubuntu-jdk11","7.3-jdk11","7.3.2-ubuntu-jdk11","7.3.2-jdk11","7.3.2","7.3","7.4.2-ubuntu-jdk11","7.4.2-jdk11","7.4.2","7.4","7.3.1-ubuntu-jdk11","7.3.1-jdk11","7.3.1","7.3.0-ubuntu-jdk11","7.3.0-jdk11","7.3.0","7.2.5-ubuntu-jdk11","7.2.5-jdk11","7.2.5","7.2.4-ubuntu-jdk11","7.2.4-jdk11","7.2.4","7.2.3-ubuntu-jdk11","7.2.3-jdk11","7.2.3","7.2.2-ubuntu-jdk11","7.2.2-jdk11","7.2.2","7.2.1-ubuntu-jdk11","7.2.1-jdk11","7.2.1","7.2.0-ubuntu-jdk11","7.2.0-jdk11","7.2.0","7.1-ubuntu-jdk11","7.1-jdk11","7.1.4-ubuntu-jdk11","7.1.4-jdk11","7.1.4","7.1.3-ubuntu-jdk11","7.1.3-jdk11","7.1.3","7.1.2-ubuntu-jdk11","7.1.2-jdk11","7.1.2","7.1.1-ubuntu-jdk11","7.1.1-jdk11","7.1.1","7.1.0-ubuntu-jdk11","7.1.0-jdk11","7.1.0","7.1","7.2-ubuntu-jdk11","7.2-jdk11","7.2.6-ubuntu-jdk11","7.2.6-jdk11","7.2.6","7.2","eap-ubuntu-jdk11","eap-jdk11","eap","8.0.0-eap05-ubuntu-jdk11","8.0.0-eap05-jdk11","8.0.0-eap05","7.0-jdk11","7.0-ubuntu-jdk11","7.0.5-ubuntu-jdk11","7.0.5-jdk11","7.0.5","7.0","6.10.17-ubuntu-jdk11","6.10.17","6.10.17-jdk11","6.10","6","6-ubuntu-jdk11","6-jdk11","6.10-ubuntu-jdk11","6.10-jdk11","6.8.2-jdk11","6.10.11-jdk11","6.8.2","6.10.11","6.8.2-ubuntu-jdk11","6.10.11-ubuntu-jdk11","7.0.0-jdk11","7.0.0-ubuntu-jdk11","7.0.0","6.8.3","6.7.1","6.7.1-ubuntu-jdk11","6.10.12-jdk11","6.8.3-ubuntu-jdk11","6.7.1-jdk11","6.10.12","6.8.3-jdk11","6.10.12-ubuntu-jdk11","7.0.1-ubuntu-jdk11","7.0.1-jdk11","7.0.1","6.7.2-jdk11","6.10.3","6.8.4-jdk11","6.7.2","6.10.3-jdk11","6.8","6.10.13-jdk11","6.7.2-ubuntu-jdk11","6.10.3-ubuntu-jdk11","6.8-ubuntu-jdk11","6.10.13-ubuntu-jdk11","6.8-jdk11","6.10.13","6.8.4-ubuntu-jdk11","7.0.2-ubuntu-jdk11","6.8.4","7.0.2","6.7.3-ubuntu-jdk11","7.0.2-jdk11","6.10.4-jdk11","6.7.3","6.10.4-ubuntu-jdk11","6.7.3-jdk11","6.10.14-ubuntu-jdk11","6.10.4","6.10.14","6.10.14-jdk11","7.0.3-jdk11","6.9.0-ubuntu-jdk11","7.0.3","6.7.4-ubuntu-jdk11","6.10.5-jdk11","6.9.0","7.0.3-ubuntu-jdk11","6.7.4","6.10.5-ubuntu-jdk11","6.9.0-jdk11","6.7.4-jdk11","6.10.15-jdk11","6.10.5","6.10.15","6.10.15-ubuntu-jdk11","7.0.4-jdk11","6.9.1-jdk11","6.7-jdk11","7.0.4-ubuntu-jdk11","6.10.7-jdk11","6.9.1","6.7","7.0.4","6.10.7","6.9.1-ubuntu-jdk11","6.7-ubuntu-jdk11","6.10.7-ubuntu-jdk11","6.7.5","6.10.16-jdk11","6.7.5-jdk11","6.7.5-ubuntu-jdk11","6.10.16","6.9.2-ubuntu-jdk11","6.10.16-ubuntu-jdk11","6.10.8","6.9.2-jdk11","6.10.8-ubuntu-jdk11","6.9.2","6.10.8-jdk11","6.9.3-ubuntu-jdk11","6.10.9","6.8.0-jdk11","6.9-jdk11","6.10.9-jdk11","6.8.0-ubuntu-jdk11","6.9.3","6.10.9-ubuntu-jdk11","6.8.0","6.9.3-jdk11","6.9","6.9-ubuntu-jdk11","6.10.2","6.7.0-jdk11","6.8.1-jdk11","6.10.2-jdk11","6.7.0-ubuntu-jdk11","6.8.1","6.10.2-ubuntu-jdk11","6.7.0","6.8.1-ubuntu-jdk11","6.10.0-jdk11","6.10.0-ubuntu-jdk11","6.10.0","6.10.1-jdk11","6.10.1-ubuntu-jdk11","6.10.1","6.10.10-jdk11","6.10.10","6.10.10-ubuntu-jdk11","7.14-ubuntu","7.14-jdk8","7.14.1-ubuntu","7.14-ubuntu-jdk8","7.14.1-jdk8","7.14.1-ubuntu-jdk8","7.11.2-jdk8","7.11-ubuntu","7.11.2-ubuntu","7.11-ubuntu-jdk8","7.11-jdk8","7.11.2-ubuntu-jdk8","7.15.0-jdk8","7.1.2-ubuntu","7.15.0-ubuntu","7.1.2-jdk8","7.15.0-ubuntu-jdk8","7.1.2-ubuntu-jdk8","7.6.4-ubuntu","6.7-jdk8","7.2.2-jdk8","7.6.4-jdk8","7.12.0-jdk8","6.7.5-ubuntu","7.5.1-ubuntu","7.6.4-ubuntu-jdk8","6.7.5-ubuntu-jdk8","7.2.2-ubuntu-jdk8","6.9.0-ubuntu","7.15-ubuntu-jdk8","7.12.0-ubuntu","7.5.1-jdk8","7.1.3-jdk8","7.2.2-ubuntu","6.9.0-jdk8","6.7-ubuntu","7.15.1-ubuntu","7.12.0-ubuntu-jdk8","7.5.1-ubuntu-jdk8","6.9.0-ubuntu-jdk8","6.7.5-jdk8","7.15-ubuntu","7.0.2-ubuntu-jdk8","7.1.3-ubuntu-jdk8","6.7-ubuntu-jdk8","7.15-jdk8","7.0.2-jdk8","7.1.3-ubuntu","7.0.2-ubuntu","7.15.1-jdk8","7.15.1-ubuntu-jdk8","7.2.3-jdk8","7.12.1-ubuntu","7.5.2-ubuntu-jdk8","7.6.5-jdk8","7.2.3-ubuntu","6.9.1-ubuntu","7.5-ubuntu-jdk8","7.6.5-ubuntu-jdk8","7.12.1-jdk8","6.9.1-ubuntu-jdk8","7.1.4-jdk8","7.5-jdk8","7.2.3-ubuntu-jdk8","7.12-jdk8","7.1.4-ubuntu","7.5.2-ubuntu","7.6.5-ubuntu","6.9.1-jdk8","7.0.3-ubuntu-jdk8","7.12-ubuntu-jdk8","6.10.2-jdk8","6.8.0-jdk8","7.12-ubuntu","7.1-ubuntu","7.5.2-jdk8","6.8.0-ubuntu-jdk8","6.10.9-ubuntu-jdk8","7.0.3-jdk8","6.10.2-ubuntu","7.12.1-ubuntu-jdk8","7.1-ubuntu-jdk8","7.5-ubuntu","6.10.9-jdk8","7.0.3-ubuntu","6.10.2-ubuntu-jdk8","7.1.4-ubuntu-jdk8","6.8.0-ubuntu","7.2.4-ubuntu","7.16.0-ubuntu","6.10.9-ubuntu","7.6.6-ubuntu","7.16-jdk8","6.9.2-jdk8","7.1-jdk8","7.16.0-jdk8","7.2.4-ubuntu-jdk8","7.6.6-ubuntu-jdk8","6.9.2-ubuntu-jdk8","7.2.4-jdk8","7.0.4-jdk8","7.6.6-jdk8","6.10.3-ubuntu","6.9.2-ubuntu","7.16.0-ubuntu-jdk8","6.8.1-ubuntu","6.10.3-ubuntu-jdk8","6.7.0-jdk8","7.0.4-ubuntu","6.8.1-ubuntu-jdk8","6.7.0-ubuntu-jdk8","7-ubuntu-jdk8","7.0.4-ubuntu-jdk8","6.10.3-jdk8","6.8.1-jdk8","7-jdk8","7.13.0-jdk8","6.7.0-ubuntu","ubuntu","7.2.5-jdk8","7.6.0-jdk8","7.13.0-ubuntu-jdk8","7.6.7-jdk8","6.9-ubuntu","7.6.0-ubuntu","7.2.5-ubuntu-jdk8","6.10.11-jdk8","7.13.0-ubuntu","7.10.0-ubuntu-jdk8","6.9-jdk8","jdk8","7.10.0-jdk8","6.9.3-ubuntu-jdk8","7.6.7-ubuntu","7.0.5-ubuntu","6.10.4-ubuntu-jdk8","6.8.2-ubuntu-jdk8","ubuntu-jdk8","7.2.5-ubuntu","7.6.0-ubuntu-jdk8","7.10.0-ubuntu","6.9.3-ubuntu","7.6.7-ubuntu-jdk8","6.10.4-ubuntu","6.8.2-ubuntu","7.0-ubuntu","7.16-ubuntu","6.10.4-jdk8","7.0-ubuntu-jdk8","6.7.1-ubuntu-jdk8","6.8.2-jdk8","7.0-jdk8","6.7.1-jdk8","7-ubuntu","6.9-ubuntu-jdk8","6.7.1-ubuntu","6.10.12-jdk8","7.16-ubuntu-jdk8","6.9.3-jdk8","7.13.1-ubuntu-jdk8","6.10.12-ubuntu","7.2.6-jdk8","7.6.1-jdk8","7.10-ubuntu-jdk8","7.6.8-jdk8","7.0.5-jdk8","6.10.12-ubuntu-jdk8","7.2-ubuntu-jdk8","7.10-ubuntu","7.6.8-ubuntu","7.13.1-ubuntu","7.0.5-ubuntu-jdk8","7.2-ubuntu","7.6.1-ubuntu","7.10.1-ubuntu-jdk8","6.8.3-jdk8","7.13-jdk8","6.10.5-ubuntu","7.2.6-ubuntu","7.6.1-ubuntu-jdk8","7.10.1-ubuntu","6.8.3-ubuntu-jdk8","6.7.2-ubuntu-jdk8","7.6.8-ubuntu-jdk8","7.13-ubuntu","7.2-jdk8","6.8.3-ubuntu","6.7.2-ubuntu","7.4.2-jdk8","6.10.5-jdk8","7.13-ubuntu-jdk8","7.2.6-ubuntu-jdk8","7.10-jdk8","7.4-ubuntu-jdk8","6.10.5-ubuntu-jdk8","7.13.1-jdk8","6-ubuntu","6.7.2-jdk8","7.10.1-jdk8","7.4-jdk8","7.4.2-ubuntu","7.6.2-jdk8","7.6-jdk8","7.0.0-ubuntu-jdk8","7.2.0-ubuntu","7.6.2-ubuntu-jdk8","7.0.0-ubuntu","6.10-ubuntu-jdk8","7.6.2-ubuntu","7.1.0-ubuntu","7.2.0-jdk8","6.10.7-jdk8","7.6.9-jdk8","7.0.0-jdk8","6.7.3-jdk8","6.10-ubuntu","7.1.0-ubuntu-jdk8","7.6-ubuntu-jdk8","7.2.0-ubuntu-jdk8","6.7.3-ubuntu-jdk8","6.10-jdk8","6.8-ubuntu-jdk8","7.1.0-jdk8","6.10.7-ubuntu","7.6-ubuntu","6.7.3-ubuntu","6-jdk8","6.8.4-jdk8","6.10.7-ubuntu-jdk8","6.10.13-jdk8","6.8-ubuntu","7.9.1-ubuntu-jdk8","7.6.9-ubuntu","6.10.13-ubuntu-jdk8","6.8.4-ubuntu","7.6.9-ubuntu-jdk8","6.10.13-ubuntu","6.8-jdk8","7.3.0-ubuntu-jdk8","7.6.3-jdk8","7.2.1-ubuntu","7.0.1-ubuntu-jdk8","7.5.0-ubuntu","6-ubuntu-jdk8","6.8.4-ubuntu-jdk8","7.14.0-ubuntu","7.11.1-ubuntu-jdk8","7.6.3-ubuntu-jdk8","7.3.0-ubuntu","7.0.1-jdk8","7.2.1-ubuntu-jdk8","7.5.0-jdk8","6.7.4-ubuntu","7.14.0-jdk8","7.11.1-jdk8","7.6.3-ubuntu","7.0.1-ubuntu","7.5.0-ubuntu-jdk8","7.1.1-ubuntu-jdk8","6.10.8-jdk8","7.14.0-ubuntu-jdk8","7.11.1-ubuntu","7.3.0-jdk8","7.2.1-jdk8","7.1.1-ubuntu","6.7.4-jdk8","6.10.8-ubuntu-jdk8","7.1.1-jdk8","6.7.4-ubuntu-jdk8","6.10.8-ubuntu","7.7.0-ubuntu-jdk8","7.7.0-ubuntu","7.7.0-jdk8","7.7.1-jdk8","7.7.1-ubuntu","7.7-jdk8","7.7-ubuntu","7.7-ubuntu-jdk8","6.10.0-ubuntu","7.7.1-ubuntu-jdk8","6.10.0-jdk8","6.10.0-ubuntu-jdk8","6.10.1-jdk8","6.10.1-ubuntu","7.8.0-ubuntu","6.10.1-ubuntu-jdk8","7.8.0-ubuntu-jdk8","7.8.0-jdk8","6.10.10-ubuntu","6.10.10-ubuntu-jdk8","7.8-ubuntu","6.10.10-jdk8","7.8.1-ubuntu","7.8.1-ubuntu-jdk8","7.8-ubuntu-jdk8","7.8-jdk8","6.10.11-ubuntu-jdk8","7.8.1-jdk8","6.10.11-ubuntu","7.9.0-jdk8","7.9.0-ubuntu","7.9.0-ubuntu-jdk8","7.9.1-jdk8","7.9-ubuntu-jdk8","7.9.1-ubuntu","7.9-ubuntu","7.9-jdk8","7.3.1-ubuntu-jdk8","7.3.1-ubuntu","7.3.1-jdk8","7.3.2-jdk8","7.3.2-ubuntu-jdk8","7.3-ubuntu","7.3-ubuntu-jdk8","7.3-jdk8","7.3.2-ubuntu","7.4.0-ubuntu-jdk8","7.4.0-ubuntu","7.4.0-jdk8","7.4.1-ubuntu-jdk8","7.4.1-ubuntu","7.4.1-jdk8","7.4.2-ubuntu-jdk8","7.4-ubuntu","6.5.0-ubuntu","6.5.0","6.5.0-jdk8","6.5.0-ubuntu-jdk8","6.5.1","6.6.3","6.5.1-ubuntu","6.6.3-ubuntu","6.5.1-ubuntu-jdk8","6.6.3-ubuntu-jdk8","6.5.1-jdk8","6.6.3-jdk8","6.5.2-jdk8","6.6.4-ubuntu","6.5.2-ubuntu-jdk8","6.6-ubuntu-jdk8","6.5.2-ubuntu","6.6","6.5.2","6.6.4-jdk8","6.6.4","6.6.4-ubuntu-jdk8","6.6-jdk8","6.5.1-ubuntu-jdk11","6.6.3-jdk11","6.6-ubuntu","6.5.1-jdk11","6.5-ubuntu","6.6.3-ubuntu-jdk11","6.5.3-jdk8","6.5.3-ubuntu-jdk8","6.5-ubuntu-jdk8","6.5","6.6-ubuntu-jdk11","6.5.2-jdk11","6.5.3-ubuntu","6.5.2-ubuntu-jdk11","6.6.4-jdk11","6.5.3","6.6.4-ubuntu-jdk11","6.5-jdk8","6.6-jdk11","6.5-jdk11","6.5.3-ubuntu-jdk11","6.5-ubuntu-jdk11","6.5.3-jdk11","6.6.0-ubuntu","6.6.0-jdk8","6.6.0-ubuntu-jdk8","6.6.0","6.6.0-jdk11","6.6.0-ubuntu-jdk11","6.6.1-jdk8","6.6.1","6.6.1-ubuntu","6.6.1-ubuntu-jdk8","6.6.1-jdk11","6.6.1-ubuntu-jdk11","6.6.2","6.6.2-ubuntu-jdk8","6.5.0-jdk11","6.6.2-ubuntu-jdk11","6.6.2-jdk8","6.5.0-ubuntu-jdk11","6.6.2-jdk11","6.6.2-ubuntu","6.4.0-ubuntu","6.4.0","6.4.0-ubuntu-jdk8","6.4.0-jdk8","6.0-ubuntu-jdk8","6.4.1-jdk8","6.0.11","6.4.1-ubuntu-jdk8","6.0-jdk8","6.4.1","6.0-ubuntu","6.4.1-ubuntu","6.0.11-ubuntu-jdk8","6.0","6.0.11-jdk8","6.0.11-ubuntu","6.4.2-jdk8","6.4.2-ubuntu-jdk8","6.4.2-ubuntu","6.4.2","6.0.2","6.4.3-jdk8","6.0.2-ubuntu","6.4.3-ubuntu","6.0.2-jdk8","6.4.3","6.0.2-ubuntu-jdk8","6.4.3-ubuntu-jdk8","6.0.3-ubuntu-jdk8","6.4.4-ubuntu","6.0.3","6.4.4-jdk8","6.0.3-jdk8","6.4-jdk8","6.0.3-ubuntu","6.4-ubuntu","6.4","6.4.4-ubuntu-jdk8","6.4-ubuntu-jdk8","6.4.4","6.0.4-jdk8","6.0.4","6.0.4-ubuntu","6.0.4-ubuntu-jdk8","6.0.5-jdk8","6.0.5-ubuntu-jdk8","6.0.5-ubuntu","6.0.5","6.0.6-jdk8","6.0.6-ubuntu-jdk8","6.0.6","6.0.6-ubuntu","6.0.7-ubuntu-jdk8","6.0.7","6.0.7-ubuntu","6.0.7-jdk8","6.0.9-ubuntu","6.0.9","6.0.9-jdk8","6.0.9-ubuntu-jdk8","6.1.0-ubuntu-jdk8","6.1.0-ubuntu","6.1.0","6.1.0-jdk8","6.2.6","6.2.6-ubuntu-jdk8","6.2.6-jdk8","6.2.6-ubuntu","6.2","6.2.7-ubuntu-jdk8","6.2-ubuntu","6.2.7-jdk8","6.2-ubuntu-jdk8","6.2-jdk8","6.2.7-ubuntu","6.2.7","6.3.0-jdk8","6.3.0-ubuntu-jdk8","6.3.0","6.3.0-ubuntu","6.3.1","6.3.1-jdk8","6.3.1-ubuntu-jdk8","6.3.1-ubuntu","6.3.2-ubuntu","6.3.2-jdk8","6.3.2-ubuntu-jdk8","6.3.2","6.3.3","6.3.3-jdk8","6.3.3-ubuntu-jdk8","6.3.3-ubuntu","6.3.4-ubuntu-jdk8","6.3.4-ubuntu","6.3.4","6.3.4-jdk8","6.3.5","6.3.5-ubuntu-jdk8","6.3.5-jdk8","6.3.5-ubuntu","6.3-ubuntu","6.3.6-ubuntu","6.3.6-ubuntu-jdk8","6.3.6","6.3","6.3.6-jdk8","6.3-ubuntu-jdk8","6.3-jdk8","6.1.1-ubuntu","6.1.1","6.1.1-jdk8","6.1.1-ubuntu-jdk8","6.1.2-jdk8","6.1.2","6.1.2-ubuntu","6.1.2-ubuntu-jdk8","6.1.3-ubuntu-jdk8","6.1.3","6.4.0-ubuntu-jdk11","6.2.6-jdk11","6.1.3-jdk8","6.4.0-jdk11","6.2.6-ubuntu-jdk11","6.1.3-ubuntu","6.0-jdk11","6.1.1-ubuntu-jdk11","6.4.1-jdk11","6.0.11-jdk11","6.1.4","6.2.7-ubuntu-jdk11","6.4.1-ubuntu-jdk11","6.0-ubuntu-jdk11","6.1.4-ubuntu-jdk8","6.1.1-jdk11","6.2-ubuntu-jdk11","6.0.11-ubuntu-jdk11","6.1.4-jdk8","6.2-jdk11","6.1.4-ubuntu","6.2.7-jdk11","6.4.2-ubuntu-jdk11","6.1.2-jdk11","6.4.2-jdk11","6.1.2-ubuntu-jdk11","6.2.0-ubuntu-jdk8","6.1.5-jdk8","6.2.0-jdk8","6.1.5-ubuntu","6.2.0-ubuntu","6.1.5","6.2.0","6.0.2-jdk11","6.3.0-ubuntu-jdk11","6.1.5-ubuntu-jdk8","6.4.3-jdk11","6.1.3-ubuntu-jdk11","6.0.2-ubuntu-jdk11","6.3.0-jdk11","6.1.3-jdk11","6.4.3-ubuntu-jdk11","6.2.1","6.1.6-ubuntu-jdk8","6.2.1-ubuntu-jdk8","6.0.3-ubuntu-jdk11","6.1.6-ubuntu","6.3.1-jdk11","6.2.1-ubuntu","6.1.4-ubuntu-jdk11","6.0.3-jdk11","6.1.6","6.3.1-ubuntu-jdk11","6.4.4-ubuntu-jdk11","6.2.1-jdk8","6.1.4-jdk11","6.1.6-jdk8","6.4.4-jdk11","6.4-ubuntu-jdk11","6.4-jdk11","6.0.4-ubuntu-jdk11","6.3.2-ubuntu-jdk11","6.2.0-jdk11","6.1.5-jdk11","6.2.2-ubuntu","6.0.4-jdk11","6.1.7","6.3.2-jdk11","6.2.0-ubuntu-jdk11","6.1.5-ubuntu-jdk11","6.2.2-ubuntu-jdk8","6.1.7-ubuntu-jdk8","6.2.2","6.1.7-ubuntu","6.2.2-jdk8","6.1.7-jdk8","6.0.5-jdk11","6.3.3-ubuntu-jdk11","6.2.1-jdk11","6.1.6-ubuntu-jdk11","6.0.5-ubuntu-jdk11","6.3.3-jdk11","6.2.1-ubuntu-jdk11","6.1.6-jdk11","6.2.3-ubuntu","6.1.8-jdk8","6.0.0-ubuntu","6.2.3-ubuntu-jdk8","6.1.8-ubuntu-jdk8","6.0.0-ubuntu-jdk8","6.2.3","6.1.8-ubuntu","6.0.0-jdk8","6.0.6-ubuntu-jdk11","6.3.4-ubuntu-jdk11","6.2.2-ubuntu-jdk11","6.1.8","6.2.3-jdk8","6.0.0","6.1.7-jdk11","6.0.6-jdk11","6.3.4-jdk11","6.2.2-jdk11","6.1.7-ubuntu-jdk11","6.2.3-ubuntu-jdk11","6.3.5-ubuntu-jdk11","6.0.7-ubuntu-jdk11","6.0.0-ubuntu-jdk11","6.1.8-jdk11","6.2.3-jdk11","6.0.7-jdk11","6.3.5-jdk11","6.0.0-jdk11","6.1.8-ubuntu-jdk11","6.1.9-ubuntu","6.2.4-jdk8","6.0.1-ubuntu-jdk8","6.1-ubuntu-jdk8","6.2.4-ubuntu-jdk8","6.0.1-jdk8","6.1.9-jdk8","6.2.4","6.0.1-ubuntu","6.1-ubuntu","6.2.4-ubuntu","6.0.1","6.0.9-jdk11","6.2.4-ubuntu-jdk11","6.1-jdk8","6.3-jdk11","6.0.1-ubuntu-jdk11","6.1.9-ubuntu-jdk11","6.0.9-ubuntu-jdk11","6.1.9-ubuntu-jdk8","6.2.4-jdk11","6.3.6-jdk11","6.0.1-jdk11","6.1-jdk11","6.1","6.3-ubuntu-jdk11","6.1-ubuntu-jdk11","6.1.9","6.3.6-ubuntu-jdk11","6.1.9-jdk11","6.2.5","6.0.10-ubuntu-jdk8","6.2.5-ubuntu","6.0.10-jdk8","6.1.0-ubuntu-jdk11","6.2.5-jdk11","6.2.5-jdk8","6.0.10-jdk11","6.0.10-ubuntu","6.2.5-ubuntu-jdk8","6.2.5-ubuntu-jdk11","6.1.0-jdk11","6.0.10-ubuntu-jdk11","6.0.10","7-eap","5.16.11-alpine","5-alpine","5.16.11","5.16","5","5.16-alpine","5.16.10","5.16.10-alpine","5.16.9","5.16.9-alpine","5.16.8","5.16.8-alpine","5.16.7-alpine","5.16.7","5.16.6-alpine","5.16.6","5.16.5-alpine","5.16.5","5.9.2-alpine","5.9.2","5.9-alpine","5.9","5.9.1-alpine","5.9.1","5.9.0-alpine","5.9.0","5.8.3-alpine","5.8.3","5.8.2-alpine","5.8.2","5.8.1-alpine","5.8.1","5.8.0-alpine","5.8.0","5.7.4-alpine","5.7.4","5.7-alpine","5.7","5.7.3-alpine","5.7.3","5.7.2-alpine","5.7.2","5.7.1-alpine","5.7.1","5.7.0-alpine","5.7.0","5.6.6-alpine","5.6.6","5.6-alpine","5.6","5.6.5-alpine","5.6.5","5.6.4-alpine","5.6.4","5.6.3-alpine","5.6.3","5.6.2-alpine","5.6.2","5.6.1-alpine","5.6.1","5.6.0-alpine","5.6.0","5.5.9-alpine","5.5.9","5.5-alpine","5.5","5.5.8-alpine","5.5.8","5.5.7-alpine","5.5.7","5.5.6-alpine","5.5.6","5.5.5-alpine","5.5.5","5.5.4-alpine","5.5.4","5.5.3-alpine","5.5.3","5.5.2-alpine","5.5.2","5.5.1-alpine","5.5.1","5.5.0-alpine","5.5.0","5.4.9-alpine","5.4.9","5.4-alpine","5.4","5.4.8-alpine","5.4.8","5.4.7-alpine","5.4.7","5.4.6-alpine","5.4.6","5.4.4-alpine","5.4.4","5.4.3-alpine","5.4.3","5.4.2-alpine","5.4.2","5.4.1-alpine","5.4.1","5.4.0-alpine","5.4.0","5.3.7-alpine","5.3.7","5.3-alpine","5.3","5.3.6-alpine","5.3.6","5.3.5-alpine","5.3.5","5.3.4-alpine","5.3.4","5.3.3-alpine","5.3.3","5.3.2-alpine","5.3.2","5.3.1-alpine","5.3.1","5.3.0-alpine","5.3.0","5.2.8-alpine","5.2.8","5.2-alpine","5.2","5.2.7-alpine","5.2.7","5.2.6-alpine","5.2.6","5.2.5-alpine","5.2.5","5.2.4-alpine","5.2.4","5.2.3-alpine","5.2.3","5.2.2-alpine","5.2.2","5.2.1-alpine","5.2.1","5.2.0-alpine","5.2.0","5.16.4-alpine","5.16.4","5.16.3-alpine","5.16.3","5.16.2-alpine","5.16.2","5.16.1-alpine","5.16.1","5.16.0-alpine","5.16.0","5.15.3-alpine","5.15.3","5.15-alpine","5.15","5.15.2-alpine","5.15.2","5.15.1-alpine","5.15.1","5.15.0-alpine","5.15.0","5.14.4-alpine","5.14.4","5.14-alpine","5.14","5.14.3-alpine","5.14.3","5.14.2-alpine","5.14.2","5.14.1-alpine","5.14.1","5.14.0-alpine","5.14.0","5.13.6-alpine","5.13.6","5.13-alpine","5.13","5.13.5-alpine","5.13.5","5.13.4-alpine","5.13.4","5.13.3-alpine","5.13.3","5.13.1-alpine","5.13.1","5.13.0-alpine","5.13.0","5.12.4-alpine","5.12.4","5.12-alpine","5.12","5.12.3-alpine","5.12.3","5.12.2-alpine","5.12.2","5.12.1-alpine","5.12.1","5.12.0-alpine","5.12.0","5.11.4-alpine","5.11.4","5.11-alpine","5.11","5.11.3-alpine","5.11.3","5.11.2-alpine","5.11.2","5.11.1-alpine","5.11.1","5.10.4-alpine","5.10.4","5.10-alpine","5.10","5.10.3-alpine","5.10.3","5.10.2-alpine","5.10.2","5.10.1-alpine","5.10.1","5.10.0-alpine","5.10.0","5.1.9-alpine","5.1.9","5.1-alpine","5.1","5.1.8-alpine","5.1.8","5.1.7-alpine","5.1.7","5.1.6-alpine","5.1.6","5.1.5-alpine","5.1.5","5.1.4-alpine","5.1.4","5.1.3-alpine","5.1.3","5.1.2-alpine","5.1.2","5.1.1-alpine","5.1.1","5.1.0-alpine","5.1.0","5.0.9-alpine","5.0.9","5.0.8-alpine","5.0.8","5.0.7-alpine","5.0.7","5.0.6-alpine","5.0.6","5.0.5-alpine","5.0.5","5.0.4-alpine","5.0.4","5.0.2-alpine","5.0.2","5.0.10-alpine","5.0.10","5.0-alpine","5.0","5.0.1-alpine","5.0.1","5.0.0-alpine","5.0.0","4.14.5-alpine","4.14.5","4.1.6-alpine","4.1.6","4.1-alpine","4.1","4.11.2-alpine","4.11.2","4.11-alpine","4.11","5.8.4","5.8","4.14","4.13","4.12","4.10","4.9","4.8","4.6","4.7","4.4","4.5","4.3","4.2","4.0"];!function(u){u.JIRA="jira",u.CONFLUENCE="confluence",u.BITBUCKET="bitbucket",u.BAMBOO="bamboo"}($||($={}));const{P:q,activeProfiles:L}=l(r(process.argv)).parseSync(),B=q||L||void 0;class AMPS{static maven;static stop(){AMPS.maven&&S.maven.kill(0)}static async build(u){return new Promise(((t,d)=>{if(AMPS.maven){AMPS.maven.kill(0)||d(new Error("Failed to terminate existing Maven process"))}AMPS.maven=j("mvn",["package",...u],{cwd:s(),stdio:"inherit"}),AMPS.maven.on("exit",(u=>{AMPS.maven=null,0===u||130===u?t():d(new Error(`Maven exited with code ${u}`))}))}))}static isAtlassianPlugin=()=>{try{return AMPS.getNodes("//*[local-name()='packaging']").some((u=>"atlassian-plugin"===u.textContent))}catch(u){return!1}};static getApplicationVersion(){const u=B?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${B}']/..//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']`,!0):AMPS.getNodes("//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']",!0);if(u){const t=u.parentNode;if(t){const{plugin:u}=AMPS.toObject(t),d=u?.configuration?.productVersion;return d?this.doPropertyReplacement(d):void 0}}}static getApplication(){const u=AMPS.getApplications();if(1===u.length)return u[0];if(B){const u=AMPS.getApplications(B);if(1===u.length)return u[0]}return null}static getApplications(u){const t=new Set;return(u?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${u}']/..//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']`):AMPS.getNodes("//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']")).forEach((u=>{const d=u.parentNode;if(d){const{plugin:u}=AMPS.toObject(d);u?.artifactId?.includes($.JIRA)?t.add($.JIRA):u?.artifactId?.includes($.CONFLUENCE)?t.add($.CONFLUENCE):u?.artifactId?.includes($.BAMBOO)?t.add($.BAMBOO):u?.artifactId?.includes($.BITBUCKET)&&t.add($.BITBUCKET)}})),Array.from(t)}static doPropertyReplacement(u){let t=u;const d=B?AMPS.getProperties(B):{};Object.entries(d).forEach((([u,d])=>{t=t.replaceAll(`\${${u}}`,d)}));const n=AMPS.getProperties();return Object.entries(n).forEach((([u,d])=>{t=t.replaceAll(`\${${u}}`,d)})),t}static getProperties(u){const t={};return(u?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${u}']/..//*[local-name()='properties']`):AMPS.getNodes("//*[local-name()='properties']")).forEach((u=>{const{properties:d}=AMPS.toObject(u);Object.entries(d).forEach((([u,d])=>t[u]=d))})),t}static getNodes(u,t){if(b("./pom.xml")){const d=a("./pom.xml","utf8"),k=(new n).parseFromString(d,"text/xml"),j=t?o.select(u,k,!0):o.select(u,k,!1);return Array.isArray(j)||t?j:[]}return[]}static toObject(u){try{return(new e).parse((new k).serializeToString(u))}catch(u){return null}}}const U="AAABmg0ODAoPeNp9Ul1v0zAUfc+vsMRbJadJtjGpUiS2JJRONOlaB4SAB9e9W0xTu7JvCv33eImDOoR4vefe4/PhN59hR5bckPiWRNezKJ5FCZkvGUmiJA4yrZALLPkBUrHXotEnu5eBRW6b8KMUoCyw8xH6BVZs2KKce3TJpUJQXAkofh2lOeccIV1dfRhJC7fRXrJuwJzALPL0/qF+pI9XGaPz+uGGspvbkdRx8Awcr0nRdOCnlXnmSlqOUqv0DltureTKg6vOiIZb6J9PoviaRm9pHHs0M9Cf/Rv1Dv/SP5lMyorR99WartZVXmdsUZW03hQOSHtCF+n2TLAB4hlIoYTegSFHo3+AQPK1QTx+m02nzzrko+JQ6MO0HS4oDBffQ5JrojSSnbRo5LZDcMzSEtREdBb1AYwNRzsXff0JgjCwLjG/4mB5giE+JzhbF3esyOn9lxf1F2145a6OWu2V/qmC/2dVdoctmOqptk5PGid+XJx42w3NPPHWQuD9fXJbL8PktfLhU2Av+N2rYMY6uUEFpncY/AYCgfFAMCwCFHzkBlkGH/vRdTeeBSfUMzUDb4W2AhQyM893WPg2Q8oQAYRdBSyKeVUdog==X02jr",toAbsolutePath=u=>{const[,t]=process.argv,d=p(t),n=d.substring(0,d.indexOf("dcdx")+4);return c(n,u.replaceAll("../",""))},_={name:"shared",driver:"bridge"};let N=class Base extends v{options;sequelize=null;constructor(u){super(),this.options=u}async run(u,t){try{if(!this.sequelize)throw new Error("Database connection does not exist");await this.sequelize.query(u,{logging:t})}catch(t){console.error("An error occurred while trying to run the following SQL query:",u,t),d()}return null}async start(u=this.options.clean){console.log(`Starting instance of ${this.name} ⏳`),u&&await this.down(),await this.up(),this.emit(`${this.name}:up`);if(await this.waitUntilReady()){if(console.log(`Database is ready and accepting connections on localhost:${this.options.port} 🗄️`),await this.onDatabaseReady(),this.emit("db:ready"),this.options.logging){const u=await this.getServiceState();u&&await this.showDockerLogs(u.name)}}else console.log(`Failed to start database ${this.name} ⛔`),d(0)}async stop(u=this.options.prune){if(u)await this.down();else{const u=f(this.getDockerComposeConfig());await m({cwd:s(),configAsString:u,log:!0})}this.emit("db:stopped")}async onDatabaseReady(){}getDockerComposeConfig(){return{version:"3.8",services:{db:this.getService()},networks:{shared:_}}}async up(){const u=f(this.getDockerComposeConfig());return P({cwd:s(),configAsString:u,log:!0})}async down(){const u=f(this.getDockerComposeConfig());return g({cwd:s(),configAsString:u,commandOptions:["-v","--remove-orphans","--rmi","local"],log:!0})}async waitUntilReady(){try{const u="mssql"===this.name?"master":this.options.database;return this.sequelize=new C(u,this.options.username,this.options.password,{host:"localhost",port:this.options.port,dialect:this.name.replace("postgresql","postgres"),retry:{max:30,match:[D,E,x,O,M],backoffBase:1e3,backoffExponent:1},logging:!1}),this.sequelize.authenticate().then((()=>!0)).catch((u=>(console.log(u),!1)))}catch(u){return!1}}async getServiceState(){const u=f(this.getDockerComposeConfig());return(await w({configAsString:u,log:!1,commandOptions:["--all"]})).data.services.find((u=>u.name.includes(this.name)))}async showDockerLogs(u){return new Promise(((t,d)=>{j("docker",["logs","-f","-n","5000",u],{cwd:s(),stdio:"inherit"}).on("exit",(u=>0===u?t():d(new Error(`Docker exited with code ${u}`))))}))}};const I={port:1433,database:"dcdx",username:"sa",password:"DataCenterDX!",edition:"Developer",version:"2022"};class MSSQL extends N{name="mssql";driver="com.microsoft.sqlserver.jdbc.SQLServerDriver";options=I;version="2022";get url(){return`jdbc:sqlserver://db:${this.options.port};databaseName=${this.options.database};trustServerCertificate=true`}constructor(u=I){super({...I,...u})}async onDatabaseReady(){await this.run(`CREATE DATABASE ${this.options.database}`),await this.run(`ALTER DATABASE ${this.options.database} COLLATE SQL_Latin1_General_CP1_CS_AS`),await this.run(`ALTER DATABASE ${this.options.database} SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;`)}getService=()=>({image:`mcr.microsoft.com/mssql/server:${this.version}-latest`,ports:[`${this.options.port||1433}:1433`],environment:{ACCEPT_EULA:"y",MSSQL_SA_PASSWORD:this.options.password||"dcdx",MSSQL_PID:this.options.edition},networks:{shared:{aliases:["db","database"]}}})}const J={port:3306,database:"dcdx",username:"dcdx",password:"dcdx",version:"8.0"};class MySQL extends N{name="mysql";driver="com.mysql.jdbc.Driver";options=J;version="8.0";get url(){return`jdbc:mysql://db:${this.options.port}/${this.options.database}?sessionVariables=transaction_isolation='READ-COMMITTED'`}constructor(u=J){super({...J,...u})}async onDatabaseReady(){await this.run(`ALTER DATABASE ${this.options.database} CHARACTER SET 'utf8mb4' COLLATE utf8mb4_bin`)}getService=()=>({image:`mysql:${this.version}`,ports:[`${this.options.port||3306}:3306`],environment:{MYSQL_ROOT_PASSWORD:this.options.password||"dcdx",MYSQL_USER:this.options.username||"dcdx",MYSQL_PASSWORD:this.options.password||"dcdx",MYSQL_DATABASE:this.options.database||"dcdx"},command:["--log_bin_trust_function_creators=1"],networks:{shared:{aliases:["db","database"]}}})}const Q={version:"15",database:"dcdx",port:5432,username:"dcdx",password:"dcdx"};class Postgres extends N{name="postgresql";driver="org.postgresql.Driver";options=Q;version="15";get url(){return`jdbc:postgresql://db:${this.options.port}/${this.options.database}`}constructor(u=Q){super({...Q,...u})}getService=()=>({image:`postgres:${this.version}`,ports:[`${this.options.port||5432}:5432`],environment:{POSTGRES_USER:this.options.username||"dcdx",POSTGRES_PASSWORD:this.options.password||"dcdx",POSTGRES_DB:this.options.database||"dcdx",POSTGRES_HOST_AUTH_METHOD:"md5",POSTGRES_INITDB_ARGS:"--encoding=UTF-8 --lc-collate=C --lc-ctype=C"},networks:{shared:{aliases:["db","database"]}}})}const F=c(y(),".dcdx");class Base extends v{options;constructor(u){super(),this.options=u}get baseUrl(){let u="http://localhost";return this.options.port&&(u+=`:${this.options.port}`),this.options.contextPath?`${u}/${this.options.contextPath}`:u}getDatabaseEngine(u){switch(u){case"postgresql":return new Postgres;case"mssql":return new MSSQL;case"mysql":return new MySQL}}async start(){this.options.clean&&await this.down(),await this.build(this.options.version),await this.database.start(this.options.clean),await this.up()}async stop(){if(await this.database.stop(this.options.prune),this.options.prune)await this.down();else{const u=f(this.getDockerComposeConfig());await m({cwd:s(),configAsString:u,log:!0})}this.emit(`${this.name}:stopped`)}async reset(){await this.database.stop(!0),await this.down()}async cp(u){const t=await this.getServiceState();if(t&&t.state.toLowerCase().startsWith("up")){const t=this.getDockerComposeConfig(),d=f(t);await S("cp",[u,`${this.name}:/opt/quickreload/`],{cwd:s(),configAsString:d,log:!1})}}async isApplicationReady(){try{const u=await h.get(`${this.baseUrl}/status`,{validateStatus:()=>!0}).catch((()=>null));if(u&&200===u.status){const{data:t}=u;if("FIRST_RUN"===t.state)return console.log(`The application ${this.name} is ready on ${this.baseUrl} 🎉`),!0}return!1}catch(u){return!1}}getDockerComposeConfig(){return{version:"3.8",services:{[this.name]:this.getService()},networks:{shared:_}}}async up(){const u=this.getDockerComposeConfig(),t=f(u);await A({cwd:s(),configAsString:t,log:!0}),this.emit(`${this.name}:up`);await this.waitUntilReady()?(this.emit(`${this.name}:ready`),await this.tailApplicationLogs()):console.log(`Failed to start ${this.name} ⛔`),d(0)}async down(){const u=f(this.getDockerComposeConfig());await g({cwd:s(),configAsString:u,commandOptions:["-v","--remove-orphans","--rmi","local"],log:!0})}async getServiceState(){const u=f(this.getDockerComposeConfig());return(await w({configAsString:u,log:!1,commandOptions:["--all"]})).data.services.find((u=>u.name.includes(this.name)))}async waitUntilReady(u=0){console.log(`Waiting for ${this.name} to become available... ${u}s`);const t=await this.getServiceState();return!!(t&&t.state.toLowerCase().startsWith("up")&&await this.isApplicationReady())||(u>=300?(console.error(`A timeout occurred while waiting for ${this.name} to become available ⛔`),t&&await this.showDockerLogs(t.name),!1):(await new Promise((u=>setTimeout(u,1e3))),this.waitUntilReady(u+1)))}getDockerRepositoryUrl(){return`https://bitbucket.org/atlassian-docker/docker-${"jira"===this.name?"atlassian-jira":"bamboo"===this.name?`${this.name}-server`:`atlassian-${this.name}-server`}.git`}async build(u){const t=this.getDockerRepositoryUrl(),d=c(F,this.name,"source");b(d)?await R({baseDir:d}).pull({"--recurse-submodule":null}):(i(c(F,this.name),{recursive:!0}),await R().clone(t,d,{"--recurse-submodule":null})),await new Promise(((t,n)=>{j("docker",["build","-t",`dcdx/${this.name}:${u}`,"--build-arg",`${this.name.toUpperCase()}_VERSION=${u}`,"."],{cwd:d,stdio:"inherit"}).on("exit",(u=>0===u?t():n(new Error(`Docker exited with code ${u}`))))}))}async tailApplicationLogs(){const u=await this.getServiceState();u&&u.state.toLowerCase().startsWith("up")&&await this.showApplicationLogs(u.name).catch((()=>null))}async showDockerLogs(u){return new Promise(((t,d)=>{j("docker",["logs","-f","-n","5000",u],{cwd:s(),stdio:"inherit"}).on("exit",(u=>0===u?t():d(new Error(`Docker exited with code ${u}`))))}))}async showApplicationLogs(u){return new Promise(((t,d)=>{j("docker",["exec","-i",u,"tail","-F","-n","5000",this.logFilePath],{cwd:s(),stdio:"inherit"}).on("exit",(u=>0===u?t():d(new Error(`Docker exited with code ${u}`))))}))}}class Bitbucket extends Base{name=$.BITBUCKET;database;logFilePath="/var/atlassian/application-data/bitbucket/log/atlassian-bitbucket.log";constructor(u){super(u),this.database=this.getDatabaseEngine(u.database)}getService(){const u=this.getVolumes(),t=this.getEnvironmentVariables();return{build:{context:toAbsolutePath("../../assets"),dockerfile_inline:`\nFROM dcdx/${this.name}:${this.options.version}\nCOPY ./quickreload-5.0.2.jar /var/atlassian/application-data/bitbucket/plugins/installed-plugins/quickreload-5.0.2.jar\nCOPY ./mysql-connector-j-8.3.0.jar /var/atlassian/application-data/bitbucket/lib/mysql-connector-j-8.3.0.jar\nRUN echo "/opt/quickreload" > /var/atlassian/application-data/bitbucket/quickreload.properties; mkdir -p /opt/quickreload; chown -R bitbucket:bitbucket /opt/quickreload;\n\nRUN mkdir -p /var/atlassian/application-data/bitbucket/shared; touch /var/atlassian/application-data/bitbucket/shared/bitbucket.properties; echo "setup.license=${this.options.license||U}" >> /var/atlassian/application-data/bitbucket/shared/bitbucket.properties;\n\nRUN chown -R bitbucket:bitbucket /var/atlassian/application-data/bitbucket`},ports:[`${this.options.port||80}:7990`,...this.options.debug?["5005:5005"]:[]],environment:Object.keys(t).length>0?t:void 0,volumes:u.length>0?u:void 0,networks:["shared"]}}getEnvironmentVariables(){return{...this.options.debug?{JVM_SUPPORT_RECOMMENDED_ARGS:this.getJVMArgs()}:"",JDBC_URL:this.database.url,JDBC_USER:this.database.options.username,JDBC_PASSWORD:this.database.options.password,JDBC_DRIVER:`${this.database.driver}`}}getJVMArgs(){const u=[];return this.options.debug&&(u.push("-Dupm.plugin.upload.enabled=true"),u.push("-Xdebug"),u.push("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005")),this.options.quickReload&&u.push("-Dquickreload.dirs=/opt/quickreload"),u.join(" ")}getVolumes(){return[...this.options.quickReload?[`${this.options.quickReload}:/opt/quickreload`]:""]}}const V=AMPS.getApplicationVersion()||"latest";(async()=>{const d=u.showHelpAfterError(!0).addOption(new t("-v, --version <version>","The version of the host application").choices(T).default(V)).addOption(new t("-d, --database <name>","The database engine to remove data from").choices(["postgresql","mysql","mssql"]).default("postgresql")).parse(process.argv).opts(),n=new Bitbucket({version:d.version,database:d.database});await n.reset()})(),process.on("SIGINT",(()=>{console.log("Received term signal, trying to stop gracefully 💪"),d()}));
|
|
2
|
+
import{program as u,Option as t}from"commander";import{gracefulExit as d}from"exit-hook";import{DOMParser as n,XMLSerializer as k}from"@xmldom/xmldom";import{spawn as j}from"child_process";import{XMLParser as e}from"fast-xml-parser";import{existsSync as b,readFileSync as a,mkdirSync as i}from"fs";import{cwd as s}from"process";import o from"xpath";import{hideBin as r}from"yargs/helpers";import l from"yargs/yargs";import{dirname as p,join as c}from"path";import h from"axios";import{stop as m,downAll as g,ps as w,execCompose as S,upAll as A}from"docker-compose/dist/v2.js";import v from"events";import{dump as f}from"js-yaml";import{homedir as y}from"os";import R from"simple-git";import{upAll as P}from"docker-compose";import{Sequelize as C,ConnectionError as D,TimeoutError as E,ConnectionTimedOutError as x,ConnectionRefusedError as O,ConnectionAcquireTimeoutError as M}from"sequelize";var $,T=["8.2.1-ubuntu-jdk11","8.2.1-jdk11","8.2.1","8.16.2-ubuntu-jdk17","8.16.2-jdk17","8.16.2","8.1.1-ubuntu-jdk11","8.1.1-jdk11","8.1.1","8.8-ubuntu-jdk17","8.8-jdk17","8.8.7-ubuntu-jdk17","8.8.7-jdk17","8.8.7","8.8","8.3.2-ubuntu-jdk11","7.21.5-ubuntu-jdk11","8.3.2-jdk11","7.21.5-jdk11","8.3.2","8.2.2-ubuntu-jdk11","7.21.5","8.2.2-jdk11","8.2.2","8.1.2-ubuntu-jdk11","8.1.2-jdk11","8.1.2","7.21.2-ubuntu-jdk11","7.21.2-jdk11","7.21.2","8.3.3-ubuntu-jdk11","8.3.3-jdk11","8.3.3","8.16-ubuntu-jdk17","8.16-jdk17","8.16.3-ubuntu-jdk17","8.16.3-jdk17","8.16.3","8.16","8.14.2-ubuntu-jdk17","8.15.1-ubuntu-jdk17","8.15.1-jdk17","8.14.2-jdk17","8.14.3-ubuntu-jdk17","8.15.1","8.14.2","8.14.3-jdk17","8.9.4-ubuntu-jdk17","8.9.4-jdk17","8.14.4-ubuntu-jdk17","8.14.3","8.9.4","8.14.4-jdk17","8.14.5-ubuntu-jdk17","8.14.4","8.8.1-ubuntu-jdk17","8.8.1-jdk17","8.14-ubuntu-jdk17","8.8.1","8.14-jdk17","8.14.5-jdk17","8.11.3-ubuntu-jdk17","8.11.3-jdk17","8.15.0-ubuntu-jdk17","8.14.5","8.15.0-jdk17","8.11.3","8.14","8.0.1-ubuntu-jdk11","8.15.0","8.0.1-jdk11","8.0.1","8.7.0-ubuntu-jdk11","8.7.0-jdk11","8.7.0","8.10.5-ubuntu-jdk17","8.10.5-jdk17","8.10.5","7.21.14-ubuntu-jdk11","7.21.14-jdk11","8.9.0-ubuntu-jdk17","7.21.14","8.9.0-jdk17","8.9.0","8.5-ubuntu-jdk11","8.5-jdk11","8.5.4-ubuntu-jdk11","8.5.4-jdk11","8.5.4","8.5","8.4.3-ubuntu-jdk11","8.4.3-jdk11","8.4.3","7.21.6-ubuntu-jdk11","7.21.6-jdk11","7.21.6","7.21.20-ubuntu-jdk11","7.21.20-jdk11","7.21.20","7.21.1-ubuntu-jdk11","7.21.1-jdk11","7.21.1","8.3-ubuntu-jdk11","8.3-jdk11","8.3.4-ubuntu-jdk11","8.3.4-jdk11","8.3.4","8.3","8.2.3-ubuntu-jdk11","8.2.3-jdk11","8.2.3","8.15.2-ubuntu-jdk17","8.15.2-jdk17","8.15.2","8.1.3-ubuntu-jdk11","8.1.3-jdk11","8.1.3","8.9.5-ubuntu-jdk17","8.9.5-jdk17","8.10.0-ubuntu-jdk17","8.10.0-jdk17","8.10.0","8.0.2-ubuntu-jdk11","8.0.2-jdk11","8.0.2","7.20.0-ubuntu-jdk11","7.20.0-jdk11","7.20.0","8.9.5","8.8.2-ubuntu-jdk17","8.8.2-jdk17","8.8.2","8.17.0-ubuntu-jdk17","8.17.0-jdk17","8.17.0","8.11.4-ubuntu-jdk17","8.11.4-jdk17","8.11.4","8.10-ubuntu-jdk17","8.10-jdk17","8.10.6-ubuntu-jdk17","8.10.6-jdk17","8.10.6","8.10","8.9.1-ubuntu-jdk17","8.9.1-jdk17","8.7.1-ubuntu-jdk11","8.9.1","8.7.1-jdk11","8.7.1","8.4-ubuntu-jdk11","8.4-jdk11","8.4.4-ubuntu-jdk11","8.4.4-jdk11","8.4.4","8.4","8.12.1-ubuntu-jdk17","8.12.1-jdk17","8.12.1","7.21.7-ubuntu-jdk11","7.21.7-jdk11","7.21.7","7.21.21-ubuntu-jdk11","7.21.21-jdk11","7.21.21","7.21.15-ubuntu-jdk11","7.21.15-jdk11","7.21.15","7.21.10-jdk11","7.21.10-ubuntu-jdk11","7.21.10","8.2-ubuntu-jdk11","8.2-jdk11","8.2.4-ubuntu-jdk11","8.2.4-jdk11","8.2.4","8.2","8.15.3-ubuntu-jdk17","8.15.3-jdk17","8.15.3","8.12-ubuntu-jdk17","8.12-jdk17","8.12.6-ubuntu-jdk17","8.12.6-jdk17","8.12.6","8.12","8.6.0-ubuntu-jdk11","8.6.0","8.6.0-jdk11","8.1.4-ubuntu-jdk11","8.1.4-jdk11","8.1.4","8.13.4-ubuntu-jdk17","8.13.4-jdk17","8.13.4","8.0.3-ubuntu-jdk11","8.0.3-jdk11","8.0.3","7.20.1-ubuntu-jdk11","8.9.6-ubuntu-jdk17","7.20.1-jdk11","8.9.6-jdk17","7.20.1","8.9.6","8.17-ubuntu-jdk17","8.17-jdk17","8.17.1-ubuntu-jdk17","8.17.1-jdk17","8.17.1","8.17","8.11.5-ubuntu-jdk17","8.11.5-jdk17","8.11.5","8.10.1-ubuntu-jdk17","8.10.1-jdk17","8.10.1","8.8.3-ubuntu-jdk17","8.8.3-jdk17","8.8.3","8.7.2-ubuntu-jdk11","8.7.2-jdk11","8.7.2","7-ubuntu-jdk11","7-jdk11","7.21-ubuntu-jdk11","7.21-jdk11","7.21.8-ubuntu-jdk11","7.21.8-jdk11","7.21.8","7.21.22-ubuntu-jdk11","7.21.22-jdk11","7.21.22","7.21","7","8.9-ubuntu-jdk17","8.9-jdk17","8.9.10-ubuntu-jdk17","8.9.10-jdk17","8.9.10","8.9","8.12.2-ubuntu-jdk17","8.12.2-jdk17","8.12.2","7.21.16-ubuntu-jdk11","7.21.16-jdk11","7.21.16","8.6.1-ubuntu-jdk11","8.6.1-jdk11","8.6.1","8.4.0-ubuntu-jdk11","8.4.0-jdk11","8.4.0","8.15-ubuntu-jdk17","8.15-jdk17","8.15.4-ubuntu-jdk17","8.15.4-jdk17","8.15.4","8.15","8.13.5-ubuntu-jdk17","8.13.5-jdk17","8.13.5","8.0.4-ubuntu-jdk11","8.0.4-jdk11","8.0.4","7.21.11-ubuntu-jdk11","7.21.11-jdk11","7.21.11","7.20.2-ubuntu-jdk11","7.20.2-jdk11","7.20.2","8.9.7-ubuntu-jdk17","8.9.7-jdk17","8.9.7","8.5.0-ubuntu-jdk11","8.5.0-jdk11","8.5.0","8.1-ubuntu-jdk11","8.1-jdk11","8.1.5-ubuntu-jdk11","8.1.5-jdk11","8.1.5","8.11.0-ubuntu-jdk17","8.11.0-jdk17","8.11.0","8.1","8.8.4-ubuntu-jdk17","8.8.4-jdk17","8.8.4","8.7.3-ubuntu-jdk11","8.13.0-ubuntu-jdk17","8.13.0-jdk17","8.13.0","8.11-ubuntu-jdk17","8.11-jdk17","8.11.6-ubuntu-jdk17","8.11.6-jdk17","8.11.6","8.11","8.10.2-ubuntu-jdk17","8.10.2-jdk17","latest","8.10.2","jdk17","8-ubuntu-jdk17","8-jdk17","8.7.3-jdk11","8.7.3","8.18.0-ubuntu-jdk17","8.12.3-ubuntu-jdk17","8.12.3-jdk17","8.12.3","8","7.21.9-ubuntu-jdk11","7.21.9-jdk11","7.21.9","ubuntu-jdk17","7.21.17-ubuntu-jdk11","8.6.2-ubuntu-jdk11","8.6.2-jdk11","8.6.2","8.4.1-ubuntu-jdk11","8.4.1-jdk11","8.4.1","8.3.0-ubuntu-jdk11","8.3.0-jdk11","8.3.0","8.18-ubuntu-jdk17","8.18-jdk17","8.18.0-jdk17","8.18.0","8.18","8.13-ubuntu-jdk17","8.13-jdk17","8.13.6-ubuntu-jdk17","8.13.6-jdk17","8.13.6","8.13","8.0-ubuntu-jdk11","8.0-jdk11","8.0.5-ubuntu-jdk11","8.0.5-jdk11","8.0.5","8.0","7.21.17-jdk11","7.21.17","7.20-ubuntu-jdk11","7.20-jdk11","7.20.3-ubuntu-jdk11","7.20.3-jdk11","7.20.3","7.20","8.9.8-ubuntu-jdk17","8.9.8-jdk17","8.9.8","8.5.1-ubuntu-jdk11","8.5.1-jdk11","8.5.1","8.11.1-ubuntu-jdk17","8.11.1-jdk17","8.11.1","7.21.3-ubuntu-jdk11","7.21.3-jdk11","7.21.3","7.21.12-ubuntu-jdk11","7.21.12-jdk11","7.21.12","8.9.2-ubuntu-jdk17","8.9.2-jdk17","8.9.2","8.8.5-ubuntu-jdk17","8.8.5-jdk17","8.8.5","8.7.4-ubuntu-jdk11","8.7.4-jdk11","8.7.4","8.13.1-ubuntu-jdk17","8.13.1-jdk17","8.13.1","8.10.3-ubuntu-jdk17","8.6.3-ubuntu-jdk11","8.10.3-jdk17","8.6.3-jdk11","8.10.3","8.6.3","8.16.0-ubuntu-jdk17","8.16.0-jdk17","8.16.0","8.12.4-ubuntu-jdk17","8.12.4-jdk17","8.12.4","8.0.0","7.21.18-ubuntu-jdk11","7.21.18","8.2.0-ubuntu-jdk11","8.2.0-jdk11","8.2.0","8.12.0-ubuntu-jdk17","8.12.0-jdk17","8.12.0","8.0.0-ubuntu-jdk11","8.0.0-jdk11","7.21.4-ubuntu-jdk11","7.21.4-jdk11","7.21.4","7.21.18-jdk11","8.9.9","8.5.2-ubuntu-jdk11","8.5.2-jdk11","8.5.2","8.4.2-ubuntu-jdk11","8.4.2-jdk11","8.4.2","8.3.1-ubuntu-jdk11","8.3.1-jdk11","8.3.1","8.11.2-ubuntu-jdk17","8.11.2-jdk17","8.11.2","8.9.9-ubuntu-jdk17","8.9.9-jdk17","8.14.0-ubuntu-jdk17","8.14.0-jdk17","8.14.0","8.13.2-ubuntu-jdk17","8.13.2-jdk17","8.13.2","7.21.13-ubuntu-jdk11","7.21.13-jdk11","7.21.13","8.7-ubuntu-jdk11","8.7-jdk11","8.7.5-ubuntu-jdk11","8.7.5-jdk11","8.7.5","8.7","8.6-ubuntu-jdk11","8.6-jdk11","8.6.4-ubuntu-jdk11","8.6.4-jdk11","8.6.4","8.6","7.21.0-ubuntu-jdk11","7.21.0-jdk11","7.21.0","8.9.3-ubuntu-jdk17","8.9.3-jdk17","8.9.3","8.8.6-ubuntu-jdk17","8.8.6-jdk17","8.8.6","8.8.0-ubuntu-jdk17","8.8.0-jdk17","8.8.0","8.16.1-ubuntu-jdk17","8.16.1-jdk17","8.16.1","8.12.5-ubuntu-jdk17","8.12.5-jdk17","8.12.5","8.1.0-ubuntu-jdk11","8.1.0-jdk11","8.10.4-ubuntu-jdk17","8.10.4-jdk17","8.10.4","8.1.0","7.21.19-ubuntu-jdk11","7.21.19-jdk11","7.21.19","8.5.3-ubuntu-jdk11","8.5.3-jdk11","8.5.3","8.14.1-ubuntu-jdk17","8.14.1-jdk17","8.14.1","8.13.3-ubuntu-jdk17","8.13.3-jdk17","8.13.3","8.15-ubuntu-jdk11","8.15-jdk11","8.15.3-ubuntu-jdk11","8.15.3-jdk11","8.8.0-ubuntu-jdk11","8.8.0-jdk11","8.16.0-ubuntu-jdk11","8.16.0-jdk11","8.8.1-jdk11","8.12.3-ubuntu-jdk11","8.12.3-jdk11","8.8.1-ubuntu-jdk11","8.16.1-ubuntu-jdk11","8.10.0-ubuntu-jdk11","8.10.0-jdk11","8.16.1-jdk11","7.6.9-ubuntu-jdk11","7.6.9-jdk11","8.12.4-ubuntu-jdk11","8.12.4-jdk11","7.6.9","8.8.2-ubuntu-jdk11","8.8.2-jdk11","7.19-ubuntu-jdk11","7.19-jdk11","7.19.5-ubuntu-jdk11","7.19.5-jdk11","7.19.5","7.19","7.7.0-ubuntu-jdk11","8.16-ubuntu-jdk11","8.16-jdk11","8.16.2-ubuntu-jdk11","7.7.0","8.16.2-jdk11","8.10.1-ubuntu-jdk11","8.10.1-jdk11","7.7.0-jdk11","8.12.5-ubuntu-jdk11","8.8.3-ubuntu-jdk11","8.12.5-jdk11","8.8.3-jdk11","7.7-ubuntu-jdk11","7.7-jdk11","7.7.1-ubuntu-jdk11","7.7.1-jdk11","7.7.1","7.7","7.10.0-ubuntu-jdk11","7.10.0-jdk11","7.10.0","8.10.2-ubuntu-jdk11","8.10.2-jdk11","ubuntu-jdk11","jdk11","8-jdk11","8-ubuntu-jdk11","8.17-ubuntu-jdk11","8.17-jdk11","8.17.0-ubuntu-jdk11","8.17.0-jdk11","8.12-ubuntu-jdk11","8.12-jdk11","8.12.6-ubuntu-jdk11","8.12.6-jdk11","7.16.2-ubuntu-jdk11","7.16.2-jdk11","7.16.2","8.8.4-ubuntu-jdk11","8.8.4-jdk11","7.10-ubuntu-jdk11","7.10-jdk11","7.10.1-ubuntu-jdk11","7.10.1-jdk11","7.10.1","7.10","7.17.3-ubuntu-jdk11","7.17.3-jdk11","8.10.3-ubuntu-jdk11","7.17.3","8.10.3-jdk11","7.8.0-ubuntu-jdk11","7.8.0-jdk11","7.8.0","7.16-jdk11","7.16-ubuntu-jdk11","7.16.3-jdk11","7.16.3-ubuntu-jdk11","7.16.3","7.16","8.13.0-ubuntu-jdk11","8.13.0-jdk11","8.8.5-ubuntu-jdk11","8.8.5-jdk11","7.11.1","7.6.13-ubuntu-jdk11","7.6.13-jdk11","7.17.4-ubuntu-jdk11","7.6.13","7.17.4-jdk11","7.17.4","7.11.1-ubuntu-jdk11","7.11.1-jdk11","7.8-ubuntu-jdk11","8.10.4-ubuntu-jdk11","7.8-jdk11","7.8.1-jdk11","7.8.1-ubuntu-jdk11","7.8.1","7.8","8.10.4-jdk11","7.17.0-ubuntu-jdk11","7.17.0-jdk11","7.17.0","8.13.1-ubuntu-jdk11","8.13.1-jdk11","7.6.14-ubuntu-jdk11","7.6.14-jdk11","7.6.14","7.11-ubuntu-jdk11","7.11-jdk11","7.11.2-ubuntu-jdk11","7.11.2-jdk11","8.8.6-ubuntu-jdk11","8.8.6-jdk11","7.11.2","7.11","7.17.5-ubuntu-jdk11","7.17.5-jdk11","7.17.5","7.9.0-ubuntu-jdk11","7.9.0-jdk11","7.9.0","8.10.5-ubuntu-jdk11","8.10.5-jdk11","7.6.15-ubuntu-jdk11","7.6.15-jdk11","7.6.15","7.17.1-ubuntu-jdk11","7.17.1-jdk11","7.17.1","8.13.2-ubuntu-jdk11","8.13.2-jdk11","7.17.6-ubuntu-jdk11","7.17.6-jdk11","7.17.6","7.12.0-jdk11","7.12.0","8.8-ubuntu-jdk11","8.8-jdk11","7.12.0-ubuntu-jdk11","8.8.7-ubuntu-jdk11","8.8.7-jdk11","7.9-ubuntu-jdk11","7.9-jdk11","7.9.1-ubuntu-jdk11","7.9.1-jdk11","7.9.1","7.9","8.10-ubuntu-jdk11","8.10-jdk11","8.10.6-ubuntu-jdk11","8.10.6-jdk11","7.6.16-ubuntu-jdk11","7.6.16-jdk11","7.6.16","7.17.10-ubuntu-jdk11","7.17.10-jdk11","7.17.10","7.17.7-ubuntu-jdk11","7.17.7-jdk11","7.17.7","7.12-ubuntu-jdk11","7.12-jdk11","7.12.1-ubuntu-jdk11","7.12.1-jdk11","7.12","8.13.3-ubuntu-jdk11","8.13.3-jdk11","7.12.1","7.6.17-ubuntu-jdk11","7.6.17-jdk11","7.6.17","7.17.11-ubuntu-jdk11","7.17.11-jdk11","7.17.11","7.17.8-ubuntu-jdk11","7.17.8-jdk11","7.17.8","8.9.0-ubuntu-jdk11","8.9.0-jdk11","8.13.4-ubuntu-jdk11","8.13.4-jdk11","8.11.0-ubuntu-jdk11","8.11.0-jdk11","7.6.18-ubuntu-jdk11","7.6.18-jdk11","7.6.18","7.13.0-ubuntu-jdk11","7.13.0-jdk11","7.13.0","7.17.12-ubuntu-jdk11","7.17.12-jdk11","7.17.12","7.17.9-ubuntu-jdk11","7.17.9-jdk11","7.17.9","8.13-ubuntu-jdk11","8.13-jdk11","8.13.5-ubuntu-jdk11","8.13.5-jdk11","7.6.19-ubuntu-jdk11","7.6.19-jdk11","7.6.19","7.13-ubuntu-jdk11","7.13-jdk11","7.13.1-ubuntu-jdk11","7.13.1-jdk11","7.13.1","7.13","8.9.1-ubuntu-jdk11","8.9.1-jdk11","8.11.1-ubuntu-jdk11","8.11.1-jdk11","7.17.13-ubuntu-jdk11","7.17.13-jdk11","7.17.13","7.18.0-ubuntu-jdk11","7.18.0-jdk11","7.18.0","7.6.2-ubuntu-jdk11","7.6.2-jdk11","8.9.2-ubuntu-jdk11","7.6.2","8.9.2-jdk11","8.14.0-ubuntu-jdk11","8.14.0-jdk11","8.11.2-ubuntu-jdk11","8.11.2-jdk11","7.17.14-ubuntu-jdk11","7.17.14-jdk11","7.17.14","7.14.0-ubuntu-jdk11","7.14.0-jdk11","7.14.0","7.6.20-ubuntu-jdk11","7.6.20-jdk11","7.6.20","7.18.1-ubuntu-jdk11","7.18.1-jdk11","7.18.1","7.14.1-ubuntu-jdk11","7.14.1","7.18.2-ubuntu-jdk11","7.17.15-ubuntu-jdk11","7.17.15-jdk11","7.17.15","7.14.1-jdk11","8.9.3-ubuntu-jdk11","8.9.3-jdk11","8.14.1-ubuntu-jdk11","8.14.1-jdk11","8.11.3-ubuntu-jdk11","8.11.3-jdk11","7.6.21-ubuntu-jdk11","7.6.21-jdk11","7.6.21","7.18.2-jdk11","7.18.2","7.14-ubuntu-jdk11","7.14.2-ubuntu-jdk11","7.14.2-jdk11","7.6.22-ubuntu-jdk11","7.6.22-jdk11","7.6.22","7.5.0-ubuntu-jdk11","7.5.0-jdk11","7.5.0","7.18.3","7.17.16-ubuntu-jdk11","7.17.16-jdk11","7.17.16","7.14-jdk11","7.14.2","7.14","8.14.2-ubuntu-jdk11","8.14.2-jdk11","7.18.3-ubuntu-jdk11","7.18.3-jdk11","8.9.4-ubuntu-jdk11","8.9.4-jdk11","8.11.4-ubuntu-jdk11","8.11.4-jdk11","7.6-ubuntu-jdk11","7.6-jdk11","7.6.23-ubuntu-jdk11","7.6.23-jdk11","7.6.23","7.6","7.5.1-ubuntu-jdk11","7.5.1-jdk11","7.5.1","7.17.17-ubuntu-jdk11","7.17.17-jdk11","7.17.17","7.18-ubuntu-jdk11","7.18-jdk11","7.18.4-ubuntu-jdk11","7.18.4-jdk11","7.18.4","7.18","8.14.3-ubuntu-jdk11","7.15.0-jdk11","8.14.3-jdk11","8.11.5-ubuntu-jdk11","8.11.5-jdk11","7.15.0-ubuntu-jdk11","7.15.0","8.9.5-ubuntu-jdk11","8.9.5-jdk11","7.5-ubuntu-jdk11","7.5-jdk11","7.5.2-ubuntu-jdk11","7.5.2-jdk11","7.5.2","7.5","7.17.18-ubuntu-jdk11","7.17.18-jdk11","7.17.18","7.15.1-ubuntu-jdk11","7.15.1-jdk11","7.15.1","8.14-jdk11","8.14.4-jdk11","8.9.6-ubuntu-jdk11","7.6.3-ubuntu-jdk11","7.6.3-jdk11","8.9.6-jdk11","7.6.3","8.14-ubuntu-jdk11","8.14.4-ubuntu-jdk11","8.11-ubuntu-jdk11","8.11-jdk11","8.11.6-ubuntu-jdk11","8.11.6-jdk11","7.19.0-ubuntu-jdk11","7.19.0-jdk11","7.19.0","7.17.19-ubuntu-jdk11","7.17.19-jdk11","7.17.19","7.15.2-ubuntu-jdk11","7.15.2-jdk11","7.15.2","7.6.4-ubuntu-jdk11","7.6.4-jdk11","7.6.4","7.6.0-ubuntu-jdk11","7.6.0-jdk11","7.6.0","8.9.7-ubuntu-jdk11","8.9.7-jdk11","7.19.1-ubuntu-jdk11","7.19.1-jdk11","7.19.1","7.17.2-ubuntu-jdk11","7.17.2","7.17.2-jdk11","7.15-ubuntu-jdk11","7.15-jdk11","7.15.3-ubuntu-jdk11","7.15.3-jdk11","7.15.3","7.15","8.15.0-ubuntu-jdk11","8.15.0-jdk11","8.12.0-ubuntu-jdk11","8.12.0-jdk11","7.6.5-ubuntu-jdk11","7.6.5-jdk11","7.6.5","7.6.1-ubuntu-jdk11","7.6.1-jdk11","7.6.1","8.9.8-ubuntu-jdk11","8.9.8-jdk11","7.19.2-ubuntu-jdk11","7.19.2-jdk11","7.19.2","7.17.20-ubuntu-jdk11","7.17.20-jdk11","7.17.20","7.6.6-ubuntu-jdk11","7.6.6-jdk11","7.6.6","7.6.10-ubuntu-jdk11","7.6.10-jdk11","7.6.10","8.15.1-ubuntu-jdk11","8.15.1-jdk11","8.12.1-ubuntu-jdk11","8.12.1-jdk11","7.19.3-ubuntu-jdk11","7.19.3-jdk11","7.19.3","7.16.0-ubuntu-jdk11","7.16.0-jdk11","8.9-ubuntu-jdk11","7.16.0","8.9-jdk11","8.9.9-ubuntu-jdk11","8.9.9-jdk11","7.6.7-ubuntu-jdk11","7.6.7-jdk11","7.6.7","7.6.11-ubuntu-jdk11","7.6.11-jdk11","7.6.11","7.17-ubuntu-jdk11","7.17-jdk11","7.17.21-ubuntu-jdk11","7.17.21-jdk11","7.17.21","7.17","8.15.2-ubuntu-jdk11","8.15.2-jdk11","8.12.2-ubuntu-jdk11","8.12.2-jdk11","7.19.4-ubuntu-jdk11","7.19.4-jdk11","7.19.4","7.16.1-ubuntu-jdk11","7.16.1-jdk11","7.16.1","7.6.8-ubuntu-jdk11","7.6.8-jdk11","7.6.8","7.6.12-ubuntu-jdk11","7.6.12-jdk11","7.6.12","8.14.0-eap01","8.14.0-eap01-ubuntu-jdk11","8.14.0-eap01-jdk11","7.4-ubuntu-jdk11","7.4-jdk11","7.4.1-ubuntu-jdk11","7.4.1-jdk11","7.4.1","7.4.0-ubuntu-jdk11","7.4.0-jdk11","7.4.0","7.3-ubuntu-jdk11","7.3-jdk11","7.3.2-ubuntu-jdk11","7.3.2-jdk11","7.3.2","7.3","7.4.2-ubuntu-jdk11","7.4.2-jdk11","7.4.2","7.4","7.3.1-ubuntu-jdk11","7.3.1-jdk11","7.3.1","7.3.0-ubuntu-jdk11","7.3.0-jdk11","7.3.0","7.2.5-ubuntu-jdk11","7.2.5-jdk11","7.2.5","7.2.4-ubuntu-jdk11","7.2.4-jdk11","7.2.4","7.2.3-ubuntu-jdk11","7.2.3-jdk11","7.2.3","7.2.2-ubuntu-jdk11","7.2.2-jdk11","7.2.2","7.2.1-ubuntu-jdk11","7.2.1-jdk11","7.2.1","7.2.0-ubuntu-jdk11","7.2.0-jdk11","7.2.0","7.1-ubuntu-jdk11","7.1-jdk11","7.1.4-ubuntu-jdk11","7.1.4-jdk11","7.1.4","7.1.3-ubuntu-jdk11","7.1.3-jdk11","7.1.3","7.1.2-ubuntu-jdk11","7.1.2-jdk11","7.1.2","7.1.1-ubuntu-jdk11","7.1.1-jdk11","7.1.1","7.1.0-ubuntu-jdk11","7.1.0-jdk11","7.1.0","7.1","7.2-ubuntu-jdk11","7.2-jdk11","7.2.6-ubuntu-jdk11","7.2.6-jdk11","7.2.6","7.2","eap-ubuntu-jdk11","eap-jdk11","eap","8.0.0-eap05-ubuntu-jdk11","8.0.0-eap05-jdk11","8.0.0-eap05","7.0-jdk11","7.0-ubuntu-jdk11","7.0.5-ubuntu-jdk11","7.0.5-jdk11","7.0.5","7.0","6.10.17-ubuntu-jdk11","6.10.17","6.10.17-jdk11","6.10","6","6-ubuntu-jdk11","6-jdk11","6.10-ubuntu-jdk11","6.10-jdk11","6.8.2-jdk11","6.10.11-jdk11","6.8.2","6.10.11","6.8.2-ubuntu-jdk11","6.10.11-ubuntu-jdk11","7.0.0-jdk11","7.0.0-ubuntu-jdk11","7.0.0","6.8.3","6.7.1","6.7.1-ubuntu-jdk11","6.10.12-jdk11","6.8.3-ubuntu-jdk11","6.7.1-jdk11","6.10.12","6.8.3-jdk11","6.10.12-ubuntu-jdk11","7.0.1-ubuntu-jdk11","7.0.1-jdk11","7.0.1","6.7.2-jdk11","6.10.3","6.8.4-jdk11","6.7.2","6.10.3-jdk11","6.8","6.10.13-jdk11","6.7.2-ubuntu-jdk11","6.10.3-ubuntu-jdk11","6.8-ubuntu-jdk11","6.10.13-ubuntu-jdk11","6.8-jdk11","6.10.13","6.8.4-ubuntu-jdk11","7.0.2-ubuntu-jdk11","6.8.4","7.0.2","6.7.3-ubuntu-jdk11","7.0.2-jdk11","6.10.4-jdk11","6.7.3","6.10.4-ubuntu-jdk11","6.7.3-jdk11","6.10.14-ubuntu-jdk11","6.10.4","6.10.14","6.10.14-jdk11","7.0.3-jdk11","6.9.0-ubuntu-jdk11","7.0.3","6.7.4-ubuntu-jdk11","6.10.5-jdk11","6.9.0","7.0.3-ubuntu-jdk11","6.7.4","6.10.5-ubuntu-jdk11","6.9.0-jdk11","6.7.4-jdk11","6.10.15-jdk11","6.10.5","6.10.15","6.10.15-ubuntu-jdk11","7.0.4-jdk11","6.9.1-jdk11","6.7-jdk11","7.0.4-ubuntu-jdk11","6.10.7-jdk11","6.9.1","6.7","7.0.4","6.10.7","6.9.1-ubuntu-jdk11","6.7-ubuntu-jdk11","6.10.7-ubuntu-jdk11","6.7.5","6.10.16-jdk11","6.7.5-jdk11","6.7.5-ubuntu-jdk11","6.10.16","6.9.2-ubuntu-jdk11","6.10.16-ubuntu-jdk11","6.10.8","6.9.2-jdk11","6.10.8-ubuntu-jdk11","6.9.2","6.10.8-jdk11","6.9.3-ubuntu-jdk11","6.10.9","6.8.0-jdk11","6.9-jdk11","6.10.9-jdk11","6.8.0-ubuntu-jdk11","6.9.3","6.10.9-ubuntu-jdk11","6.8.0","6.9.3-jdk11","6.9","6.9-ubuntu-jdk11","6.10.2","6.7.0-jdk11","6.8.1-jdk11","6.10.2-jdk11","6.7.0-ubuntu-jdk11","6.8.1","6.10.2-ubuntu-jdk11","6.7.0","6.8.1-ubuntu-jdk11","6.10.0-jdk11","6.10.0-ubuntu-jdk11","6.10.0","6.10.1-jdk11","6.10.1-ubuntu-jdk11","6.10.1","6.10.10-jdk11","6.10.10","6.10.10-ubuntu-jdk11","7.14-ubuntu","7.14-jdk8","7.14.1-ubuntu","7.14-ubuntu-jdk8","7.14.1-jdk8","7.14.1-ubuntu-jdk8","7.11.2-jdk8","7.11-ubuntu","7.11.2-ubuntu","7.11-ubuntu-jdk8","7.11-jdk8","7.11.2-ubuntu-jdk8","7.15.0-jdk8","7.1.2-ubuntu","7.15.0-ubuntu","7.1.2-jdk8","7.15.0-ubuntu-jdk8","7.1.2-ubuntu-jdk8","7.6.4-ubuntu","6.7-jdk8","7.2.2-jdk8","7.6.4-jdk8","7.12.0-jdk8","6.7.5-ubuntu","7.5.1-ubuntu","7.6.4-ubuntu-jdk8","6.7.5-ubuntu-jdk8","7.2.2-ubuntu-jdk8","6.9.0-ubuntu","7.15-ubuntu-jdk8","7.12.0-ubuntu","7.5.1-jdk8","7.1.3-jdk8","7.2.2-ubuntu","6.9.0-jdk8","6.7-ubuntu","7.15.1-ubuntu","7.12.0-ubuntu-jdk8","7.5.1-ubuntu-jdk8","6.9.0-ubuntu-jdk8","6.7.5-jdk8","7.15-ubuntu","7.0.2-ubuntu-jdk8","7.1.3-ubuntu-jdk8","6.7-ubuntu-jdk8","7.15-jdk8","7.0.2-jdk8","7.1.3-ubuntu","7.0.2-ubuntu","7.15.1-jdk8","7.15.1-ubuntu-jdk8","7.2.3-jdk8","7.12.1-ubuntu","7.5.2-ubuntu-jdk8","7.6.5-jdk8","7.2.3-ubuntu","6.9.1-ubuntu","7.5-ubuntu-jdk8","7.6.5-ubuntu-jdk8","7.12.1-jdk8","6.9.1-ubuntu-jdk8","7.1.4-jdk8","7.5-jdk8","7.2.3-ubuntu-jdk8","7.12-jdk8","7.1.4-ubuntu","7.5.2-ubuntu","7.6.5-ubuntu","6.9.1-jdk8","7.0.3-ubuntu-jdk8","7.12-ubuntu-jdk8","6.10.2-jdk8","6.8.0-jdk8","7.12-ubuntu","7.1-ubuntu","7.5.2-jdk8","6.8.0-ubuntu-jdk8","6.10.9-ubuntu-jdk8","7.0.3-jdk8","6.10.2-ubuntu","7.12.1-ubuntu-jdk8","7.1-ubuntu-jdk8","7.5-ubuntu","6.10.9-jdk8","7.0.3-ubuntu","6.10.2-ubuntu-jdk8","7.1.4-ubuntu-jdk8","6.8.0-ubuntu","7.2.4-ubuntu","7.16.0-ubuntu","6.10.9-ubuntu","7.6.6-ubuntu","7.16-jdk8","6.9.2-jdk8","7.1-jdk8","7.16.0-jdk8","7.2.4-ubuntu-jdk8","7.6.6-ubuntu-jdk8","6.9.2-ubuntu-jdk8","7.2.4-jdk8","7.0.4-jdk8","7.6.6-jdk8","6.10.3-ubuntu","6.9.2-ubuntu","7.16.0-ubuntu-jdk8","6.8.1-ubuntu","6.10.3-ubuntu-jdk8","6.7.0-jdk8","7.0.4-ubuntu","6.8.1-ubuntu-jdk8","6.7.0-ubuntu-jdk8","7-ubuntu-jdk8","7.0.4-ubuntu-jdk8","6.10.3-jdk8","6.8.1-jdk8","7-jdk8","7.13.0-jdk8","6.7.0-ubuntu","ubuntu","7.2.5-jdk8","7.6.0-jdk8","7.13.0-ubuntu-jdk8","7.6.7-jdk8","6.9-ubuntu","7.6.0-ubuntu","7.2.5-ubuntu-jdk8","6.10.11-jdk8","7.13.0-ubuntu","7.10.0-ubuntu-jdk8","6.9-jdk8","jdk8","7.10.0-jdk8","6.9.3-ubuntu-jdk8","7.6.7-ubuntu","7.0.5-ubuntu","6.10.4-ubuntu-jdk8","6.8.2-ubuntu-jdk8","ubuntu-jdk8","7.2.5-ubuntu","7.6.0-ubuntu-jdk8","7.10.0-ubuntu","6.9.3-ubuntu","7.6.7-ubuntu-jdk8","6.10.4-ubuntu","6.8.2-ubuntu","7.0-ubuntu","7.16-ubuntu","6.10.4-jdk8","7.0-ubuntu-jdk8","6.7.1-ubuntu-jdk8","6.8.2-jdk8","7.0-jdk8","6.7.1-jdk8","7-ubuntu","6.9-ubuntu-jdk8","6.7.1-ubuntu","6.10.12-jdk8","7.16-ubuntu-jdk8","6.9.3-jdk8","7.13.1-ubuntu-jdk8","6.10.12-ubuntu","7.2.6-jdk8","7.6.1-jdk8","7.10-ubuntu-jdk8","7.6.8-jdk8","7.0.5-jdk8","6.10.12-ubuntu-jdk8","7.2-ubuntu-jdk8","7.10-ubuntu","7.6.8-ubuntu","7.13.1-ubuntu","7.0.5-ubuntu-jdk8","7.2-ubuntu","7.6.1-ubuntu","7.10.1-ubuntu-jdk8","6.8.3-jdk8","7.13-jdk8","6.10.5-ubuntu","7.2.6-ubuntu","7.6.1-ubuntu-jdk8","7.10.1-ubuntu","6.8.3-ubuntu-jdk8","6.7.2-ubuntu-jdk8","7.6.8-ubuntu-jdk8","7.13-ubuntu","7.2-jdk8","6.8.3-ubuntu","6.7.2-ubuntu","7.4.2-jdk8","6.10.5-jdk8","7.13-ubuntu-jdk8","7.2.6-ubuntu-jdk8","7.10-jdk8","7.4-ubuntu-jdk8","6.10.5-ubuntu-jdk8","7.13.1-jdk8","6-ubuntu","6.7.2-jdk8","7.10.1-jdk8","7.4-jdk8","7.4.2-ubuntu","7.6.2-jdk8","7.6-jdk8","7.0.0-ubuntu-jdk8","7.2.0-ubuntu","7.6.2-ubuntu-jdk8","7.0.0-ubuntu","6.10-ubuntu-jdk8","7.6.2-ubuntu","7.1.0-ubuntu","7.2.0-jdk8","6.10.7-jdk8","7.6.9-jdk8","7.0.0-jdk8","6.7.3-jdk8","6.10-ubuntu","7.1.0-ubuntu-jdk8","7.6-ubuntu-jdk8","7.2.0-ubuntu-jdk8","6.7.3-ubuntu-jdk8","6.10-jdk8","6.8-ubuntu-jdk8","7.1.0-jdk8","6.10.7-ubuntu","7.6-ubuntu","6.7.3-ubuntu","6-jdk8","6.8.4-jdk8","6.10.7-ubuntu-jdk8","6.10.13-jdk8","6.8-ubuntu","7.9.1-ubuntu-jdk8","7.6.9-ubuntu","6.10.13-ubuntu-jdk8","6.8.4-ubuntu","7.6.9-ubuntu-jdk8","6.10.13-ubuntu","6.8-jdk8","7.3.0-ubuntu-jdk8","7.6.3-jdk8","7.2.1-ubuntu","7.0.1-ubuntu-jdk8","7.5.0-ubuntu","6-ubuntu-jdk8","6.8.4-ubuntu-jdk8","7.14.0-ubuntu","7.11.1-ubuntu-jdk8","7.6.3-ubuntu-jdk8","7.3.0-ubuntu","7.0.1-jdk8","7.2.1-ubuntu-jdk8","7.5.0-jdk8","6.7.4-ubuntu","7.14.0-jdk8","7.11.1-jdk8","7.6.3-ubuntu","7.0.1-ubuntu","7.5.0-ubuntu-jdk8","7.1.1-ubuntu-jdk8","6.10.8-jdk8","7.14.0-ubuntu-jdk8","7.11.1-ubuntu","7.3.0-jdk8","7.2.1-jdk8","7.1.1-ubuntu","6.7.4-jdk8","6.10.8-ubuntu-jdk8","7.1.1-jdk8","6.7.4-ubuntu-jdk8","6.10.8-ubuntu","7.7.0-ubuntu-jdk8","7.7.0-ubuntu","7.7.0-jdk8","7.7.1-jdk8","7.7.1-ubuntu","7.7-jdk8","7.7-ubuntu","7.7-ubuntu-jdk8","6.10.0-ubuntu","7.7.1-ubuntu-jdk8","6.10.0-jdk8","6.10.0-ubuntu-jdk8","6.10.1-jdk8","6.10.1-ubuntu","7.8.0-ubuntu","6.10.1-ubuntu-jdk8","7.8.0-ubuntu-jdk8","7.8.0-jdk8","6.10.10-ubuntu","6.10.10-ubuntu-jdk8","7.8-ubuntu","6.10.10-jdk8","7.8.1-ubuntu","7.8.1-ubuntu-jdk8","7.8-ubuntu-jdk8","7.8-jdk8","6.10.11-ubuntu-jdk8","7.8.1-jdk8","6.10.11-ubuntu","7.9.0-jdk8","7.9.0-ubuntu","7.9.0-ubuntu-jdk8","7.9.1-jdk8","7.9-ubuntu-jdk8","7.9.1-ubuntu","7.9-ubuntu","7.9-jdk8","7.3.1-ubuntu-jdk8","7.3.1-ubuntu","7.3.1-jdk8","7.3.2-jdk8","7.3.2-ubuntu-jdk8","7.3-ubuntu","7.3-ubuntu-jdk8","7.3-jdk8","7.3.2-ubuntu","7.4.0-ubuntu-jdk8","7.4.0-ubuntu","7.4.0-jdk8","7.4.1-ubuntu-jdk8","7.4.1-ubuntu","7.4.1-jdk8","7.4.2-ubuntu-jdk8","7.4-ubuntu","6.5.0-ubuntu","6.5.0","6.5.0-jdk8","6.5.0-ubuntu-jdk8","6.5.1","6.6.3","6.5.1-ubuntu","6.6.3-ubuntu","6.5.1-ubuntu-jdk8","6.6.3-ubuntu-jdk8","6.5.1-jdk8","6.6.3-jdk8","6.5.2-jdk8","6.6.4-ubuntu","6.5.2-ubuntu-jdk8","6.6-ubuntu-jdk8","6.5.2-ubuntu","6.6","6.5.2","6.6.4-jdk8","6.6.4","6.6.4-ubuntu-jdk8","6.6-jdk8","6.5.1-ubuntu-jdk11","6.6.3-jdk11","6.6-ubuntu","6.5.1-jdk11","6.5-ubuntu","6.6.3-ubuntu-jdk11","6.5.3-jdk8","6.5.3-ubuntu-jdk8","6.5-ubuntu-jdk8","6.5","6.6-ubuntu-jdk11","6.5.2-jdk11","6.5.3-ubuntu","6.5.2-ubuntu-jdk11","6.6.4-jdk11","6.5.3","6.6.4-ubuntu-jdk11","6.5-jdk8","6.6-jdk11","6.5-jdk11","6.5.3-ubuntu-jdk11","6.5-ubuntu-jdk11","6.5.3-jdk11","6.6.0-ubuntu","6.6.0-jdk8","6.6.0-ubuntu-jdk8","6.6.0","6.6.0-jdk11","6.6.0-ubuntu-jdk11","6.6.1-jdk8","6.6.1","6.6.1-ubuntu","6.6.1-ubuntu-jdk8","6.6.1-jdk11","6.6.1-ubuntu-jdk11","6.6.2","6.6.2-ubuntu-jdk8","6.5.0-jdk11","6.6.2-ubuntu-jdk11","6.6.2-jdk8","6.5.0-ubuntu-jdk11","6.6.2-jdk11","6.6.2-ubuntu","6.4.0-ubuntu","6.4.0","6.4.0-ubuntu-jdk8","6.4.0-jdk8","6.0-ubuntu-jdk8","6.4.1-jdk8","6.0.11","6.4.1-ubuntu-jdk8","6.0-jdk8","6.4.1","6.0-ubuntu","6.4.1-ubuntu","6.0.11-ubuntu-jdk8","6.0","6.0.11-jdk8","6.0.11-ubuntu","6.4.2-jdk8","6.4.2-ubuntu-jdk8","6.4.2-ubuntu","6.4.2","6.0.2","6.4.3-jdk8","6.0.2-ubuntu","6.4.3-ubuntu","6.0.2-jdk8","6.4.3","6.0.2-ubuntu-jdk8","6.4.3-ubuntu-jdk8","6.0.3-ubuntu-jdk8","6.4.4-ubuntu","6.0.3","6.4.4-jdk8","6.0.3-jdk8","6.4-jdk8","6.0.3-ubuntu","6.4-ubuntu","6.4","6.4.4-ubuntu-jdk8","6.4-ubuntu-jdk8","6.4.4","6.0.4-jdk8","6.0.4","6.0.4-ubuntu","6.0.4-ubuntu-jdk8","6.0.5-jdk8","6.0.5-ubuntu-jdk8","6.0.5-ubuntu","6.0.5","6.0.6-jdk8","6.0.6-ubuntu-jdk8","6.0.6","6.0.6-ubuntu","6.0.7-ubuntu-jdk8","6.0.7","6.0.7-ubuntu","6.0.7-jdk8","6.0.9-ubuntu","6.0.9","6.0.9-jdk8","6.0.9-ubuntu-jdk8","6.1.0-ubuntu-jdk8","6.1.0-ubuntu","6.1.0","6.1.0-jdk8","6.2.6","6.2.6-ubuntu-jdk8","6.2.6-jdk8","6.2.6-ubuntu","6.2","6.2.7-ubuntu-jdk8","6.2-ubuntu","6.2.7-jdk8","6.2-ubuntu-jdk8","6.2-jdk8","6.2.7-ubuntu","6.2.7","6.3.0-jdk8","6.3.0-ubuntu-jdk8","6.3.0","6.3.0-ubuntu","6.3.1","6.3.1-jdk8","6.3.1-ubuntu-jdk8","6.3.1-ubuntu","6.3.2-ubuntu","6.3.2-jdk8","6.3.2-ubuntu-jdk8","6.3.2","6.3.3","6.3.3-jdk8","6.3.3-ubuntu-jdk8","6.3.3-ubuntu","6.3.4-ubuntu-jdk8","6.3.4-ubuntu","6.3.4","6.3.4-jdk8","6.3.5","6.3.5-ubuntu-jdk8","6.3.5-jdk8","6.3.5-ubuntu","6.3-ubuntu","6.3.6-ubuntu","6.3.6-ubuntu-jdk8","6.3.6","6.3","6.3.6-jdk8","6.3-ubuntu-jdk8","6.3-jdk8","6.1.1-ubuntu","6.1.1","6.1.1-jdk8","6.1.1-ubuntu-jdk8","6.1.2-jdk8","6.1.2","6.1.2-ubuntu","6.1.2-ubuntu-jdk8","6.1.3-ubuntu-jdk8","6.1.3","6.4.0-ubuntu-jdk11","6.2.6-jdk11","6.1.3-jdk8","6.4.0-jdk11","6.2.6-ubuntu-jdk11","6.1.3-ubuntu","6.0-jdk11","6.1.1-ubuntu-jdk11","6.4.1-jdk11","6.0.11-jdk11","6.1.4","6.2.7-ubuntu-jdk11","6.4.1-ubuntu-jdk11","6.0-ubuntu-jdk11","6.1.4-ubuntu-jdk8","6.1.1-jdk11","6.2-ubuntu-jdk11","6.0.11-ubuntu-jdk11","6.1.4-jdk8","6.2-jdk11","6.1.4-ubuntu","6.2.7-jdk11","6.4.2-ubuntu-jdk11","6.1.2-jdk11","6.4.2-jdk11","6.1.2-ubuntu-jdk11","6.2.0-ubuntu-jdk8","6.1.5-jdk8","6.2.0-jdk8","6.1.5-ubuntu","6.2.0-ubuntu","6.1.5","6.2.0","6.0.2-jdk11","6.3.0-ubuntu-jdk11","6.1.5-ubuntu-jdk8","6.4.3-jdk11","6.1.3-ubuntu-jdk11","6.0.2-ubuntu-jdk11","6.3.0-jdk11","6.1.3-jdk11","6.4.3-ubuntu-jdk11","6.2.1","6.1.6-ubuntu-jdk8","6.2.1-ubuntu-jdk8","6.0.3-ubuntu-jdk11","6.1.6-ubuntu","6.3.1-jdk11","6.2.1-ubuntu","6.1.4-ubuntu-jdk11","6.0.3-jdk11","6.1.6","6.3.1-ubuntu-jdk11","6.4.4-ubuntu-jdk11","6.2.1-jdk8","6.1.4-jdk11","6.1.6-jdk8","6.4.4-jdk11","6.4-ubuntu-jdk11","6.4-jdk11","6.0.4-ubuntu-jdk11","6.3.2-ubuntu-jdk11","6.2.0-jdk11","6.1.5-jdk11","6.2.2-ubuntu","6.0.4-jdk11","6.1.7","6.3.2-jdk11","6.2.0-ubuntu-jdk11","6.1.5-ubuntu-jdk11","6.2.2-ubuntu-jdk8","6.1.7-ubuntu-jdk8","6.2.2","6.1.7-ubuntu","6.2.2-jdk8","6.1.7-jdk8","6.0.5-jdk11","6.3.3-ubuntu-jdk11","6.2.1-jdk11","6.1.6-ubuntu-jdk11","6.0.5-ubuntu-jdk11","6.3.3-jdk11","6.2.1-ubuntu-jdk11","6.1.6-jdk11","6.2.3-ubuntu","6.1.8-jdk8","6.0.0-ubuntu","6.2.3-ubuntu-jdk8","6.1.8-ubuntu-jdk8","6.0.0-ubuntu-jdk8","6.2.3","6.1.8-ubuntu","6.0.0-jdk8","6.0.6-ubuntu-jdk11","6.3.4-ubuntu-jdk11","6.2.2-ubuntu-jdk11","6.1.8","6.2.3-jdk8","6.0.0","6.1.7-jdk11","6.0.6-jdk11","6.3.4-jdk11","6.2.2-jdk11","6.1.7-ubuntu-jdk11","6.2.3-ubuntu-jdk11","6.3.5-ubuntu-jdk11","6.0.7-ubuntu-jdk11","6.0.0-ubuntu-jdk11","6.1.8-jdk11","6.2.3-jdk11","6.0.7-jdk11","6.3.5-jdk11","6.0.0-jdk11","6.1.8-ubuntu-jdk11","6.1.9-ubuntu","6.2.4-jdk8","6.0.1-ubuntu-jdk8","6.1-ubuntu-jdk8","6.2.4-ubuntu-jdk8","6.0.1-jdk8","6.1.9-jdk8","6.2.4","6.0.1-ubuntu","6.1-ubuntu","6.2.4-ubuntu","6.0.1","6.0.9-jdk11","6.2.4-ubuntu-jdk11","6.1-jdk8","6.3-jdk11","6.0.1-ubuntu-jdk11","6.1.9-ubuntu-jdk11","6.0.9-ubuntu-jdk11","6.1.9-ubuntu-jdk8","6.2.4-jdk11","6.3.6-jdk11","6.0.1-jdk11","6.1-jdk11","6.1","6.3-ubuntu-jdk11","6.1-ubuntu-jdk11","6.1.9","6.3.6-ubuntu-jdk11","6.1.9-jdk11","6.2.5","6.0.10-ubuntu-jdk8","6.2.5-ubuntu","6.0.10-jdk8","6.1.0-ubuntu-jdk11","6.2.5-jdk11","6.2.5-jdk8","6.0.10-jdk11","6.0.10-ubuntu","6.2.5-ubuntu-jdk8","6.2.5-ubuntu-jdk11","6.1.0-jdk11","6.0.10-ubuntu-jdk11","6.0.10","7-eap","5.16.11-alpine","5-alpine","5.16.11","5.16","5","5.16-alpine","5.16.10","5.16.10-alpine","5.16.9","5.16.9-alpine","5.16.8","5.16.8-alpine","5.16.7-alpine","5.16.7","5.16.6-alpine","5.16.6","5.16.5-alpine","5.16.5","5.9.2-alpine","5.9.2","5.9-alpine","5.9","5.9.1-alpine","5.9.1","5.9.0-alpine","5.9.0","5.8.3-alpine","5.8.3","5.8.2-alpine","5.8.2","5.8.1-alpine","5.8.1","5.8.0-alpine","5.8.0","5.7.4-alpine","5.7.4","5.7-alpine","5.7","5.7.3-alpine","5.7.3","5.7.2-alpine","5.7.2","5.7.1-alpine","5.7.1","5.7.0-alpine","5.7.0","5.6.6-alpine","5.6.6","5.6-alpine","5.6","5.6.5-alpine","5.6.5","5.6.4-alpine","5.6.4","5.6.3-alpine","5.6.3","5.6.2-alpine","5.6.2","5.6.1-alpine","5.6.1","5.6.0-alpine","5.6.0","5.5.9-alpine","5.5.9","5.5-alpine","5.5","5.5.8-alpine","5.5.8","5.5.7-alpine","5.5.7","5.5.6-alpine","5.5.6","5.5.5-alpine","5.5.5","5.5.4-alpine","5.5.4","5.5.3-alpine","5.5.3","5.5.2-alpine","5.5.2","5.5.1-alpine","5.5.1","5.5.0-alpine","5.5.0","5.4.9-alpine","5.4.9","5.4-alpine","5.4","5.4.8-alpine","5.4.8","5.4.7-alpine","5.4.7","5.4.6-alpine","5.4.6","5.4.4-alpine","5.4.4","5.4.3-alpine","5.4.3","5.4.2-alpine","5.4.2","5.4.1-alpine","5.4.1","5.4.0-alpine","5.4.0","5.3.7-alpine","5.3.7","5.3-alpine","5.3","5.3.6-alpine","5.3.6","5.3.5-alpine","5.3.5","5.3.4-alpine","5.3.4","5.3.3-alpine","5.3.3","5.3.2-alpine","5.3.2","5.3.1-alpine","5.3.1","5.3.0-alpine","5.3.0","5.2.8-alpine","5.2.8","5.2-alpine","5.2","5.2.7-alpine","5.2.7","5.2.6-alpine","5.2.6","5.2.5-alpine","5.2.5","5.2.4-alpine","5.2.4","5.2.3-alpine","5.2.3","5.2.2-alpine","5.2.2","5.2.1-alpine","5.2.1","5.2.0-alpine","5.2.0","5.16.4-alpine","5.16.4","5.16.3-alpine","5.16.3","5.16.2-alpine","5.16.2","5.16.1-alpine","5.16.1","5.16.0-alpine","5.16.0","5.15.3-alpine","5.15.3","5.15-alpine","5.15","5.15.2-alpine","5.15.2","5.15.1-alpine","5.15.1","5.15.0-alpine","5.15.0","5.14.4-alpine","5.14.4","5.14-alpine","5.14","5.14.3-alpine","5.14.3","5.14.2-alpine","5.14.2","5.14.1-alpine","5.14.1","5.14.0-alpine","5.14.0","5.13.6-alpine","5.13.6","5.13-alpine","5.13","5.13.5-alpine","5.13.5","5.13.4-alpine","5.13.4","5.13.3-alpine","5.13.3","5.13.1-alpine","5.13.1","5.13.0-alpine","5.13.0","5.12.4-alpine","5.12.4","5.12-alpine","5.12","5.12.3-alpine","5.12.3","5.12.2-alpine","5.12.2","5.12.1-alpine","5.12.1","5.12.0-alpine","5.12.0","5.11.4-alpine","5.11.4","5.11-alpine","5.11","5.11.3-alpine","5.11.3","5.11.2-alpine","5.11.2","5.11.1-alpine","5.11.1","5.10.4-alpine","5.10.4","5.10-alpine","5.10","5.10.3-alpine","5.10.3","5.10.2-alpine","5.10.2","5.10.1-alpine","5.10.1","5.10.0-alpine","5.10.0","5.1.9-alpine","5.1.9","5.1-alpine","5.1","5.1.8-alpine","5.1.8","5.1.7-alpine","5.1.7","5.1.6-alpine","5.1.6","5.1.5-alpine","5.1.5","5.1.4-alpine","5.1.4","5.1.3-alpine","5.1.3","5.1.2-alpine","5.1.2","5.1.1-alpine","5.1.1","5.1.0-alpine","5.1.0","5.0.9-alpine","5.0.9","5.0.8-alpine","5.0.8","5.0.7-alpine","5.0.7","5.0.6-alpine","5.0.6","5.0.5-alpine","5.0.5","5.0.4-alpine","5.0.4","5.0.2-alpine","5.0.2","5.0.10-alpine","5.0.10","5.0-alpine","5.0","5.0.1-alpine","5.0.1","5.0.0-alpine","5.0.0","4.14.5-alpine","4.14.5","4.1.6-alpine","4.1.6","4.1-alpine","4.1","4.11.2-alpine","4.11.2","4.11-alpine","4.11","5.8.4","5.8","4.14","4.13","4.12","4.10","4.9","4.8","4.6","4.7","4.4","4.5","4.3","4.2","4.0"];!function(u){u.JIRA="jira",u.CONFLUENCE="confluence",u.BITBUCKET="bitbucket",u.BAMBOO="bamboo"}($||($={}));const{P:q,activeProfiles:L}=l(r(process.argv)).parseSync(),B=q||L||void 0;class AMPS{static maven;static stop(){AMPS.maven&&S.maven.kill(0)}static async build(u){return new Promise(((t,d)=>{if(AMPS.maven){AMPS.maven.kill(0)||d(new Error("Failed to terminate existing Maven process"))}AMPS.maven=j("mvn",["package",...u],{cwd:s(),stdio:"inherit"}),AMPS.maven.on("exit",(u=>{AMPS.maven=null,0===u||130===u?t():d(new Error(`Maven exited with code ${u}`))}))}))}static isAtlassianPlugin=()=>{try{return AMPS.getNodes("//*[local-name()='packaging']").some((u=>"atlassian-plugin"===u.textContent))}catch(u){return!1}};static getApplicationVersion(){const u=B?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${B}']/..//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']`,!0):AMPS.getNodes("//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']",!0);if(u){const t=u.parentNode;if(t){const{plugin:u}=AMPS.toObject(t),d=u?.configuration?.productVersion;return d?this.doPropertyReplacement(d):void 0}}}static getApplication(){const u=AMPS.getApplications();if(1===u.length)return u[0];if(B){const u=AMPS.getApplications(B);if(1===u.length)return u[0]}return null}static getApplications(u){const t=new Set;return(u?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${u}']/..//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']`):AMPS.getNodes("//*[local-name()='groupId' and text()='com.atlassian.maven.plugins']")).forEach((u=>{const d=u.parentNode;if(d){const{plugin:u}=AMPS.toObject(d);u?.artifactId?.includes($.JIRA)?t.add($.JIRA):u?.artifactId?.includes($.CONFLUENCE)?t.add($.CONFLUENCE):u?.artifactId?.includes($.BAMBOO)?t.add($.BAMBOO):u?.artifactId?.includes($.BITBUCKET)&&t.add($.BITBUCKET)}})),Array.from(t)}static doPropertyReplacement(u){let t=u;const d=B?AMPS.getProperties(B):{};Object.entries(d).forEach((([u,d])=>{t=t.replaceAll(`\${${u}}`,d)}));const n=AMPS.getProperties();return Object.entries(n).forEach((([u,d])=>{t=t.replaceAll(`\${${u}}`,d)})),t}static getProperties(u){const t={};return(u?AMPS.getNodes(`//*[local-name()='profile']/*[local-name()='id' and text()='${u}']/..//*[local-name()='properties']`):AMPS.getNodes("//*[local-name()='properties']")).forEach((u=>{const{properties:d}=AMPS.toObject(u);Object.entries(d).forEach((([u,d])=>t[u]=d))})),t}static getNodes(u,t){if(b("./pom.xml")){const d=a("./pom.xml","utf8"),k=(new n).parseFromString(d,"text/xml"),j=t?o.select(u,k,!0):o.select(u,k,!1);return Array.isArray(j)||t?j:[]}return[]}static toObject(u){try{return(new e).parse((new k).serializeToString(u))}catch(u){return null}}}const U="AAABmg0ODAoPeNp9Ul1v0zAUfc+vsMRbJadJtjGpUiS2JJRONOlaB4SAB9e9W0xTu7JvCv33eImDOoR4vefe4/PhN59hR5bckPiWRNezKJ5FCZkvGUmiJA4yrZALLPkBUrHXotEnu5eBRW6b8KMUoCyw8xH6BVZs2KKce3TJpUJQXAkofh2lOeccIV1dfRhJC7fRXrJuwJzALPL0/qF+pI9XGaPz+uGGspvbkdRx8Awcr0nRdOCnlXnmSlqOUqv0DltureTKg6vOiIZb6J9PoviaRm9pHHs0M9Cf/Rv1Dv/SP5lMyorR99WartZVXmdsUZW03hQOSHtCF+n2TLAB4hlIoYTegSFHo3+AQPK1QTx+m02nzzrko+JQ6MO0HS4oDBffQ5JrojSSnbRo5LZDcMzSEtREdBb1AYwNRzsXff0JgjCwLjG/4mB5giE+JzhbF3esyOn9lxf1F2145a6OWu2V/qmC/2dVdoctmOqptk5PGid+XJx42w3NPPHWQuD9fXJbL8PktfLhU2Av+N2rYMY6uUEFpncY/AYCgfFAMCwCFHzkBlkGH/vRdTeeBSfUMzUDb4W2AhQyM893WPg2Q8oQAYRdBSyKeVUdog==X02jr",toAbsolutePath=u=>{const[,t]=process.argv,d=p(t),n=d.substring(0,d.indexOf("dcdx")+4);return c(n,u.replaceAll("../",""))},_={name:"shared",driver:"bridge"};let N=class Base extends v{options;sequelize=null;constructor(u){super(),this.options=u}async run(u,t){try{if(!this.sequelize)throw new Error("Database connection does not exist");await this.sequelize.query(u,{logging:t})}catch(t){console.error("An error occurred while trying to run the following SQL query:",u,t),d()}return null}async start(u=this.options.clean){console.log(`Starting instance of ${this.name} ⏳`),u&&await this.down(),await this.up(),this.emit(`${this.name}:up`);if(await this.waitUntilReady()){if(console.log(`Database is ready and accepting connections on localhost:${this.options.port} 🗄️`),await this.onDatabaseReady(),this.emit("db:ready"),this.options.logging){const u=await this.getServiceState();u&&await this.showDockerLogs(u.name)}}else console.log(`Failed to start database ${this.name} ⛔`),d(0)}async stop(u=this.options.prune){if(u)await this.down();else{const u=f(this.getDockerComposeConfig());await m({cwd:s(),configAsString:u,log:!0})}this.emit("db:stopped")}async onDatabaseReady(){}getDockerComposeConfig(){return{version:"3.8",services:{db:this.getService()},networks:{shared:_}}}async up(){const u=f(this.getDockerComposeConfig());return P({cwd:s(),configAsString:u,log:!0})}async down(){const u=f(this.getDockerComposeConfig());return g({cwd:s(),configAsString:u,commandOptions:["-v","--remove-orphans","--rmi","local"],log:!0})}async waitUntilReady(){try{const u="mssql"===this.name?"master":this.options.database;return this.sequelize=new C(u,this.options.username,this.options.password,{host:"localhost",port:this.options.port,dialect:this.name.replace("postgresql","postgres"),retry:{max:30,match:[D,E,x,O,M],backoffBase:1e3,backoffExponent:1},logging:!1}),this.sequelize.authenticate().then((()=>!0)).catch((u=>(console.log(u),!1)))}catch(u){return!1}}async getServiceState(){const u=f(this.getDockerComposeConfig());return(await w({configAsString:u,log:!1,commandOptions:["--all"]})).data.services.find((u=>u.name.includes(this.name)))}async showDockerLogs(u){return new Promise(((t,d)=>{j("docker",["logs","-f","-n","5000",u],{cwd:s(),stdio:"inherit"}).on("exit",(u=>0===u?t():d(new Error(`Docker exited with code ${u}`))))}))}};const I={port:1433,database:"dcdx",username:"sa",password:"DataCenterDX!",edition:"Developer",version:"2022"};class MSSQL extends N{name="mssql";driver="com.microsoft.sqlserver.jdbc.SQLServerDriver";options=I;version="2022";get url(){return`jdbc:sqlserver://db:${this.options.port};databaseName=${this.options.database};trustServerCertificate=true`}constructor(u=I){super({...I,...u})}async onDatabaseReady(){await this.run(`CREATE DATABASE ${this.options.database}`),await this.run(`ALTER DATABASE ${this.options.database} COLLATE SQL_Latin1_General_CP1_CS_AS`),await this.run(`ALTER DATABASE ${this.options.database} SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;`)}getService=()=>({image:`mcr.microsoft.com/mssql/server:${this.version}-latest`,ports:[`${this.options.port||1433}:1433`],environment:{ACCEPT_EULA:"y",MSSQL_SA_PASSWORD:this.options.password||"dcdx",MSSQL_PID:this.options.edition},networks:{shared:{aliases:["db","database"]}}})}const J={port:3306,database:"dcdx",username:"dcdx",password:"dcdx",version:"8.0"};class MySQL extends N{name="mysql";driver="com.mysql.jdbc.Driver";options=J;version="8.0";get url(){return`jdbc:mysql://db:${this.options.port}/${this.options.database}?sessionVariables=transaction_isolation='READ-COMMITTED'`}constructor(u=J){super({...J,...u})}async onDatabaseReady(){await this.run(`ALTER DATABASE ${this.options.database} CHARACTER SET 'utf8mb4' COLLATE utf8mb4_bin`)}getService=()=>({image:`mysql:${this.version}`,ports:[`${this.options.port||3306}:3306`],environment:{MYSQL_ROOT_PASSWORD:this.options.password||"dcdx",MYSQL_USER:this.options.username||"dcdx",MYSQL_PASSWORD:this.options.password||"dcdx",MYSQL_DATABASE:this.options.database||"dcdx"},command:["--log_bin_trust_function_creators=1"],networks:{shared:{aliases:["db","database"]}}})}const Q={version:"15",database:"dcdx",port:5432,username:"dcdx",password:"dcdx"};class Postgres extends N{name="postgresql";driver="org.postgresql.Driver";options=Q;version="15";get url(){return`jdbc:postgresql://db:${this.options.port}/${this.options.database}`}constructor(u=Q){super({...Q,...u})}getService=()=>({image:`postgres:${this.version}`,ports:[`${this.options.port||5432}:5432`],environment:{POSTGRES_USER:this.options.username||"dcdx",POSTGRES_PASSWORD:this.options.password||"dcdx",POSTGRES_DB:this.options.database||"dcdx",POSTGRES_HOST_AUTH_METHOD:"md5",POSTGRES_INITDB_ARGS:"--encoding=UTF-8 --lc-collate=C --lc-ctype=C"},networks:{shared:{aliases:["db","database"]}}})}const F=c(y(),".dcdx");class Base extends v{options;constructor(u){super(),this.options=u}get baseUrl(){let u="http://localhost";return this.options.port&&(u+=`:${this.options.port}`),this.options.contextPath?`${u}/${this.options.contextPath}`:u}getDatabaseEngine(u){switch(u){case"postgresql":return new Postgres;case"mssql":return new MSSQL;case"mysql":return new MySQL}}async start(){this.options.clean&&await this.down(),await this.build(this.options.version),await this.database.start(this.options.clean),await this.up()}async stop(){if(await this.database.stop(this.options.prune),this.options.prune)await this.down();else{const u=f(this.getDockerComposeConfig());await m({cwd:s(),configAsString:u,log:!0})}this.emit(`${this.name}:stopped`)}async reset(){await this.database.stop(!0),await this.down()}async cp(u){const t=await this.getServiceState();if(t&&t.state.toLowerCase().startsWith("up")){const t=this.getDockerComposeConfig(),d=f(t);await S("cp",[u,`${this.name}:/opt/quickreload/`],{cwd:s(),configAsString:d,log:!1})}}async isApplicationReady(){try{const u=await h.get(`${this.baseUrl}/status`,{validateStatus:()=>!0}).catch((()=>null));if(u&&200===u.status){const{data:t}=u;if("FIRST_RUN"===t.state||"RUNNING"===t.state)return console.log(`The application ${this.name} is ready on ${this.baseUrl} 🎉`),!0}return!1}catch(u){return!1}}getDockerComposeConfig(){return{version:"3.8",services:{[this.name]:this.getService()},networks:{shared:_}}}async up(){const u=this.getDockerComposeConfig(),t=f(u);await A({cwd:s(),configAsString:t,log:!0}),this.emit(`${this.name}:up`);await this.waitUntilReady()?(this.emit(`${this.name}:ready`),await this.tailApplicationLogs()):console.log(`Failed to start ${this.name} ⛔`),d(0)}async down(){const u=f(this.getDockerComposeConfig());await g({cwd:s(),configAsString:u,commandOptions:["-v","--remove-orphans","--rmi","local"],log:!0})}async getServiceState(){const u=f(this.getDockerComposeConfig());return(await w({configAsString:u,log:!1,commandOptions:["--all"]})).data.services.find((u=>u.name.includes(this.name)))}async waitUntilReady(u=0){console.log(`Waiting for ${this.name} to become available... ${u}s`);const t=await this.getServiceState();return!!(t&&t.state.toLowerCase().startsWith("up")&&await this.isApplicationReady())||(u>=300?(console.error(`A timeout occurred while waiting for ${this.name} to become available ⛔`),t&&await this.showDockerLogs(t.name),!1):(await new Promise((u=>setTimeout(u,1e3))),this.waitUntilReady(u+1)))}getDockerRepositoryUrl(){return`https://bitbucket.org/atlassian-docker/docker-${"jira"===this.name?"atlassian-jira":"bamboo"===this.name?`${this.name}-server`:`atlassian-${this.name}-server`}.git`}async build(u){const t=this.getDockerRepositoryUrl(),d=c(F,this.name,"source");b(d)?await R({baseDir:d}).pull({"--recurse-submodule":null}):(i(c(F,this.name),{recursive:!0}),await R().clone(t,d,{"--recurse-submodule":null})),await new Promise(((t,n)=>{j("docker",["build","-t",`dcdx/${this.name}:${u}`,"--build-arg",`${this.name.toUpperCase()}_VERSION=${u}`,"."],{cwd:d,stdio:"inherit"}).on("exit",(u=>0===u?t():n(new Error(`Docker exited with code ${u}`))))}))}async tailApplicationLogs(){const u=await this.getServiceState();u&&u.state.toLowerCase().startsWith("up")&&await this.showApplicationLogs(u.name).catch((()=>null))}async showDockerLogs(u){return new Promise(((t,d)=>{j("docker",["logs","-f","-n","5000",u],{cwd:s(),stdio:"inherit"}).on("exit",(u=>0===u?t():d(new Error(`Docker exited with code ${u}`))))}))}async showApplicationLogs(u){return new Promise(((t,d)=>{j("docker",["exec","-i",u,"tail","-F","-n","5000",this.logFilePath],{cwd:s(),stdio:"inherit"}).on("exit",(u=>0===u?t():d(new Error(`Docker exited with code ${u}`))))}))}}class Bitbucket extends Base{name=$.BITBUCKET;database;logFilePath="/var/atlassian/application-data/bitbucket/log/atlassian-bitbucket.log";constructor(u){super(u),this.database=this.getDatabaseEngine(u.database)}getService(){const u=this.getVolumes(),t=this.getEnvironmentVariables();return{build:{context:toAbsolutePath("../../assets"),dockerfile_inline:`\nFROM dcdx/${this.name}:${this.options.version}\nCOPY ./quickreload-5.0.2.jar /var/atlassian/application-data/bitbucket/plugins/installed-plugins/quickreload-5.0.2.jar\nCOPY ./mysql-connector-j-8.3.0.jar /var/atlassian/application-data/bitbucket/lib/mysql-connector-j-8.3.0.jar\nRUN echo "/opt/quickreload" > /var/atlassian/application-data/bitbucket/quickreload.properties; mkdir -p /opt/quickreload; chown -R bitbucket:bitbucket /opt/quickreload;\n\nRUN mkdir -p /var/atlassian/application-data/bitbucket/shared; touch /var/atlassian/application-data/bitbucket/shared/bitbucket.properties; echo "setup.license=${this.options.license||U}" >> /var/atlassian/application-data/bitbucket/shared/bitbucket.properties;\n\nRUN chown -R bitbucket:bitbucket /var/atlassian/application-data/bitbucket`},ports:[`${this.options.port||80}:7990`,...this.options.debug?["5005:5005"]:[]],environment:Object.keys(t).length>0?t:void 0,volumes:u.length>0?u:void 0,networks:["shared"]}}getEnvironmentVariables(){return{...this.options.debug?{JVM_SUPPORT_RECOMMENDED_ARGS:this.getJVMArgs()}:"",JDBC_URL:this.database.url,JDBC_USER:this.database.options.username,JDBC_PASSWORD:this.database.options.password,JDBC_DRIVER:`${this.database.driver}`}}getJVMArgs(){const u=[];return this.options.debug&&(u.push("-Dupm.plugin.upload.enabled=true"),u.push("-Xdebug"),u.push("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005")),this.options.quickReload&&u.push("-Dquickreload.dirs=/opt/quickreload"),u.join(" ")}getVolumes(){return[...this.options.quickReload?[`${this.options.quickReload}:/opt/quickreload`]:""]}}const V=AMPS.getApplicationVersion()||"latest";(async()=>{const d=u.showHelpAfterError(!0).addOption(new t("-v, --version <version>","The version of the host application").choices(T).default(V)).addOption(new t("-d, --database <name>","The database engine to remove data from").choices(["postgresql","mysql","mssql"]).default("postgresql")).parse(process.argv).opts(),n=new Bitbucket({version:d.version,database:d.database});await n.reset()})(),process.on("SIGINT",(()=>{console.log("Received term signal, trying to stop gracefully 💪"),d()}));
|