Skip to content

Release/v1.0.0 #135

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
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 1 addition & 36 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ name: CI

on:
pull_request:
branches:
- main
- issue-101-cicd
push:
branches:
- main
- issue-101-cicd

jobs:
build:
Expand Down Expand Up @@ -76,39 +70,10 @@ jobs:
run: mvn -B package --file pom.xml -DskipTests

- name: Docker Build
run: docker build -t ghcr.io/${{ secrets.REGISTRY_USERNAME }}/aeroplanner-rest-api:latest -t ghcr.io/${{ secrets.REGISTRY_USERNAME }}/aeroplanner-rest-api:0.0.1-SNAPSHOT .
run: docker build -t ghcr.io/${{ secrets.REGISTRY_USERNAME }}/aeroplanner-rest-api:latest -t ghcr.io/${{ secrets.REGISTRY_USERNAME }}/aeroplanner-rest-api:1.0.0 .

- name: Docker login
run: docker login ghcr.io -u ${{ secrets.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_TOKEN }}

- name: Docker push
run: docker push ghcr.io/${{ secrets.REGISTRY_USERNAME }}/aeroplanner-rest-api --all-tags

# sonar:
# runs-on: ubuntu-latest
#
# needs: test
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
#
# - name: Set up JDK 17
# uses: actions/setup-java@v2
# with:
# java-version: '17'
# distribution: 'adopt'
# architecture: 'x64'
#
# - name: Install SonarLint CLI
# run: |
# mkdir sonarlint-cli
# cd sonarlint-cli
# curl -L -o sonarlint-cli.zip https://binaries.sonarsource.com/Distribution/sonarlint-cli-1.0.zip
# ls .
# unzip sonarlint-cli.zip
# chmod +x sonarlint-cli-1.0/bin/sonarlint
#
# - name: Run SonarLint Analysis
# run: |
# ./sonarlint-cli-1.0/bin/sonarlint -Dsonar.java.binaries=target/classes -Dsonar.sources=src/main/java
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ COPY target/aeroplanner-rest-api*.jar .
EXPOSE 8005

# Command to run the Spring Boot application
CMD ["java", "-jar", "aeroplanner-rest-api-0.0.1-SNAPSHOT.jar"]
CMD ["java", "-jar", "aeroplanner-rest-api-1.0.0.jar"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ To stop the docker containers at once run `docker compose down` and add `--volu

Follow the instructions below to push the docker image in the GitHub Container Registry
1. Create personal access token in GitHub via Settings / Developer settings / Personal access tokens
2. Tag the image running `docker build -t ghcr.io/jcilacad/aeroplanner-rest-api:latest -t ghcr.io/jcilacad/aeroplanner-rest-api:0.0.1-SNAPSHOT .`
2. Tag the image running `docker build -t ghcr.io/jcilacad/aeroplanner-rest-api:latest -t ghcr.io/jcilacad/aeroplanner-rest-api:1.0.0 .`
3. Login to registry like `docker login ghcr.io -u jcilacad` providing also the personal access token when prompted
4. Push image to registry : `docker push ghcr.io/jcilacad/aeroplanner-rest-api:latest ghcr.io/jcilacad/aeroplanner-rest-api:0.0.1-SNAPSHOT`
4. Push image to registry : `docker push ghcr.io/jcilacad/aeroplanner-rest-api:latest ghcr.io/jcilacad/aeroplanner-rest-api:1.0.0`

## Run unit tests

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.projects</groupId>
<artifactId>aeroplanner-rest-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>1.0.0</version>
<name>aeroplanner-rest-api</name>
<description>Airline Reservation System RESTful API</description>
<properties>
Expand Down
Loading