Fix publish pipeline (#5613)

* wip

* wip

* Swap to corretto

* Try alpine

* create as root

* create as root

* Swap to root

* Hack around non-root

* revert unjammying

* revert

* now use dockerhub

* now use dockerhub

* New file

* remove comment
This commit is contained in:
Tadgh 2024-01-19 15:23:26 -08:00 committed by GitHub
parent 6e1a56d520
commit 9438754b72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 5 deletions

6
.github/docker/Dockerfile vendored Normal file
View File

@ -0,0 +1,6 @@
# Note that this image is used only to publish HAPI-FHIR. this is published at `smilecdr/hapi-build`
# Start from the maven image
FROM maven:3.9-eclipse-temurin-21-jammy
# Install gpg
RUN apt-get update && apt-get install -y gpg

View File

@ -12,7 +12,7 @@ schedules:
pr: none pr: none
trigger: none trigger: none
# We'll run the process on the latest version of unbuntu because they tend to be the fastest # We'll run the process on the latest version of ubuntu because they tend to be the fastest
pool: pool:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-latest'
@ -24,7 +24,9 @@ variables:
- group: GPG_VARIABLE_GROUP - group: GPG_VARIABLE_GROUP
- group: SONATYPE_VARIABLE_GROUP - group: SONATYPE_VARIABLE_GROUP
container: maven:3.9-eclipse-temurin-21-jammy container:
image: smilecdr/hapi-build:latest
steps: steps:
# We need a valid signing key to sign our builds for deployment to sonatype. We have uploaded # We need a valid signing key to sign our builds for deployment to sonatype. We have uploaded
@ -44,11 +46,8 @@ steps:
# Although we have imported the key files into our workspace, GPG has no knowledge that these keys exist. # Although we have imported the key files into our workspace, GPG has no knowledge that these keys exist.
# We use a bash script to import both the private and puablic keys into gpg for future signing. # We use a bash script to import both the private and puablic keys into gpg for future signing.
# 3. Import keys into gpg # 3. Import keys into gpg
- bash: | - bash: |
sudo apt update
sudo apt install -y gpg
gpg --import --no-tty --batch --yes $(Agent.TempDirectory)/public.key gpg --import --no-tty --batch --yes $(Agent.TempDirectory)/public.key
gpg --import --no-tty --batch --yes $(Agent.TempDirectory)/private.key gpg --import --no-tty --batch --yes $(Agent.TempDirectory)/private.key
gpg --list-keys --keyid-format LONG gpg --list-keys --keyid-format LONG