From 2ee4a1bcd011693836501949ab83dd766c0e96cb Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 3 Jan 2022 16:22:28 -0800 Subject: [PATCH] Update pipeline --- bitbucket-pipelines.yml | 43 ++++++++++++++++++---------------------- bitbucket-pipelines2.yml | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 24 deletions(-) create mode 100644 bitbucket-pipelines2.yml diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 5ea6e173..a7568f32 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -10,29 +10,24 @@ image: maven:3.6.3 pipelines: default: - parallel: - - step: - name: Build and Test - caches: - - maven - - node - script: - - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash - - . $HOME/.nvm/nvm.sh && nvm install node - - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2 || true - - export PATH=$HOME/.yarn/bin:$PATH - # Workaround for jaxb plugin bug on java 11 or higher. - - export MAVEN_OPTS="--illegal-access=permit" - - yarn --version - - mvn -B verify --file pom.xml install - after-script: - # Collect checkstyle results, if any, and convert to Bitbucket Code Insights. - - pipe: atlassian/checkstyle-report:0.2.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.4.3 + name: Build and Test + caches: + - node + - npm + - 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: - runs-on: self.hosted - script: echo hello \ No newline at end of file + 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 diff --git a/bitbucket-pipelines2.yml b/bitbucket-pipelines2.yml new file mode 100644 index 00000000..5ea6e173 --- /dev/null +++ b/bitbucket-pipelines2.yml @@ -0,0 +1,38 @@ +# Template maven-build + +# This template allows you to test and build your Java project with Maven. +# The workflow allows running tests, code checkstyle and security scans on the default branch. + +# Prerequisites: pom.xml and appropriate project structure should exist in the repository. + +image: maven:3.6.3 + +pipelines: + default: + - parallel: + - step: + name: Build and Test + caches: + - maven + - node + script: + - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash + - . $HOME/.nvm/nvm.sh && nvm install node + - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2 || true + - export PATH=$HOME/.yarn/bin:$PATH + # Workaround for jaxb plugin bug on java 11 or higher. + - export MAVEN_OPTS="--illegal-access=permit" + - yarn --version + - mvn -B verify --file pom.xml install + after-script: + # Collect checkstyle results, if any, and convert to Bitbucket Code Insights. + - pipe: atlassian/checkstyle-report:0.2.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.4.3 + - step: + runs-on: self.hosted + script: echo hello \ No newline at end of file