Skip to content
Snippets Groups Projects

Remove wildcard flags not present in busybox that crash the MM import

Merged Martin Lowe requested to merge malowe/geoip-rest-api:malowe/master/curl-build-fix into master
1 unresolved thread

After migrating to stack-build-agent, build began to fail due to --wildcard flag on the tar command. In busybox, which is the shell impl used in the build agent, this flag is not present and causes errors. As we already have cleanup, this won't make the build image any larger but will result in slightly longer and larger intermediate images as it extracts a few extra files.

Merge request reports

Approved by

Merged by Martin LoweMartin Lowe 3 years ago (May 30, 2022 2:26pm UTC)

Merge details

  • Changes merged into master with fac166b9.
  • Deleted the source branch.

Pipeline #4481 passed

Pipeline passed for fac166b9 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Martin Lowe added 1 commit

    added 1 commit

    • ef1c4e40 - Update CD command to have quotes around variable

    Compare with previous version

  • Sébastien Heurtematte resolved all threads

    resolved all threads

  • Sébastien Heurtematte approved this merge request

    approved this merge request

  • Christopher Guindon approved this merge request

    approved this merge request

  • Martin Lowe added 1 commit

    added 1 commit

    • 6514e6b1 - Update makefile to not rewrite the Maxmind location for prod build

    Compare with previous version

  • Martin Lowe added 1 commit

    added 1 commit

    • 6bf83d03 - Add extra logging to maxmind import

    Compare with previous version

  • Martin Lowe added 1 commit

    added 1 commit

    • 72a34780 - Add more logging to maxmind script

    Compare with previous version

  • Martin Lowe added 1 commit

    added 1 commit

    • 27077a9c - Update maxmind stash to use glob pattern match

    Compare with previous version

  • Author Maintainer

    I think I've taken this as far as I can...I've added extra logging and added a glob-style match string to the maxmind stash command. When running the build we are still getting errors on the stash command according to the Jeknins MR build:

     No files included in stash ‘maxmind’

    Additional logs are available on pipeline step | Shell Script - (3.2 sec in self) | mkdir -p /tmp/maxmind && ./bin/maxmind.sh /tmp/maxmind |. I can see that there should be files, but they aren't being detected by my wildcard blob as I would expect.

  • 124 124 sh 'make production-build'
    125 125 stash includes: 'target/', name: 'target'
    126 126 dir('/tmp') {
    127 stash includes: 'maxmind/', name: 'maxmind'
    127 stash includes: 'maxmind/**/*', name: 'maxmind'
    128 128 }
    129 129 }
    • Comment on lines 120 to 129

      AFAICT, there is problem with /tmp (for some reasons). Try to do all of that outside of /tmp, e.g.

      withCredentials([string(credentialsId: 'maxmind-license-key', variable: 'MAXMIND_LICENSE_KEY')]) {
        sh 'mkdir -p maxmind && ./bin/maxmind.sh maxmind'
      }
        
      sh 'make production-build'
      stash includes: 'target/', name: 'target'
      
      stash includes: 'maxmind/', name: 'maxmind'
      stash includes: 'maxmind/**/*', name: 'maxmind'
    • Please register or sign in to reply
  • Martin Lowe added 1 commit

    added 1 commit

    • a613a2f6 - Update jenkins build to not use `/tmp` dir

    Compare with previous version

  • Martin Lowe added 1 commit

    added 1 commit

    • 47581412 - Update maxmind bind location in makefile command used for prod build

    Compare with previous version

  • Mikaël Barbero approved this merge request

    approved this merge request

  • merged

  • Martin Lowe mentioned in commit fac166b9

    mentioned in commit fac166b9

  • Please register or sign in to reply
    Loading