Skip to content

Commit

Permalink
#813 | Remove rpm related ciconfig and make commands
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed Dec 10, 2024
1 parent 909ad68 commit 543a7f9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 155 deletions.
71 changes: 3 additions & 68 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,6 @@ orbs:
aws-cli: circleci/[email protected]

commands:
deploy:
description: Deployment of server
parameters:
hostname:
type: string
default: "ssh.staging.openchs.org"
steps:
- attach_workspace:
at: ~/artifacts

- run: sudo apt-get install make openssl

- run:
name: Install dependencies
command: |
sudo apt-get -y -qq update
sudo apt-get -y -qq install python3-pip
sudo pip3 install awscli --upgrade
- run:
name: Copy build to server
command: |
scp -o StrictHostKeyChecking=no ~/artifacts/avni-server-*.noarch.rpm ec2-user@<< parameters.hostname >>:/tmp/avni-server.rpm
- run:
name: Deploy server
command: |
ssh -o StrictHostKeyChecking=no ec2-user@<< parameters.hostname >> \<< EOF
sudo service openchs stop 2>&1 >/dev/null
sleep 5
sudo yum clean all 2>&1 >/dev/null
sudo rm -rf /var/cache/yum 2>&1 >/dev/null
sudo yum -y updateinfo 2>&1 >/dev/null
sudo yum -y remove avni-server openchs-server java-1.7.0-openjdk 2>&1 >/dev/null
sudo yum -y install /tmp/avni-server.rpm 2>&1 >/dev/null
sudo service openchs start 2>&1 >/dev/null
sleep 20
sudo rm -rf /tmp/avni-server.rpm
EOF
deploy_as_service:
description: Deployment of avni-server as a systemd service
parameters:
Expand Down Expand Up @@ -160,20 +120,11 @@ jobs:

- run: mkdir -p ~/artifacts;

- run: cp minor_version ~/artifacts/minor_version;

- run: cp major_version ~/artifacts/major_version;

- run: cp ~/avni-server/avni-server-api/build/distributions/avni-server-*.noarch.rpm ~/artifacts/;

- run: cp ~/avni-server/avni-server-api/build/libs/avni-server-*.jar ~/artifacts/;

- persist_to_workspace:
root: ~/artifacts
paths:
- minor_version
- major_version
- avni-server-*.noarch.rpm
- avni-server-*.jar

- store_artifacts:
Expand Down Expand Up @@ -240,14 +191,6 @@ jobs:
- deploy_as_service:
env: "staging"

UAT_deploy:
docker:
- image: cimg/openjdk:21.0
working_directory: ~/
steps:
- deploy:
hostname: "ssh.uat.openchs.org"

PRERELEASE_deploy:
docker:
- image: cimg/deploy:2023.09
Expand All @@ -264,7 +207,7 @@ jobs:

PERF_deploy:
docker:
- image: cimg/openjdk:21.0
- image: cimg/deploy:2023.09
working_directory: ~/
steps:
- aws-cli/setup:
Expand All @@ -273,8 +216,8 @@ jobs:
- setup_server_access:
instance-id: "i-0f30399b30e24a49b"
availability-zone: "ap-south-1a"
- deploy:
hostname: "ssh.perf.avniproject.org"
- deploy_as_service:
env: "prerelease"

PROD_deploy:
docker:
Expand Down Expand Up @@ -351,14 +294,6 @@ workflows:
context: non-prod-deploy
requires:
- STAGING_approve
- UAT_approve:
type: approval
requires:
- build
- UAT_deploy:
context: non-prod-deploy
requires:
- UAT_approve
- PRERELEASE_approve:
type: approval
requires:
Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@ open_test_results:
open avni-server-api/build/reports/tests/test/index.html
open-test-results: open_test_results

build-rpm:
./gradlew clean avni-server-api:buildRpm -x test --info --stacktrace

# <exec-sql>
exec-sql: ## Usage: make exec-sql sqlfile=</path/to/sql>
psql -Uopenchs -f $(sqlfile)
Expand Down
1 change: 0 additions & 1 deletion avni-server-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ ext { springBootVersion = '3.3.5' }
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'idea'
apply from: 'rpm.gradle'
apply plugin: 'io.spring.dependency-management'

java {
Expand Down
83 changes: 0 additions & 83 deletions avni-server-api/rpm.gradle

This file was deleted.

0 comments on commit 543a7f9

Please sign in to comment.