Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
groupe-calcul
website
Commits
1e187e36
Commit
1e187e36
authored
Jun 12, 2019
by
gouarin
Browse files
fix GITLAB_TOKEN
parent
f6a59697
Pipeline
#4460
passed with stages
in 46 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
content/job_offers/add_job_offer.py
View file @
1e187e36
...
...
@@ -627,12 +627,8 @@ def create_job_request(job_offer, debug):
"""
# Connecting to Gitlab
try
:
# TODO: remove GITLAB_TOKEN variable from gitlab_config.py, revoke token and use the line below
# instead of os.gentenv()
gitlab_private_token
=
os
.
environ
[
'GITLAB_TOKEN'
]
# gitlab_private_token = os.getenv('GITLAB_PRIVATE_TOKEN', GITLAB_TOKEN)
except
KeyError
:
gitlab_private_token
=
GITLAB_TOKEN
if
gitlab_private_token
is
None
:
print
(
"[ERROR] GITLAB_PRIVATE_TOKEN environment variable not set!"
,
file
=
sys
.
stderr
)
raise
...
...
content/job_offers/gitlab_config.py
View file @
1e187e36
import
os
# Gitlab configuration
GITLAB_URL
=
"https://gitlab.math.unistra.fr"
GITLAB_TOKEN
=
os
.
getenv
(
"GITLAB_TOKEN"
)
GITLAB_TARGET_ID
=
309
# groupe-calcul/website
GITLAB_TARGET_BRANCH
=
'
develop
'
GITLAB_TARGET_BRANCH
=
os
.
getenv
(
"OPENSHIFT_BUILD_REFERENCE"
,
"
develop
"
)
GITLAB_SOURCE_ID
=
309
# groupe-calcul/website
GITLAB_REF_BRANCH
=
GITLAB_TARGET_BRANCH
# Head of the job branch
GITLAB_LABELS
=
[
"Offre d'emploi"
]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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