Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mathieu Féry
M1Alma WebAndCloud Server
Commits
a2bd7165
Unverified
Commit
a2bd7165
authored
Dec 06, 2021
by
Féry Mathieu (Mathius)
Browse files
feat(docker): Add auth in dev image
parent
02faec66
Pipeline
#34287
passed with stages
in 3 minutes and 52 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
a2bd7165
...
...
@@ -127,6 +127,7 @@ build:jar:
build:docker-dev:
<<
:
*baseDocker
script
:
-
echo $GCp_KEY_DEV >> service-account-file.json
-
apk add zip
-
mkdir -p BOOT-INF/classes
-
echo "oauth.providers=" >> BOOT-INF/classes/oauthKeys.properties
...
...
Dockerfile-dev
View file @
a2bd7165
FROM google/cloud-sdk
RUN apt-get install openjdk-11-jdk
ARG JAR_FILE=target/*-spring-boot.jar
ARG CREDENTIALS=service-account-file.json
COPY ${JAR_FILE} app.jar
COPY ${CREDENTIALS} service-account-file.json
COPY run-dev.sh run.sh
EXPOSE 8080
ENTRYPOINT ["sh", "run.sh"]
\ No newline at end of file
run-dev.sh
View file @
a2bd7165
#!/bin/sh
gcloud auth activate-service-account
--key-file
service-account-file.json
gcloud config
set
project
"
${
DATASTORE_PROJECT_ID
}
"
java
-jar
/app.jar
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment