Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
citelibre authored Jan 25, 2024
1 parent 111ac5f commit 50f8af1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: docker login
run: docker login -u=citelibre -p="${{ secrets.PASSWORD_DOCKER_CITELIBRE }}"
- name: Retrieve version in pom with Maven
run: echo "VERSION=$(cd citelibre-serviceEZ && mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | sed -n -e '/^\[.*\]/ !{ /^[0-9]/ { p; q } }')">> $GITHUB_ENV
run: echo "VERSION=$(cd citelibre-identEZ && mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | sed -n -e '/^\[.*\]/ !{ /^[0-9]/ { p; q } }')">> $GITHUB_ENV

- name: Display version
run: echo "version $VERSION"
Expand All @@ -38,21 +38,21 @@ jobs:
run: time curl -v https://dev.lutece.paris.fr/maven_repository/fr/paris/lutece/lutece-core/7.0.10/lutece-core-7.0.10-webapp.zip -o test.zip

- name: build war ihm
run: cd citelibre-serviceEZ && mkdir -p $HOME/.m2/repository/fr/paris/lutece/lutece-core/7.0.10/ && curl --http1.0 -L https://dev.lutece.paris.fr/maven_repository/fr/paris/lutece/lutece-core/7.0.10/lutece-core-7.0.10-webapp.zip -o $HOME/.m2/repository/fr/paris/lutece/lutece-core/7.0.10/lutece-core-7.0.10-webapp.zip && mvn -e lutece:site-assembly -Pdev
run: cd citelibre-identEZ && mkdir -p $HOME/.m2/repository/fr/paris/lutece/lutece-core/7.0.10/ && curl --http1.0 -L https://dev.lutece.paris.fr/maven_repository/fr/paris/lutece/lutece-core/7.0.10/lutece-core-7.0.10-webapp.zip -o $HOME/.m2/repository/fr/paris/lutece/lutece-core/7.0.10/lutece-core-7.0.10-webapp.zip && mvn -e lutece:site-assembly -Pdev

- name: retrieve war name
run: echo "WAR_NAME=$(cd citelibre-serviceEZ/target; ls *.war|sed -e 's/\.war//g')" >> $GITHUB_ENV
run: echo "WAR_NAME=$(cd citelibre-identEZ/target; ls *.war|sed -e 's/\.war//g')" >> $GITHUB_ENV

- name: build serviceEZ
run: docker build citelibre-serviceEZ --build-arg site=$WAR_NAME -t citelibre/service_ez:ihm-$VERSION
- name: build identEZ
run: docker build citelibre-identEZ --build-arg site=$WAR_NAME -t citelibre/service_ez:ihm-$VERSION

- name: build serviceEZ
run: docker save -o citelibre-serviceEZ.tar citelibre/service_ez:ihm-$VERSION
- name: build identEZ
run: docker save -o citelibre-identEZ.tar citelibre/service_ez:ihm-$VERSION

- name: Run Trivy vulnerability scanner in tarball mode of serviceEZ image
- name: Run Trivy vulnerability scanner in tarball mode of identEZ image
uses: aquasecurity/trivy-action@master
with:
input: /github/workspace/citelibre-serviceEZ.tar
input: /github/workspace/citelibre-identEZ.tar
severity: 'CRITICAL,HIGH'
format: 'sarif'
output: 'trivy-results.sarif'
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Commit and push docker compose
run: |
rm -rf citelibre-serviceEZ/target
rm -rf citelibre-identEZ/target
git config --global user.name "githubaction"
git config --global user.email "githubaction"
git add docker-compose.yml
Expand Down

0 comments on commit 50f8af1

Please sign in to comment.