-
Notifications
You must be signed in to change notification settings - Fork 195
Create build.yml #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ArpithaJK4
wants to merge
11
commits into
mohamed-taman:master
Choose a base branch
from
ArpithaJK4:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Create build.yml #92
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a6f01e6
Create build.yml
ArpithaJK4 5beeddc
Update build.yml
ArpithaJK4 61a8d4e
Update build.yml
ArpithaJK4 3b4f4cf
Update build.yml
ArpithaJK4 ab2e3f5
Update build.yml
ArpithaJK4 2d3ef16
Update build.yml
ArpithaJK4 379a925
Update pom.xml
ArpithaJK4 f09d528
Update pom.xml
ArpithaJK4 fbd3eff
Update build.yml
ArpithaJK4 8cea3bb
Update build.yml
ArpithaJK4 1245681
Update build.yml
ArpithaJK4 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| name: CI - Multi Compose Builder | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| compose_file: | ||
| description: 'Choose docker-compose file' | ||
| required: true | ||
| default: 'docker-compose.yml' | ||
| type: choice | ||
| options: | ||
| - docker-compose.yml | ||
| - docker-compose-partitions.yml | ||
| - dockercompose.kafka.yml | ||
|
|
||
| push: | ||
| branches: [main, master, patch-1] | ||
| pull_request: | ||
| branches: [main, master, patch-1] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
|
|
||
| - name: Configure Maven Central Mirror | ||
| run: | | ||
| mkdir -p ~/.m2 | ||
| cat > ~/.m2/settings.xml <<EOF | ||
| <settings> | ||
| <profiles> | ||
| <profile> | ||
| <id>central</id> | ||
| <repositories> | ||
| <repository> | ||
| <id>central</id> | ||
| <url>https://repo.maven.apache.org/maven2</url> | ||
| <releases><enabled>true</enabled></releases> | ||
| <snapshots><enabled>false</enabled></snapshots> | ||
| </repository> | ||
| </repositories> | ||
| </profile> | ||
| </profiles> | ||
| <activeProfiles> | ||
| <activeProfile>central</activeProfile> | ||
| </activeProfiles> | ||
| </settings> | ||
| EOF | ||
|
|
||
| - name: 🧹 Auto-fix malformed pom.xml files | ||
| run: | | ||
| find . -name "pom.xml" | while read file; do | ||
| awk 'BEGIN{fixed=0} NR==1 && $0 !~ /^<\?xml/{fixed=1; next} {if(!fixed || $0 ~ /^<\?xml/){print}}' "$file" > "$file.fixed" && mv "$file.fixed" "$file" | ||
| done | ||
|
|
||
| - name: Force remove SNAPSHOT of springfox-swagger2 | ||
| run: | | ||
| mvn dependency:purge-local-repository \ | ||
| -DmanualInclude="io.springfox:springfox-swagger2" | ||
|
|
||
| - name: Build Spring Boot apps | ||
| run: mvn clean package -DskipTests --no-transfer-progress | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v2 | ||
|
|
||
| - name: Build & Run Docker Compose | ||
| run: | | ||
| COMPOSE_FILE="${{ github.event.inputs.compose_file || 'docker-compose.yml' }}" | ||
| docker-compose -f "$COMPOSE_FILE" up --build -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,44 +1,83 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <parent> | ||
| <groupId>com.siriusxi.ms.store</groupId> | ||
| <artifactId>store-build-chassis</artifactId> | ||
| <version>1.0-SNAPSHOT</version> | ||
| <relativePath>../../store-base/store-build-chassis/pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <artifactId>store-api</artifactId> | ||
| <version>1.0-SNAPSHOT</version> | ||
| <name>Store APIs</name> | ||
| <description>Project that define all Springy Store DTOs and REST APIs contracts</description> | ||
| <packaging>jar</packaging> | ||
|
|
||
| <properties> | ||
| <!-- Libraries versions --> | ||
| <spring.boot.dependencies.version>2.3.0.M4</spring.boot.dependencies.version> | ||
| </properties> | ||
|
|
||
| <dependencyManagement> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-dependencies</artifactId> | ||
| <version>${spring.boot.dependencies.version}</version> | ||
| <scope>import</scope> | ||
| <type>pom</type> | ||
| </dependency> | ||
| </dependencies> | ||
| </dependencyManagement> | ||
|
|
||
| <dependencies> | ||
| <!-- Start - API documentation dependencies --> | ||
| <dependency> | ||
| <groupId>io.springfox</groupId> | ||
| <artifactId>springfox-swagger2</artifactId> | ||
| </dependency> | ||
| </dependencies> | ||
| </project> | ||
| name: CI - Multi Compose Builder | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| compose_file: | ||
| description: 'Choose docker-compose file' | ||
| required: true | ||
| default: 'docker-compose.yml' | ||
| type: choice | ||
| options: | ||
| - docker-compose.yml | ||
| - docker-compose-partitions.yml | ||
| - dockercompose.kafka.yml | ||
|
|
||
| push: | ||
| branches: [main, master, patch-1] | ||
| pull_request: | ||
| branches: [main, master, patch-1] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
|
|
||
| - name: Configure Maven Central Mirror | ||
| run: | | ||
| mkdir -p ~/.m2 | ||
| cat > ~/.m2/settings.xml <<EOF | ||
| <settings> | ||
| <profiles> | ||
| <profile> | ||
| <id>central</id> | ||
| <repositories> | ||
| <repository> | ||
| <id>central</id> | ||
| <url>https://repo.maven.apache.org/maven2</url> | ||
| <releases><enabled>true</enabled></releases> | ||
| <snapshots><enabled>false</enabled></snapshots> | ||
| </repository> | ||
| </repositories> | ||
| </profile> | ||
| </profiles> | ||
| <activeProfiles> | ||
| <activeProfile>central</activeProfile> | ||
| </activeProfiles> | ||
| </settings> | ||
| EOF | ||
|
|
||
| - name: Force remove invalid SNAPSHOT of springfox-swagger2 | ||
| run: | | ||
| mvn dependency:purge-local-repository \ | ||
| -DmanualInclude="io.springfox:springfox-swagger2" | ||
|
|
||
| - name: Fix Springfox version in pom.xml | ||
| run: | | ||
| find . -name "pom.xml" -exec sed -i 's/<version>3.0.0-SNAPSHOT<\/version>/<version>3.0.0<\/version>/g' {} \; | ||
|
|
||
| - name: Ensure Java 17 compatibility in compiler plugin | ||
| run: | | ||
| find . -name "pom.xml" -exec sed -i 's/<source>15<\/source>/<source>17<\/source>/g' {} \; | ||
| find . -name "pom.xml" -exec sed -i 's/<target>15<\/target>/<target>17<\/target>/g' {} \; | ||
| find . -name "pom.xml" -exec sed -i '/--enable-preview/d' {} \; | ||
|
|
||
| - name: Build Spring Boot apps | ||
| run: mvn clean package -DskipTests --no-transfer-progress | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v2 | ||
|
|
||
| - name: Build & Run Docker Compose | ||
| run: | | ||
| COMPOSE_FILE="${{ github.event.inputs.compose_file || 'docker-compose.yml' }}" | ||
| docker-compose -f "$COMPOSE_FILE" up --build -d | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ArpithaJK4,
Can you please check this file. looks like a wrong commit.