From 91e7fad0f7ef493e75195b6ddb86d88679833776 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 5 Aug 2020 02:19:38 +0200 Subject: [PATCH 1/3] chore(scaffolder): fixing path to now be the spotify repo to load golang template --- plugins/scaffolder-backend/scripts/mock-data.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/scripts/mock-data.sh b/plugins/scaffolder-backend/scripts/mock-data.sh index 8c73ff9378..f18d4b4838 100755 --- a/plugins/scaffolder-backend/scripts/mock-data.sh +++ b/plugins/scaffolder-backend/scripts/mock-data.sh @@ -17,5 +17,5 @@ curl \ --location \ --request POST 'localhost:7000/catalog/locations' \ --header 'Content-Type: application/json' \ - --data-raw "{\"type\": \"github\", \"target\": \"https://github.com/benjdlambert/cookiecutter-golang/blob/master/template.yaml\"}" + --data-raw "{\"type\": \"github\", \"target\": \"https://github.com/spotify/cookiecutter-golang/blob/master/template.yaml\"}" echo From 31a92961e94203c0a988da491a77f9f69504fe95 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 5 Aug 2020 03:42:47 +0200 Subject: [PATCH 2/3] chore(java): simple jenkins workflow --- .../.github/workflows/build.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/.github/workflows/build.yml diff --git a/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/.github/workflows/build.yml b/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/.github/workflows/build.yml new file mode 100644 index 0000000000..e8c6037756 --- /dev/null +++ b/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/.github/workflows/build.yml @@ -0,0 +1,16 @@ +name: Java CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Maven + run: mvn -B package --file pom.xml From 854e78d056c1607c611aa9561a6daf934b8953ad Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 5 Aug 2020 05:02:11 +0200 Subject: [PATCH 3/3] chore: enable github actions widget for scaffolding items that can build with github actions --- .../.github/workflows/build.yml | 7 +++++- .../component-info.yaml | 3 +++ .../.github/workflows/build.yml | 23 +++++++++++-------- .../component-info.yaml | 3 +++ 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/.github/workflows/build.yml b/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/.github/workflows/build.yml index e3ca9f44e2..33dd3436d5 100644 --- a/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/.github/workflows/build.yml +++ b/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/.github/workflows/build.yml @@ -1,6 +1,11 @@ name: Frontend CI -on: [push, pull_request] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + jobs: build: diff --git a/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/component-info.yaml b/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/component-info.yaml index 5f479d9e47..65a77d4a27 100644 --- a/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/component-info.yaml +++ b/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/component-info.yaml @@ -3,6 +3,9 @@ kind: Component metadata: name: {{cookiecutter.component_id}} description: {{cookiecutter.description}} + annotations: + github.com/project-slug: {{cookiecutter.storePath}} + backstage.io/github-actions-id: {{cookiecutter.storePath}} spec: type: website lifecycle: experimental diff --git a/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/.github/workflows/build.yml b/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/.github/workflows/build.yml index e8c6037756..04e1d10b47 100644 --- a/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/.github/workflows/build.yml +++ b/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/.github/workflows/build.yml @@ -1,16 +1,21 @@ -name: Java CI +name: Java CI with Maven -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: build: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Build with Maven - run: mvn -B package --file pom.xml + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Build with Maven + run: mvn -B package --file pom.xml diff --git a/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/component-info.yaml b/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/component-info.yaml index f796df8820..15c8fdcfff 100644 --- a/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/component-info.yaml +++ b/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/{{cookiecutter.component_id}}/component-info.yaml @@ -3,6 +3,9 @@ kind: Component metadata: name: {{cookiecutter.component_id}} description: {{cookiecutter.description}} + annotations: + github.com/project-slug: {{cookiecutter.storePath}} + backstage.io/github-actions-id: {{cookiecutter.storePath}} spec: type: service lifecycle: experimental