generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adapt data sync engine to run on jenkins (#18) #5: Adapt Engine to run on Jenkins Cron * #19 Include Compliance YAML to project to track risks and Privacy Impact Assessment status (#21) * #13 Include Badge for project Status (#24) * Feature/27/marcio/jenkins convert to polaris (#28) * #27 - Including JenkinsFile for Polaris Jenkins Server * #27 - Including some changes to test Polaris Features * #27 Updating agent configuration * #27 Remove unnecessary python checking * #27 Including post conditions * #27 Including 1st test to determine readiness of code * #27 Fixing missing single quote * #27 pwd + dir * #27 Including Docker file for podman build containerization * #27 Hello World message to guarantee no error message in pipeline, for now.
- Loading branch information
1 parent
181153e
commit eb0f420
Showing
3 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# pull official base image | ||
FROM python:3.9-bookworm | ||
|
||
# set work directory | ||
WORKDIR /usr/src/app | ||
|
||
# set environment variables | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# install psycopg2 dependencies | ||
#RUN apk update \ | ||
# && apk add postgresql-dev gcc python3-dev | ||
|
||
# install dependencies | ||
RUN pip install --upgrade pip | ||
COPY ./requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
# copy project | ||
COPY . . | ||
RUN python3 src/main.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
@Library('polaris') | ||
import ca.bc.gov.nrids.polaris.Podman | ||
import ca.bc.gov.nrids.polaris.BrokerIntention | ||
import ca.bc.gov.nrids.polaris.Vault | ||
|
||
def podman | ||
|
||
pipeline { | ||
agent none | ||
stages { | ||
stage('Checkout code') { | ||
agent { | ||
label Podman.AGENT_LABEL_APP | ||
} | ||
steps { | ||
checkout scm | ||
} | ||
} | ||
stage('Run Compose') { | ||
agent { | ||
label Podman.AGENT_LABEL_APP | ||
} | ||
steps { | ||
sh 'pwd' | ||
sh 'dir' | ||
sh 'podman build --file=Dockerfile_Polaris .' | ||
} | ||
} | ||
} | ||
/* post { | ||
unstable { | ||
node(Podman.AGENT_LABEL_APP) { | ||
script { | ||
if (intention) { | ||
println intention.close(false) | ||
} | ||
} | ||
} | ||
} | ||
failure { | ||
node(Podman.AGENT_LABEL_APP) { | ||
script { | ||
if (intention) { | ||
println intention.close(false) | ||
} | ||
} | ||
} | ||
} | ||
aborted { | ||
node(Podman.AGENT_LABEL_APP) { | ||
script { | ||
if (intention) { | ||
println intention.close(true) | ||
} | ||
} | ||
} | ||
} | ||
always { | ||
node(Podman.AGENT_LABEL_APP) { | ||
cleanWs( | ||
cleanWhenAborted: true, | ||
cleanWhenFailure: false, | ||
cleanWhenSuccess: true, | ||
cleanWhenUnstable: false, | ||
deleteDirs: true | ||
) | ||
} | ||
} | ||
}*/ | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters