From 904b4e85471d9128013b3d85db27eaa710822f6f Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 23 Jan 2022 15:54:57 -0800 Subject: [PATCH] Add docker publish --- bitbucket-pipelines.yml | 53 ++++++++++++++++++++++++----------------- distribution/README.md | 6 ++--- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 84237590..d13a53bc 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -8,25 +8,34 @@ image: maven:3.6.3 pipelines: - default: - - parallel: - - step: - name: Build and Test - caches: - - node - - maven - script: - - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash - - . $HOME/.nvm/nvm.sh && nvm install node - # Workaround for jaxb plugin bug on java 11 or higher. - - export MAVEN_OPTS="--illegal-access=permit" - - mvn -B verify --file pom.xml - after-script: - # Collect checkstyle results, if any, and convert to Bitbucket Code Insights. - - pipe: atlassian/checkstyle-report:0.3.0 - - step: - name: Security Scan - script: - # Run a security scan for sensitive data. - # See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security - - pipe: atlassian/git-secrets-scan:0.5.1 \ No newline at end of file + branches: + '{master,develop}': + - step: + name: Build and Test + caches: + - node + - maven + script: + # Compile sources ... + - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash + - . $HOME/.nvm/nvm.sh && nvm install node + - mvn -B verify --file pom.xml + after-script: + # Collect checkstyle results, if any, and convert to Bitbucket Code Insights. + - pipe: atlassian/checkstyle-report:0.3.0 + - step: + name: Security Scan + script: + # Run a security scan for sensitive data. + # See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security + - pipe: atlassian/git-secrets-scan:0.5.1 + - step: + name: Docker publish + script: + - docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD + - docker build -t veigap/wisemapping:latest -f distribution/Dockerfile wise-webapp/target/ + services: + - docker + caches: + - docker + diff --git a/distribution/README.md b/distribution/README.md index 2acf7131..32908080 100644 --- a/distribution/README.md +++ b/distribution/README.md @@ -9,7 +9,7 @@ There are multiple ways to run WiseMapping depending on your database configurat ## Option 1: Running HSQL within the image storage -> docker run -it --rm -p 8080:8080 veigap/wisemapping:latest> +> $ docker run -it --rm -p 8080:8080 veigap/wisemapping:latest> Then, open your browser at `http://localhost:8888`. A default user is available for testing `test@wisemapping.com` and password `test`. @@ -17,7 +17,7 @@ Then, open your browser at `http://localhost:8888`. A default user is available ## Option 2: Running HSQL with mounted directory -> docker run -it --rm -p 8080:8080 veigap/wisemapping:latest +> $ docker run -it --rm -p 8080:8080 veigap/wisemapping:latest ## Option 3: External MySQL/PostgreSQL @@ -30,7 +30,7 @@ Depending on the database your want to configure, you can create initialization The next step is configure the WiseMapping for the database and credentials. Download `app.properties` configuration file and configure the required sections: -> $ curl https://bitbucket.org/wisemapping/wisemapping-open-source/raw/644b7078d790220c7844b732a83d45495f11d64e/wise-webapp/src/main/webapp/WEB-INF/app.properties' +> $ curl https://bitbucket.org/wisemapping/wisemapping-open-source/raw/644b7078d790220c7844b732a83d45495f11d64e/wise-webapp/src/main/webapp/WEB-INF/app.properties ### Starting the application