Skip to content
Snippets Groups Projects
Commit f3c65632 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

Merge branch 'versions' into 'main'

Versions

See merge request !142
parents 910721af 255e1b3f
No related branches found
No related tags found
2 merge requests!143Production Release,!142Versions
Pipeline #304451 passed
......@@ -213,13 +213,12 @@ Trigger AWS Deployment:
fi
- |
curl --request POST \
--form token=${NSHMP_WS_STATIC_CDK_TRIGGER_TOKEN} \
--form token=${NSHMP_CDK_TRIGGER_TOKEN} \
--form ref=${REF} \
--form "variables[description]=Triggered by nshmp-ws-static" \
--form "variables[ENVIRONMENT]=${ENVIRONMENT}" \
--form "variables[NSHMP_WS_STATIC_IMAGE]=${IMAGE_NAME}" \
--form "variables[TRIGGER_PASSCODE]=${NSHMP_WS_STATIC_CDK_TRIGGER_TOKEN}" \
"https://${PRIVATE_GITLAB}/api/v4/projects/${NSHMP_WS_STATIC_CDK_PROJECT_ID}/trigger/pipeline"
"https://${PRIVATE_GITLAB}/api/v4/projects/${NSHMP_CDK_PROJECT_ID}/trigger/pipeline"
stage: trigger
variables:
REF: main
......
......@@ -7,8 +7,8 @@ micronautRxVersion = 2.1.1
netcdfVersion = 5.5.2
nodePluginVersion = 3.0.1
nodeVersion = 16.3.0
nshmpLibVersion = 1.0.6
nshmpWsUtilsVersion = 0.3.10
nshmpLibVersion = 1.3.10
nshmpWsUtilsVersion = 0.3.12
openApiVersion = 4.0.0
shadowVersion = 7.1.1
slfVersion = 1.7.30
......
......@@ -4,21 +4,28 @@ tasks.withType(JavaCompile) {
doFirst {
def versionFile = new File("${projectDir}/src/main/resources/version/nshmp-ws-static-version.json")
new File(versionFile.getParent()).mkdirs()
def details = versionDetails()
def ciProjectUrl = System.getenv("CI_PROJECT_URL")
def branch = System.getenv("CI_COMMIT_BRANCH")
def versionInfo = [
branchName: branch ? branch : details.branchName,
commitDistance: details.commitDistance,
gitHash: details.gitHash,
gitHashFull: details.gitHashFull,
isCleanTag: details.isCleanTag,
lastTag: details.lastTag,
projectName: rootProject.name,
url: ciProjectUrl ? ciProjectUrl : 'git config --get remote.origin.url'.execute().text.replace('\n', ''),
version: details.version,
]
def json = groovy.json.JsonOutput.toJson(versionInfo)
versionFile.write(groovy.json.JsonOutput.prettyPrint(json))
try {
def details = versionDetails()
def ciProjectUrl = System.getenv("CI_PROJECT_URL")
def branch = System.getenv("CI_COMMIT_BRANCH")
def versionInfo = [
branchName: branch ? branch : details.branchName,
commitDistance: details.commitDistance,
gitHash: details.gitHash,
gitHashFull: details.gitHashFull,
isCleanTag: details.isCleanTag,
lastTag: details.lastTag,
projectName: project.name,
url: ciProjectUrl ? ciProjectUrl : "git config --get remote.origin.url".execute().text.replace("\n", ""),
version: details.version,
]
def json = groovy.json.JsonOutput.toJson(versionInfo)
versionFile.write(groovy.json.JsonOutput.prettyPrint(json))
} catch (Exception e) {
println("Failed to create version file. Writing blank file.")
println(e)
versionFile.write('{}')
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment