Skip to content

Commit c12f0c2

Browse files
SNOW-2389788: Moving docker images to artifactory (#2761)
1 parent 3f09276 commit c12f0c2

3 files changed

Lines changed: 19 additions & 11 deletions

File tree

Jenkinsfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@Library('pipeline-utils')
2+
import com.snowflake.DevEnvUtils
13
import groovy.json.JsonOutput
24

35

@@ -10,10 +12,17 @@ timestamps {
1012
env.GIT_COMMIT = scmInfo.GIT_COMMIT
1113
}
1214

15+
stage('Authenticate Artifactory') {
16+
script {
17+
new DevEnvUtils().withSfCli {
18+
sh "sf artifact oci auth"
19+
}
20+
}
21+
}
22+
1323
stage('Build') {
1424
withCredentials([
15-
usernamePassword(credentialsId: '063fc85b-62a6-4181-9d72-873b43488411', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'),
16-
string(credentialsId: 'a791118f-a1ea-46cd-b876-56da1b9bc71c',variable: 'NEXUS_PASSWORD')
25+
usernamePassword(credentialsId: '063fc85b-62a6-4181-9d72-873b43488411', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY')
1726
]) {
1827
sh '''\
1928
|cd $WORKSPACE
@@ -63,7 +72,6 @@ timestamps {
6372
'Test Authentication': {
6473
stage('Test Authentication') {
6574
withCredentials([
66-
string(credentialsId: 'a791118f-a1ea-46cd-b876-56da1b9bc71c', variable: 'NEXUS_PASSWORD'),
6775
string(credentialsId: 'sfctest0-parameters-secret', variable: 'PARAMETERS_SECRET')
6876
]) {
6977
sh '''\

ci/set_base_image.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#!/bin/bash -e
22
#
33
# Use the internal docker registry if running on Jenkins
4+
# Artifactory virtual repos support anonymous access; authentication
5+
# is handled via "sf artifact oci auth" in the Jenkinsfile.
46
#
57
set -o pipefail
6-
INTERNAL_REPO=nexus.int.snowflakecomputing.com:8086
7-
if [[ -n "$NEXUS_PASSWORD" ]]; then
8+
INTERNAL_REPO=artifactory.ci1.us-west-2.aws-dev.app.snowflake.com/internal-production-docker-snowflake-virtual
9+
if [[ -n "$JENKINS_HOME" ]]; then
810
echo "[INFO] Pull docker images from $INTERNAL_REPO"
9-
NEXUS_USER=${USERNAME:-jenkins}
10-
docker login --username "$NEXUS_USER" --password "$NEXUS_PASSWORD" $INTERNAL_REPO
11-
export BASE_IMAGE_MANYLINUX2014=nexus.int.snowflakecomputing.com:8086/docker/manylinux2014_x86_64:2025.02.12-1
12-
export BASE_IMAGE_MANYLINUX2014AARCH64=nexus.int.snowflakecomputing.com:8086/docker/manylinux2014_aarch64:2025.02.12-1
13-
export BASE_IMAGE_ROCKYLINUX9=nexus.int.snowflakecomputing.com:8086/docker/rockylinux:9
11+
export BASE_IMAGE_MANYLINUX2014=$INTERNAL_REPO/docker/manylinux2014_x86_64:2025.02.12-1
12+
export BASE_IMAGE_MANYLINUX2014AARCH64=$INTERNAL_REPO/docker/manylinux2014_aarch64:2025.02.12-1
13+
export BASE_IMAGE_ROCKYLINUX9=$INTERNAL_REPO/docker/rockylinux:9
1414
else
1515
echo "[INFO] Pull docker images from public registry"
1616
export BASE_IMAGE_MANYLINUX2014=quay.io/pypa/manylinux2014_x86_64

ci/test_authentication.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ docker run \
2525
-v $(cd $THIS_DIR/.. && pwd):/mnt/host \
2626
-v $WORKSPACE:/mnt/workspace \
2727
--rm \
28-
nexus.int.snowflakecomputing.com:8086/docker/snowdrivers-test-external-browser-python:3 \
28+
artifactory.ci1.us-west-2.aws-dev.app.snowflake.com/internal-production-docker-snowflake-virtual/docker/snowdrivers-test-external-browser-python:3 \
2929
"/mnt/host/ci/container/test_authentication.sh"

0 commit comments

Comments
 (0)