Skip to content

Commit

Permalink
Publish argo UI (argoproj#16)
Browse files Browse the repository at this point in the history
* Change CICD to build argo ui
* replace registry on lock file
  • Loading branch information
Diogo Silva authored and Alan Clucas committed Nov 25, 2024
1 parent 57e7af6 commit 807b87f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ COPY . .

####################################################################################################

FROM artprod.dev.bloomberg.com/rhel7-dpkg:latest as argo-ui
FROM artprod.dev.bloomberg.com/node:21-rhel8-dpkg as argo-ui

RUN apt-get update && apt-get install -y node yarn git
RUN apt-get update && apt-get install -y yarn git

# Nuke proxy configs on npm to not mess with host setup
RUN npm config delete noproxy proxy https-proxy -g

# Add support for git credential helper to read from secret
RUN git config --system credential.helper '!f() { sleep 1; echo "username=token"; echo "password=$(cat /run/secrets/GIT_PASSWORD)"; }; f'

COPY ui/package.json ui/yarn.lock ui/

RUN --mount=type=cache,target=/root/.yarn \
RUN --mount=type=secret,id=GIT_PASSWORD --mount=type=cache,target=/root/.yarn \
YARN_CACHE_FOLDER=/root/.yarn JOBS=max \
yarn --cwd ui install --network-timeout 1000000

Expand Down
27 changes: 25 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ node(agent_label) {
.addVariables([
"DOCKER_BUILDKIT": "1"
])
.addCredentialEnv(usernamePassword(
credentialsId: 'bbgithub_token',
usernameVariable: 'GIT_USERNAME',
passwordVariable: 'GIT_PASSWORD'
))

def infoAgent = j.agent("generic.JaazyFileInfoAgent")

Expand Down Expand Up @@ -46,12 +51,30 @@ node(agent_label) {
])
.addBuildFlags(["--target argoexec"])

// UI
def argoui = j.agent("generic.DockerAgent", "argoui")
.setDefaultNamespace("workflow-runtimes")
.setDockerRegistryCredential("dsbuild-artifactory-jwt")
.inside(buildEnv)
.setSanitizeNameClosure({ rawName -> return "argoui" })
.addBuildVariables([
"GIT_COMMIT": "${GIT_COMMIT}",
"GIT_TREE_STATE": "JaaS-clean",
"GIT_TAG": "untagged",
"VERSION": infoAgent.getVersion(),
"HTTP_PROXY": "http://devproxy.bloomberg.com:82",
"HTTPS_PROXY": "http://devproxy.bloomberg.com:82",
"NO_PROXY": ".bloomberg.com",
])
.addBuildFlags(["--secret id=GIT_PASSWORD,env=GIT_PASSWORD", "--target argo-ui"])

j.workflow("SimpleFlow")
.infoUsing(infoAgent)
.buildUsingParallel([workflow_controller, argoexec])
.buildUsingParallel([workflow_controller, argoexec, argoui])
.publishUsing(workflow_controller)
.publishUsing(argoexec)
.publishUsing(argoui)
.start()


}

0 comments on commit 807b87f

Please sign in to comment.