Skip to content

Commit

Permalink
Merge pull request #188 from cultuurnet/feature/III-6073
Browse files Browse the repository at this point in the history
Remove UiTiDv1 related build configuration as it is moved to the uitidv1/main branch
  • Loading branch information
willaerk authored Aug 9, 2024
2 parents 8b3baac + 7c245e6 commit f6f6869
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 240 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ pipeline {
}
stage('Build') {
steps {
sh label: 'Build binaries', script: 'bundle exec rake jwt-provider:build'
sh label: 'Build binaries', script: 'bundle exec rake build'
}
}
stage('Build artifact') {
steps {
sh label: 'Build artifact', script: "bundle exec rake jwt-provider:build_artifact ARTIFACT_VERSION=${env.ARTIFACT_VERSION}"
sh label: 'Build artifact', script: "bundle exec rake build_artifact ARTIFACT_VERSION=${env.ARTIFACT_VERSION}"
archiveArtifacts artifacts: "pkg/*${env.ARTIFACT_VERSION}*.deb", onlyIfSuccessful: true
}
}
Expand Down
149 changes: 0 additions & 149 deletions Jenkinsfile.uitidv1

This file was deleted.

5 changes: 5 additions & 0 deletions lib/tasks/build.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
desc "Build binaries"
task :build do |task|
system('composer2 install --no-dev --ignore-platform-reqs --prefer-dist --optimize-autoloader') or exit 1
FileUtils.rm('web/jwt-example.php', :force => true)
end
33 changes: 33 additions & 0 deletions lib/tasks/build_artifact.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
desc "Create a debian package from the binaries."
task :build_artifact do |task|

calver_version = ENV['PIPELINE_VERSION'].nil? ? Time.now.strftime("%Y.%m.%d.%H%M%S") : ENV['PIPELINE_VERSION']
git_short_ref = `git rev-parse --short HEAD`.strip
version = ENV['ARTIFACT_VERSION'].nil? ? "#{calver_version}+sha.#{git_short_ref}" : ENV['ARTIFACT_VERSION']
artifact_name = 'uitdatabank-jwt-provider'
vendor = 'publiq VZW'
maintainer = 'Infra publiq <[email protected]>'
license = 'Apache-2.0'
description = 'JSON Web Token provider (via Auth0) for UiTDatabank 3'
source = 'https://github.com/cultuurnet/jwt-provider'
build_url = ENV['JOB_DISPLAY_URL'].nil? ? "" : ENV['JOB_DISPLAY_URL']

basedir = '/var/www/udb3-jwt-provider'

FileUtils.mkdir_p('pkg')
FileUtils.touch('config.yml')

system("fpm -s dir -t deb -n #{artifact_name} -v #{version} -a all -p pkg \
-x '.git*' -x pkg -x config.dist.yml -x 'Gemfile*' -x Jenkinsfile -x .bundle -x vendor/bundle \
--config-files #{basedir}/config.yml \
--prefix #{basedir} \
--deb-user www-data --deb-group www-data \
--description '#{description}' --url '#{source}' --vendor '#{vendor}' \
--license '#{license}' -m '#{maintainer}' \
--deb-field 'Pipeline-Version: #{calver_version}' \
--deb-field 'Git-Ref: #{git_short_ref}' \
--deb-field 'Build-Url: #{build_url}' \
."
) or exit 1

end
49 changes: 0 additions & 49 deletions lib/tasks/jwt-provider-uitidv1/build_artifact.rake

This file was deleted.

7 changes: 0 additions & 7 deletions lib/tasks/jwt-provider/build.rake

This file was deleted.

33 changes: 0 additions & 33 deletions lib/tasks/jwt-provider/build_artifact.rake

This file was deleted.

0 comments on commit f6f6869

Please sign in to comment.