From aa0014229b83fdc9be88dee13e2928aaf10dc543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Mon, 27 May 2024 15:17:48 +0200 Subject: [PATCH 1/3] [CI] Include zuul.d/jobs.yaml as a trigger for image jobs Zuul ignored the reconfiguration of the job vars and did not run the promotion job in https://review.opendev.org/c/nebulous/activemq/+/919799/4 Change-Id: Ie442d4d1447dfc3727d0510379ada96e0cd676b3 --- zuul.d/jobs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 166e228..ca5a766 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -8,6 +8,7 @@ - nebulous-exponential-smoothing-predictor-container-images description: Build the container images. files: &image_files + - ^zuul\.d/jobs\.yaml$ - ^exponential-smoothing-predictor/ vars: &image_vars promote_container_image_job: nebulous-exponential-smoothing-predictor-upload-container-images From e7eac99248bd48f6b45ba82e1f5e1ceb8e5edf71 Mon Sep 17 00:00:00 2001 From: jmarchel7bulls <123368854+jmarchel7bulls@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:24:04 +0200 Subject: [PATCH 2/3] transtion from zuul to gha (#1) --- .github/workflows/ci.yml | 18 +++++ java-spring-boot-demo/.gitignore | 33 --------- java-spring-boot-demo/Dockerfile | 15 ---- java-spring-boot-demo/pom.xml | 42 ----------- .../com/example/demo/DemoApplication.java | 13 ---- .../java/com/example/demo/DemoController.java | 14 ---- .../src/main/resources/application.properties | 0 .../example/demo/DemoApplicationTests.java | 13 ---- zuul.d/jobs.yaml | 73 ------------------- zuul.d/project.yaml | 20 ----- 10 files changed, 18 insertions(+), 223 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 java-spring-boot-demo/.gitignore delete mode 100644 java-spring-boot-demo/Dockerfile delete mode 100644 java-spring-boot-demo/pom.xml delete mode 100644 java-spring-boot-demo/src/main/java/com/example/demo/DemoApplication.java delete mode 100644 java-spring-boot-demo/src/main/java/com/example/demo/DemoController.java delete mode 100644 java-spring-boot-demo/src/main/resources/application.properties delete mode 100644 java-spring-boot-demo/src/test/java/com/example/demo/DemoApplicationTests.java delete mode 100644 zuul.d/jobs.yaml delete mode 100644 zuul.d/project.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a7f514f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: CI +on: + push: + branches: + - main + - r[1-9] + pull_request: + branches: + - main + - r[1-9] +jobs: + build-and-push-exponential-smoothing-predictor: + name: Build and push exponential-smoothing-predictor + uses: eu-nebulous/github-actions/.github/workflows/build-and-push-container-image.yml@main + with: + context: exponential-smoothing-predictor + image-name: exponential-smoothing-predictor + secrets: inherit diff --git a/java-spring-boot-demo/.gitignore b/java-spring-boot-demo/.gitignore deleted file mode 100644 index 549e00a..0000000 --- a/java-spring-boot-demo/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ diff --git a/java-spring-boot-demo/Dockerfile b/java-spring-boot-demo/Dockerfile deleted file mode 100644 index 427e30e..0000000 --- a/java-spring-boot-demo/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# -# Build stage -# -FROM docker.io/library/maven:3.9.2-eclipse-temurin-17 AS build -COPY src /home/app/src -COPY pom.xml /home/app -RUN mvn -f /home/app/pom.xml clean package - -# -# Package stage -# -FROM docker.io/library/eclipse-temurin:17-jre -COPY --from=build /home/app/target/demo-0.0.1-SNAPSHOT.jar /usr/local/lib/demo.jar -EXPOSE 8080 -ENTRYPOINT ["java","-jar","/usr/local/lib/demo.jar"] diff --git a/java-spring-boot-demo/pom.xml b/java-spring-boot-demo/pom.xml deleted file mode 100644 index 76e0f0e..0000000 --- a/java-spring-boot-demo/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 3.1.0 - - - com.example - demo - 0.0.1-SNAPSHOT - demo - Demo project for Spring Boot - - 17 - - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - diff --git a/java-spring-boot-demo/src/main/java/com/example/demo/DemoApplication.java b/java-spring-boot-demo/src/main/java/com/example/demo/DemoApplication.java deleted file mode 100644 index 094d95b..0000000 --- a/java-spring-boot-demo/src/main/java/com/example/demo/DemoApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class DemoApplication { - - public static void main(String[] args) { - SpringApplication.run(DemoApplication.class, args); - } - -} diff --git a/java-spring-boot-demo/src/main/java/com/example/demo/DemoController.java b/java-spring-boot-demo/src/main/java/com/example/demo/DemoController.java deleted file mode 100644 index 61a5075..0000000 --- a/java-spring-boot-demo/src/main/java/com/example/demo/DemoController.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.demo; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class DemoController { - - @RequestMapping("/") - public Object root() { - return null; - } - -} diff --git a/java-spring-boot-demo/src/main/resources/application.properties b/java-spring-boot-demo/src/main/resources/application.properties deleted file mode 100644 index e69de29..0000000 diff --git a/java-spring-boot-demo/src/test/java/com/example/demo/DemoApplicationTests.java b/java-spring-boot-demo/src/test/java/com/example/demo/DemoApplicationTests.java deleted file mode 100644 index eaa9969..0000000 --- a/java-spring-boot-demo/src/test/java/com/example/demo/DemoApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.demo; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class DemoApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml deleted file mode 100644 index ca5a766..0000000 --- a/zuul.d/jobs.yaml +++ /dev/null @@ -1,73 +0,0 @@ -- job: - name: nebulous-exponential-smoothing-predictor-build-container-images - parent: nebulous-build-container-images - dependencies: - - name: opendev-buildset-registry - soft: false - provides: - - nebulous-exponential-smoothing-predictor-container-images - description: Build the container images. - files: &image_files - - ^zuul\.d/jobs\.yaml$ - - ^exponential-smoothing-predictor/ - vars: &image_vars - promote_container_image_job: nebulous-exponential-smoothing-predictor-upload-container-images - container_images: - - context: exponential-smoothing-predictor - registry: quay.io - repository: quay.io/nebulous/exponential-smoothing-predictor - namespace: nebulous - repo_shortname: exponential-smoothing-predictor - repo_description: "" - -- job: - name: nebulous-exponential-smoothing-predictor-upload-container-images - parent: nebulous-upload-container-images - dependencies: - - name: opendev-buildset-registry - soft: false - provides: - - nebulous-exponential-smoothing-predictor-container-images - description: Build and upload the container images. - files: *image_files - vars: *image_vars - -- job: - name: nebulous-exponential-smoothing-predictor-promote-container-images - parent: nebulous-promote-container-images - description: Promote previously uploaded container images. - files: *image_files - vars: *image_vars - -- job: - name: nebulous-exponential-smoothing-predictor-hadolint - parent: nebulous-hadolint - description: Run Hadolint on Dockerfile(s). - vars: - dockerfiles: - - exponential-smoothing-predictor/Dockerfile - -- job: - name: nebulous-exponential-smoothing-predictor-helm-lint - parent: nebulous-helm-lint - description: Run helm lint on Helm charts. - vars: - helm_charts: - - ./charts/nebulous-exponential-smoothing-predictor - -- job: - name: nebulous-exponential-smoothing-predictor-apply-helm-charts - parent: nebulous-apply-helm-charts - dependencies: - - name: opendev-buildset-registry - soft: false - - name: nebulous-exponential-smoothing-predictor-build-container-images - soft: true - - name: nebulous-exponential-smoothing-predictor-upload-container-images - soft: true - requires: - - nebulous-exponential-smoothing-predictor-container-images - description: Deploy a Kubernetes cluster and apply charts. - vars: - helm_charts: - nebulous-exponential-smoothing-predictor: ./charts/nebulous-exponential-smoothing-predictor diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml deleted file mode 100644 index 266089d..0000000 --- a/zuul.d/project.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- project: - check: - jobs: - - opendev-buildset-registry - - nebulous-exponential-smoothing-predictor-helm-lint - - nebulous-exponential-smoothing-predictor-build-container-images - - nebulous-exponential-smoothing-predictor-hadolint - - nebulous-platform-apply-helm-charts - - nox-linters - gate: - jobs: - - opendev-buildset-registry - - nebulous-exponential-smoothing-predictor-helm-lint - - nebulous-exponential-smoothing-predictor-upload-container-images - - nebulous-exponential-smoothing-predictor-hadolint - - nebulous-platform-apply-helm-charts - - nox-linters - promote: - jobs: - - nebulous-exponential-smoothing-predictor-promote-container-images From 2915aca6d14c4e27c792b2aad888da39cfcca2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Mon, 1 Jul 2024 19:22:48 +0200 Subject: [PATCH 3/3] Drop .gitreview This is obsolete and confusing on GitHub; was used with OpenDev's Gerrit. --- .gitreview | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .gitreview diff --git a/.gitreview b/.gitreview deleted file mode 100644 index 21767f4..0000000 --- a/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=review.opendev.org -port=29418 -project=nebulous/exponential-smoothing-predictor.git -defaultbranch=master