Skip to content

Commit

Permalink
CI bugfixes
Browse files Browse the repository at this point in the history
Update mapepire-server.spec
  • Loading branch information
ThePrez committed Aug 8, 2024
1 parent d626d99 commit 2ceb1da
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions .github/workflows/rpm_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ on:
pull_request:
branches: [ main ]

env:
remote_build_dir: /home/${{ secrets.IBMI_USER }}/build/${{ github.sha }}/

jobs:
build:

runs-on: ubuntu-latest
environment: ossbuild

steps:
- uses: actions/checkout@v2
Expand All @@ -24,11 +28,31 @@ jobs:
run: |
echo "project_version=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:3.1.0:exec --file pom.xml | tr -d \-)" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: create jt400 psudo-directory
run: sudo mkdir -p /QIBM/ProdData/OS400/jt400/lib/
- name: change ownership of jt400 psudo-directory
run: sudo chown $USER /QIBM/ProdData/OS400/jt400/lib/
- name: fetch jt400.jar
run: sudo curl https://repo1.maven.org/maven2/net/sf/jt400/jt400/10.7/jt400-10.7.jar -o /QIBM/ProdData/OS400/jt400/lib/jt400.jar
- name: Build with Maven
run: time rpmbuild --define "_builddir `pwd`" --define 'mversion ${{ env.project_version }}' -ba mapepire-server.spec
- name: Install ICI tool
run: npm i -g @ibm/ibmi-ci

- name: Build on IBM i
run: |
ici \
--rcwd "${{ env.remote_build_dir }}" \
--push "." \
--cmd 'time rpmbuild --define "_builddir `pwd`" --define "mversion ${{ env.project_version }}" -ba mapepire-server.spec' \
--pull "."
env:
IBMI_HOST: ${{ secrets.IBMI_HOST }}
IBMI_USER: ${{ secrets.IBMI_USER }}
IBMI_PASSWORD: ${{ secrets.IBMI_PASSWORD }}
IBMI_SSH_PORT: ${{ secrets.IBMI_SSH_PORT }}

- name: Clean up on IBM i
if: always()
run: |
ici \
--rcwd "${{ env.remote_build_dir }}" \
--ignore --cmd "rm -fr ${{ env.remote_build_dir }}"
--ignore --cmd "rm -fr $HOME/rpmbuild/*/mapepire*"
env:
IBMI_HOST: ${{ secrets.IBMI_HOST }}
IBMI_USER: ${{ secrets.IBMI_USER }}
IBMI_PASSWORD: ${{ secrets.IBMI_PASSWORD }}
IBMI_SSH_PORT: ${{ secrets.IBMI_SSH_PORT }}

0 comments on commit 2ceb1da

Please sign in to comment.