Run SCP deploy #27
Workflow file for this run
This file contains 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
name: Run SCP deploy | |
on: | |
workflow_dispatch: | |
jobs: | |
scp-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
server-id: jfrog-central | |
server-username: INTERNAL_USERNAME | |
server-password: INTERNAL_PASSWORD | |
cache: maven | |
- name: Run Maven Package Step | |
run: | | |
mvn -B -U package -Dmaven.test.skip=true -DuseInternalRepo=true | |
env: | |
INTERNAL_USERNAME: ${{ secrets.JFROG_USERNAME }} | |
INTERNAL_PASSWORD: ${{ secrets.JFROG_PASSWORD }} | |
- name: Set up SSH key | |
run: | | |
eval $(ssh-agent -s) | |
ssh-add - <<< "${{ secrets.SCP_CERTIFICATE }}" | |
mkdir -p ~/.ssh/ | |
chmod 600 ~/.ssh | |
ssh-keyscan -t rsa ${{ secrets.SCP_HOST }} >> ~/.ssh/known_hosts | |
- name: Deploy enrollment-server.war | |
shell: bash | |
run: | | |
scp **/target/enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server.war | |
- name: Deploy enrollment-server-onboarding.war | |
shell: bash | |
run: | | |
scp **/target/enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding.war | |
- name: Deploy enrollment-server.war mock | |
shell: bash | |
run: | | |
ssh ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }} 'cp /opt/apache-tomcat/webapps/enrollment-server.war /opt/apache-tomcat/webapps/enrollment-server-mock.war' | |
- name: Deploy enrollment-server-onboarding.war mock | |
shell: bash | |
run: | | |
ssh ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }} 'cp /opt/apache-tomcat/webapps/enrollment-server-onboarding.war /opt/apache-tomcat/webapps/enrollment-server-onboarding-mock.war' | |
- name: Deploy enrollment-server-onboarding.war innovatrics | |
shell: bash | |
run: | | |
ssh ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }} 'cp /opt/apache-tomcat/webapps/enrollment-server-onboarding.war /opt/apache-tomcat/webapps/enrollment-server-onboarding-innovatrics.war' | |
- name: Delete SSH key | |
run: | | |
ssh-add -D |